Lines 161-169
Link Here
|
161 |
// XShape |
161 |
// XShape |
162 |
|
162 |
|
163 |
// the following 'Hack' methods are copied from svx/unodraw/unoshape.cxx |
163 |
// the following 'Hack' methods are copied from svx/unodraw/unoshape.cxx |
164 |
// they are needed as long as the drawing layer requires this |
164 |
// they are needed as long as the drawing layer requires this. Must |
|
|
165 |
// prefix these with 'sch' to make sure the symbols don't conflict with |
166 |
// those in svx and cause Bad Things To Happen (TM) #i9462# |
165 |
|
167 |
|
166 |
sal_Bool needLogicRectHack( SdrObject* pObj ) |
168 |
static sal_Bool sch_needLogicRectHack( SdrObject* pObj ) |
167 |
{ |
169 |
{ |
168 |
if( pObj->GetObjInventor() == SdrInventor) |
170 |
if( pObj->GetObjInventor() == SdrInventor) |
169 |
{ |
171 |
{ |
Lines 189-197
Link Here
|
189 |
return sal_False; |
191 |
return sal_False; |
190 |
} |
192 |
} |
191 |
|
193 |
|
192 |
Rectangle getLogicRectHack( SdrObject* pObj ) |
194 |
static Rectangle sch_getLogicRectHack( SdrObject* pObj ) |
193 |
{ |
195 |
{ |
194 |
if(needLogicRectHack(pObj)) |
196 |
if(sch_needLogicRectHack(pObj)) |
195 |
{ |
197 |
{ |
196 |
return pObj->GetSnapRect(); |
198 |
return pObj->GetSnapRect(); |
197 |
} |
199 |
} |
Lines 201-209
Link Here
|
201 |
} |
203 |
} |
202 |
} |
204 |
} |
203 |
|
205 |
|
204 |
void setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) |
206 |
static void sch_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) |
205 |
{ |
207 |
{ |
206 |
if(needLogicRectHack(pObj)) |
208 |
if(sch_needLogicRectHack(pObj)) |
207 |
{ |
209 |
{ |
208 |
pObj->SetSnapRect( rRect ); |
210 |
pObj->SetSnapRect( rRect ); |
209 |
} |
211 |
} |
Lines 244-250
Link Here
|
244 |
SdrObject* pObj = GetCurrentSdrObject(); |
246 |
SdrObject* pObj = GetCurrentSdrObject(); |
245 |
if( pObj ) |
247 |
if( pObj ) |
246 |
{ |
248 |
{ |
247 |
Rectangle aRect( getLogicRectHack( pObj )); |
249 |
Rectangle aRect( sch_getLogicRectHack( pObj )); |
248 |
Point aPt( aRect.Left(), aRect.Top() ); |
250 |
Point aPt( aRect.Left(), aRect.Top() ); |
249 |
|
251 |
|
250 |
// Position is relative to anchor - calculate absoulte position |
252 |
// Position is relative to anchor - calculate absoulte position |
Lines 277-283
Link Here
|
277 |
SdrObject* pObj = GetCurrentSdrObject(); |
279 |
SdrObject* pObj = GetCurrentSdrObject(); |
278 |
if( pObj ) |
280 |
if( pObj ) |
279 |
{ |
281 |
{ |
280 |
Rectangle aRect( getLogicRectHack( pObj ) ); |
282 |
Rectangle aRect( sch_getLogicRectHack( pObj ) ); |
281 |
Point aLocalPos( aPosition.X, aPosition.Y ); |
283 |
Point aLocalPos( aPosition.X, aPosition.Y ); |
282 |
|
284 |
|
283 |
// Position is absolute - position relative to anchor is required |
285 |
// Position is absolute - position relative to anchor is required |
Lines 309-315
Link Here
|
309 |
SdrObject* pObj = GetCurrentSdrObject(); |
311 |
SdrObject* pObj = GetCurrentSdrObject(); |
310 |
if( pObj ) |
312 |
if( pObj ) |
311 |
{ |
313 |
{ |
312 |
Rectangle aRect( getLogicRectHack( pObj )); |
314 |
Rectangle aRect( sch_getLogicRectHack( pObj )); |
313 |
Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); |
315 |
Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); |
314 |
return awt::Size( aObjSize.getWidth(), aObjSize.getHeight() ); |
316 |
return awt::Size( aObjSize.getWidth(), aObjSize.getHeight() ); |
315 |
} |
317 |
} |