mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:50:48 +00:00
Work around bug in 2.91.66 compiler
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10484 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d5ea92ddf4
commit
0f13229ed9
1 changed files with 57 additions and 19 deletions
|
@ -2474,19 +2474,37 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
while ((o = [e nextObject]) != nil)
|
while ((o = [e nextObject]) != nil)
|
||||||
{
|
{
|
||||||
// FIXME: We have to convert this values for the subclass
|
// FIXME: We have to convert this values for the subclass
|
||||||
float oTop = [self convertPoint: NSMakePoint(0, oldTop)
|
|
||||||
toView: o].y;
|
float oTop, oBottom, oLimit;
|
||||||
float oBottom = [self convertPoint: NSMakePoint(0, bottom)
|
/* Don't ask me why, but gcc-2.91.66 crashes if we use
|
||||||
toView: o].y;
|
NSMakePoint in the following expressions. We avoid this
|
||||||
float oLimit = [self convertPoint: NSMakePoint(0, bottomLimit)
|
compiler internal bug by using an auxiliary aPoint
|
||||||
toView: o].y;
|
variable, and setting it manually to the NSPoints we
|
||||||
|
need. */
|
||||||
|
{
|
||||||
|
NSPoint aPoint = {0, oldTop};
|
||||||
|
oTop = ([self convertPoint: aPoint toView: o]).y;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
NSPoint aPoint = {0, bottom};
|
||||||
|
oBottom = ([self convertPoint: aPoint toView: o]).y;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
NSPoint aPoint = {0, bottomLimit};
|
||||||
|
oLimit = ([self convertPoint: aPoint toView: o]).y;
|
||||||
|
}
|
||||||
|
|
||||||
[o adjustPageHeightNew: &oBottom
|
[o adjustPageHeightNew: &oBottom
|
||||||
top: oTop
|
top: oTop
|
||||||
bottom: oBottom
|
bottom: oBottom
|
||||||
limit: oLimit];
|
limit: oLimit];
|
||||||
bottom = [self convertPoint: NSMakePoint(0, oBottom)
|
|
||||||
fromView: o].y;
|
{
|
||||||
|
NSPoint aPoint = {0, oBottom};
|
||||||
|
bottom = ([self convertPoint: aPoint fromView: o]).y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2508,19 +2526,39 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
while ((o = [e nextObject]) != nil)
|
while ((o = [e nextObject]) != nil)
|
||||||
{
|
{
|
||||||
// FIXME: We have to convert this values for the subclass
|
// FIXME: We have to convert this values for the subclass
|
||||||
float oLeft = [self convertPoint: NSMakePoint(oldLeft, 0)
|
|
||||||
toView: o].x;
|
|
||||||
float oRight = [self convertPoint: NSMakePoint(right, 0)
|
|
||||||
toView: o].x;
|
|
||||||
float oLimit = [self convertPoint: NSMakePoint(rightLimit, 0)
|
|
||||||
toView: o].x;
|
|
||||||
|
|
||||||
[o adjustPageWidthNew: &oRight
|
/* See comments in adjustPageHeightNew:top:bottom:limit:
|
||||||
left: oLeft
|
about why code is structured in this funny way. */
|
||||||
right: oRight
|
float oLeft, oRight, oLimit;
|
||||||
|
/* Don't ask me why, but gcc-2.91.66 crashes if we use
|
||||||
|
NSMakePoint in the following expressions. We avoid this
|
||||||
|
compiler internal bug by using an auxiliary aPoint
|
||||||
|
variable, and setting it manually to the NSPoints we
|
||||||
|
need. */
|
||||||
|
{
|
||||||
|
NSPoint aPoint = {oldLeft, 0};
|
||||||
|
oLeft = ([self convertPoint: aPoint toView: o]).x;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
NSPoint aPoint = {right, 0};
|
||||||
|
oRight = ([self convertPoint: aPoint toView: o]).x;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
NSPoint aPoint = {rightLimit, 0};
|
||||||
|
oLimit = ([self convertPoint: aPoint toView: o]).x;
|
||||||
|
}
|
||||||
|
|
||||||
|
[o adjustPageHeightNew: &oRight
|
||||||
|
top: oLeft
|
||||||
|
bottom: oRight
|
||||||
limit: oLimit];
|
limit: oLimit];
|
||||||
right = [self convertPoint: NSMakePoint(oRight, 0)
|
|
||||||
fromView: o].x;
|
{
|
||||||
|
NSPoint aPoint = {oRight, 0};
|
||||||
|
right = ([self convertPoint: aPoint fromView: o]).x;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue