summaryrefslogtreecommitdiff
path: root/editors/openoffice.org-1.1/files/patch-svx_setLogicRectHack
blob: 035db5e5e21c0f1a931e5872996769ee7b026e67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--- ../svx/source/unodraw/unoshape.cxx	4 Feb 2004 13:21:23 -0000	1.109
+++ ../svx/source/unodraw/unoshape.cxx	20 Feb 2004 00:43:50 -0000
@@ -1067,8 +1067,10 @@
 // XShape
 
 //----------------------------------------------------------------------
+// This code also existed in sch, and those duplicate symbols
+// cause Bad Things To Happen (TM)  #i9462#.  Prefixing with 'svx'.
 
-sal_Bool needLogicRectHack( SdrObject* pObj )
+static sal_Bool svx_needLogicRectHack( SdrObject* pObj )
 {
 	if( pObj->GetObjInventor() == SdrInventor)
 	{
@@ -1096,9 +1098,9 @@
 
 //----------------------------------------------------------------------
 
-Rectangle getLogicRectHack( SdrObject* pObj )
+static Rectangle svx_getLogicRectHack( SdrObject* pObj )
 {
-	if(needLogicRectHack(pObj))
+	if(svx_needLogicRectHack(pObj))
 	{
 		return pObj->GetSnapRect();
 	}
@@ -1110,9 +1112,9 @@
 
 //----------------------------------------------------------------------
 
-void setLogicRectHack( SdrObject* pObj, const Rectangle& rRect )
+static void svx_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect )
 {
-	if(needLogicRectHack(pObj))
+	if(svx_needLogicRectHack(pObj))
 	{
 		pObj->SetSnapRect( rRect );
 	}
@@ -1130,7 +1132,7 @@
 
 	if( pObj && pModel)
 	{
-		Rectangle aRect( getLogicRectHack(pObj) );
+		Rectangle aRect( svx_getLogicRectHack(pObj) );
 		Point aPt( aRect.Left(), aRect.Top() );
 
 		// Position is relativ to anchor, so recalc to absolut position
@@ -1157,7 +1159,7 @@
 		// transformation matrix
 		if(!pObj->ISA(E3dCompoundObject))
 		{
-			Rectangle aRect( getLogicRectHack(pObj) );
+			Rectangle aRect( svx_getLogicRectHack(pObj) );
 			Point aLocalPos( Position.X, Position.Y );
 			ForceMetricToItemPoolMetric(aLocalPos);
 
@@ -1183,7 +1185,7 @@
 
 	if( pObj && pModel)
 	{
-		Rectangle aRect( getLogicRectHack(pObj) );
+		Rectangle aRect( svx_getLogicRectHack(pObj) );
 		Size aObjSize( aRect.GetWidth(), aRect.GetHeight() );
 		ForceMetricTo100th_mm(aObjSize);
 		return ::com::sun::star::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() );
@@ -1200,7 +1202,7 @@
 
 	if( pObj && pModel)
 	{
-		Rectangle aRect( getLogicRectHack(pObj) );
+		Rectangle aRect( svx_getLogicRectHack(pObj) );
 		Size aLocalSize( rSize.Width, rSize.Height );
 		ForceMetricToItemPoolMetric(aLocalSize);
 		if(pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_MEASURE )
@@ -1213,7 +1215,7 @@
 		else
 		{
 			aRect.SetSize(aLocalSize);
-			setLogicRectHack( pObj, aRect );
+			svx_setLogicRectHack( pObj, aRect );
 		}
 
 		pModel->SetChanged();