Lines 1067-1074
Link Here
|
1067 |
// XShape |
1067 |
// XShape |
1068 |
|
1068 |
|
1069 |
//---------------------------------------------------------------------- |
1069 |
//---------------------------------------------------------------------- |
|
|
1070 |
// This code also existed in sch, and those duplicate symbols |
1071 |
// cause Bad Things To Happen (TM) #i9462#. Prefixing with 'svx'. |
1070 |
|
1072 |
|
1071 |
sal_Bool needLogicRectHack( SdrObject* pObj ) |
1073 |
sal_Bool svx_needLogicRectHack( SdrObject* pObj ) |
1072 |
{ |
1074 |
{ |
1073 |
if( pObj->GetObjInventor() == SdrInventor) |
1075 |
if( pObj->GetObjInventor() == SdrInventor) |
1074 |
{ |
1076 |
{ |
Lines 1096-1104
Link Here
|
1096 |
|
1098 |
|
1097 |
//---------------------------------------------------------------------- |
1099 |
//---------------------------------------------------------------------- |
1098 |
|
1100 |
|
1099 |
Rectangle getLogicRectHack( SdrObject* pObj ) |
1101 |
Rectangle svx_getLogicRectHack( SdrObject* pObj ) |
1100 |
{ |
1102 |
{ |
1101 |
if(needLogicRectHack(pObj)) |
1103 |
if(svx_needLogicRectHack(pObj)) |
1102 |
{ |
1104 |
{ |
1103 |
return pObj->GetSnapRect(); |
1105 |
return pObj->GetSnapRect(); |
1104 |
} |
1106 |
} |
Lines 1110-1118
Link Here
|
1110 |
|
1112 |
|
1111 |
//---------------------------------------------------------------------- |
1113 |
//---------------------------------------------------------------------- |
1112 |
|
1114 |
|
1113 |
void setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) |
1115 |
void svx_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) |
1114 |
{ |
1116 |
{ |
1115 |
if(needLogicRectHack(pObj)) |
1117 |
if(svx_needLogicRectHack(pObj)) |
1116 |
{ |
1118 |
{ |
1117 |
pObj->SetSnapRect( rRect ); |
1119 |
pObj->SetSnapRect( rRect ); |
1118 |
} |
1120 |
} |
Lines 1130-1136
Link Here
|
1130 |
|
1132 |
|
1131 |
if( pObj && pModel) |
1133 |
if( pObj && pModel) |
1132 |
{ |
1134 |
{ |
1133 |
Rectangle aRect( getLogicRectHack(pObj) ); |
1135 |
Rectangle aRect( svx_getLogicRectHack(pObj) ); |
1134 |
Point aPt( aRect.Left(), aRect.Top() ); |
1136 |
Point aPt( aRect.Left(), aRect.Top() ); |
1135 |
|
1137 |
|
1136 |
// Position is relativ to anchor, so recalc to absolut position |
1138 |
// Position is relativ to anchor, so recalc to absolut position |
Lines 1157-1163
Link Here
|
1157 |
// transformation matrix |
1159 |
// transformation matrix |
1158 |
if(!pObj->ISA(E3dCompoundObject)) |
1160 |
if(!pObj->ISA(E3dCompoundObject)) |
1159 |
{ |
1161 |
{ |
1160 |
Rectangle aRect( getLogicRectHack(pObj) ); |
1162 |
Rectangle aRect( svx_getLogicRectHack(pObj) ); |
1161 |
Point aLocalPos( Position.X, Position.Y ); |
1163 |
Point aLocalPos( Position.X, Position.Y ); |
1162 |
ForceMetricToItemPoolMetric(aLocalPos); |
1164 |
ForceMetricToItemPoolMetric(aLocalPos); |
1163 |
|
1165 |
|
Lines 1183-1189
Link Here
|
1183 |
|
1185 |
|
1184 |
if( pObj && pModel) |
1186 |
if( pObj && pModel) |
1185 |
{ |
1187 |
{ |
1186 |
Rectangle aRect( getLogicRectHack(pObj) ); |
1188 |
Rectangle aRect( svx_getLogicRectHack(pObj) ); |
1187 |
Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); |
1189 |
Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); |
1188 |
ForceMetricTo100th_mm(aObjSize); |
1190 |
ForceMetricTo100th_mm(aObjSize); |
1189 |
return ::com::sun::star::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() ); |
1191 |
return ::com::sun::star::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() ); |
Lines 1200-1206
Link Here
|
1200 |
|
1202 |
|
1201 |
if( pObj && pModel) |
1203 |
if( pObj && pModel) |
1202 |
{ |
1204 |
{ |
1203 |
Rectangle aRect( getLogicRectHack(pObj) ); |
1205 |
Rectangle aRect( svx_getLogicRectHack(pObj) ); |
1204 |
Size aLocalSize( rSize.Width, rSize.Height ); |
1206 |
Size aLocalSize( rSize.Width, rSize.Height ); |
1205 |
ForceMetricToItemPoolMetric(aLocalSize); |
1207 |
ForceMetricToItemPoolMetric(aLocalSize); |
1206 |
if(pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_MEASURE ) |
1208 |
if(pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_MEASURE ) |
Lines 1213-1219
Link Here
|
1213 |
else |
1215 |
else |
1214 |
{ |
1216 |
{ |
1215 |
aRect.SetSize(aLocalSize); |
1217 |
aRect.SetSize(aLocalSize); |
1216 |
setLogicRectHack( pObj, aRect ); |
1218 |
svx_setLogicRectHack( pObj, aRect ); |
1217 |
} |
1219 |
} |
1218 |
|
1220 |
|
1219 |
pModel->SetChanged(); |
1221 |
pModel->SetChanged(); |