mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 08:10:59 +00:00
Indentation tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10027 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
59384d53aa
commit
2ef65f8a58
1 changed files with 84 additions and 61 deletions
|
@ -928,9 +928,13 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
range: para];
|
||||
|
||||
if (eol.length == 0)
|
||||
{
|
||||
eol.location = length;
|
||||
}
|
||||
else
|
||||
{
|
||||
para.length = eol.location - para.location;
|
||||
}
|
||||
paraPos = NSMaxRange(eol);
|
||||
position = para.location;
|
||||
|
||||
|
@ -954,18 +958,24 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
unsigned scannerPosition = localLineStartIndex;
|
||||
|
||||
if (NSIsEmptyRect(remainingRect))
|
||||
{
|
||||
fragmentRect = NSMakeRect (0, drawingPoint.y, HUGE, HUGE);
|
||||
}
|
||||
else
|
||||
{
|
||||
fragmentRect = remainingRect;
|
||||
}
|
||||
|
||||
fragmentRect = [aTextContainer lineFragmentRectForProposedRect: fragmentRect
|
||||
fragmentRect = [aTextContainer
|
||||
lineFragmentRectForProposedRect: fragmentRect
|
||||
sweepDirection: NSLineSweepRight
|
||||
movementDirection: NSLineMoveDown
|
||||
remainingRect: &remainingRect];
|
||||
if (NSIsEmptyRect(fragmentRect))
|
||||
{
|
||||
// No more space in the text container, give up doing the layout
|
||||
return NSMakeRange(aLine, MAX(1, [_lineLayoutInformation count] - aLine));
|
||||
int a = MAX (1, [_lineLayoutInformation count] - aLine);
|
||||
return NSMakeRange(aLine, a);
|
||||
}
|
||||
|
||||
width = fragmentRect.size.width - 2 * padding;
|
||||
|
@ -990,11 +1000,15 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
= scanRange(lScanner, selectionWordGranularitySet);
|
||||
|
||||
if (leadingSpacesRange.length)
|
||||
{
|
||||
currentStringRange = NSUnionRange(leadingSpacesRange,
|
||||
currentStringRange);
|
||||
}
|
||||
if (trailingSpacesRange.length)
|
||||
{
|
||||
currentStringRange = NSUnionRange(trailingSpacesRange,
|
||||
currentStringRange);
|
||||
}
|
||||
|
||||
// evaluate size of current word
|
||||
advanceSize = [self _sizeOfRange:
|
||||
|
@ -1031,7 +1045,9 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isBuckled = NO;
|
||||
}
|
||||
|
||||
// line to long
|
||||
if (usedLineRect.size.width + advanceSize.width > width ||
|
||||
|
@ -1062,17 +1078,21 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
scannerPosition += eol.length;
|
||||
usedLineRect.size.width += 1;
|
||||
// FIXME: This should use the real font size!!
|
||||
if (!usedLineRect.size.height)
|
||||
if (usedLineRect.size.height == 0)
|
||||
{
|
||||
usedLineRect.size.height = 12;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lineGlyphRange = NSMakeRange (startingLineCharIndex,
|
||||
scannerPosition - localLineStartIndex);
|
||||
// Adjust the height of the line fragment rect, as this will the to big
|
||||
// Adjust the height of the line fragment rect, as this will
|
||||
// the to big
|
||||
fragmentRect.size.height = usedLineRect.size.height;
|
||||
|
||||
// This range is to small, as there are more lines that fit into the container
|
||||
// This range is to small, as there are more lines that fit
|
||||
// into the container
|
||||
[self setTextContainer: aTextContainer
|
||||
forGlyphRange: lineGlyphRange];
|
||||
|
||||
|
@ -1080,7 +1100,8 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
forGlyphRange: lineGlyphRange
|
||||
usedRect: usedLineRect];
|
||||
|
||||
// This range is too big, as there are different runs in the glyph range
|
||||
// This range is too big, as there are different runs in the
|
||||
// glyph range
|
||||
[self setLocation: NSMakePoint(0.0, 0.0)
|
||||
forStartOfGlyphRange: lineGlyphRange];
|
||||
|
||||
|
@ -1095,9 +1116,9 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
{
|
||||
float yDisplacement = 0;
|
||||
|
||||
// is it possible to simply patch layout changes
|
||||
// into layout array instead of doing a time
|
||||
// consuming re - layout of the whole doc?
|
||||
// is it possible to simply patch layout changes into
|
||||
// layout array instead of doing a time consuming re -
|
||||
// layout of the whole doc?
|
||||
if ([self _relocLayoutArray: ghostArray
|
||||
offset: insertionDelta
|
||||
floatTrift: &yDisplacement])
|
||||
|
@ -1106,7 +1127,9 @@ scanRange(NSScanner *scanner, NSCharacterSet* aSet)
|
|||
|
||||
// y displacement: redisplay all remaining lines
|
||||
if (yDisplacement)
|
||||
{
|
||||
erg = [_lineLayoutInformation count] - aLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
// return 2: redisplay only this and previous line
|
||||
|
|
Loading…
Reference in a new issue