mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 20:41:00 +00:00
Fixed effectiveRange returned by lineFragment and textContainer methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11827 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8b15ba08d6
commit
0cc1b5bd9a
1 changed files with 26 additions and 8 deletions
|
@ -2226,7 +2226,7 @@ _Sane(self);
|
||||||
NSLog(@"glyphRangeForTextContainer: called. There are %d
|
NSLog(@"glyphRangeForTextContainer: called. There are %d
|
||||||
textContainer(s) in containerRuns.", [_containerRuns count]);
|
textContainer(s) in containerRuns.", [_containerRuns count]);
|
||||||
|
|
||||||
for (i=0;i<[_containerRuns count];i++)
|
for (i = 0; i < [_containerRuns count]; i++)
|
||||||
{
|
{
|
||||||
GSTextContainerLayoutInfo *aNewLine = [_containerRuns objectAtIndex: i];
|
GSTextContainerLayoutInfo *aNewLine = [_containerRuns objectAtIndex: i];
|
||||||
|
|
||||||
|
@ -2258,11 +2258,17 @@ textContainer(s) in containerRuns.", [_containerRuns count]);
|
||||||
theLine = [_containerRuns objectContainingLocation: glyphIndex];
|
theLine = [_containerRuns objectContainingLocation: glyphIndex];
|
||||||
if (theLine)
|
if (theLine)
|
||||||
{
|
{
|
||||||
(NSRange*)effectiveRange = &theLine->glyphRange;
|
if (effectiveRange)
|
||||||
|
{
|
||||||
|
*effectiveRange = theLine->glyphRange;
|
||||||
|
}
|
||||||
return theLine->textContainer;
|
return theLine->textContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
(NSRange*)effectiveRange = NULL;
|
if (effectiveRange)
|
||||||
|
{
|
||||||
|
*effectiveRange = NSMakeRange (NSNotFound, 0);
|
||||||
|
}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2296,11 +2302,17 @@ textContainer(s) in containerRuns.", [_containerRuns count]);
|
||||||
theLine = [_fragmentRuns objectContainingLocation: glyphIndex];
|
theLine = [_fragmentRuns objectContainingLocation: glyphIndex];
|
||||||
if (theLine)
|
if (theLine)
|
||||||
{
|
{
|
||||||
(NSRange*)lineFragmentRange = &theLine->glyphRange;
|
if (lineFragmentRange != NULL)
|
||||||
|
{
|
||||||
|
*lineFragmentRange = theLine->glyphRange;
|
||||||
|
}
|
||||||
return theLine->lineFragmentRect;
|
return theLine->lineFragmentRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
(NSRange*)lineFragmentRange = NULL;
|
if (lineFragmentRange != NULL)
|
||||||
|
{
|
||||||
|
*lineFragmentRange = NSMakeRange (NSNotFound, 0);
|
||||||
|
}
|
||||||
return NSZeroRect;
|
return NSZeroRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2316,11 +2328,17 @@ textContainer(s) in containerRuns.", [_containerRuns count]);
|
||||||
theLine = [_fragmentRuns objectContainingLocation: glyphIndex];
|
theLine = [_fragmentRuns objectContainingLocation: glyphIndex];
|
||||||
if (theLine)
|
if (theLine)
|
||||||
{
|
{
|
||||||
(NSRange*)lineFragmentRange = &theLine->glyphRange;
|
if (lineFragmentRange != NULL)
|
||||||
|
{
|
||||||
|
*lineFragmentRange = theLine->glyphRange;
|
||||||
|
}
|
||||||
return theLine->usedRect;
|
return theLine->usedRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
(NSRange*)lineFragmentRange = NULL;
|
if (lineFragmentRange != NULL)
|
||||||
|
{
|
||||||
|
*lineFragmentRange = NSMakeRange (NSNotFound, 0);
|
||||||
|
}
|
||||||
return NSZeroRect;
|
return NSZeroRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue