summaryrefslogtreecommitdiff
path: root/editors/openoffice.org-1.1-devel/files/patch-sch_setLogicRectHack
blob: 44de26bd9cfd9cb8a779f4f983b0c39a9c91d491 (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
#iZ 9462

--- sch/source/ui/unoidl/ChXChartObject.cxx.orig	7 Aug 2002 16:01:42 -0000	1.34
+++ sch/source/ui/unoidl/ChXChartObject.cxx	20 Feb 2004 00:43:10 -0000
@@ -161,9 +161,11 @@
 // XShape
 
 // the following 'Hack' methods are copied from svx/unodraw/unoshape.cxx
-// they are needed as long as the drawing layer requires this
+// they are needed as long as the drawing layer requires this.  Must
+// prefix these with 'sch' to make sure the symbols don't conflict with
+// those in svx and cause Bad Things To Happen (TM)  #i9462#
 
-sal_Bool needLogicRectHack( SdrObject* pObj )
+static sal_Bool sch_needLogicRectHack( SdrObject* pObj )
 {
 	if( pObj->GetObjInventor() == SdrInventor)
 	{
@@ -189,9 +191,9 @@
 	return sal_False;
 }
 
-Rectangle getLogicRectHack( SdrObject* pObj )
+static Rectangle sch_getLogicRectHack( SdrObject* pObj )
 {
-	if(needLogicRectHack(pObj))
+	if(sch_needLogicRectHack(pObj))
 	{
 		return pObj->GetSnapRect();
 	}
@@ -201,9 +203,9 @@
 	}
 }
 
-void setLogicRectHack( SdrObject* pObj, const Rectangle& rRect )
+static void sch_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect )
 {
-	if(needLogicRectHack(pObj))
+	if(sch_needLogicRectHack(pObj))
 	{
 		pObj->SetSnapRect( rRect );
 	}
@@ -244,7 +246,7 @@
 	SdrObject* pObj = GetCurrentSdrObject();
 	if( pObj )
 	{
-		Rectangle aRect( getLogicRectHack( pObj ));
+		Rectangle aRect( sch_getLogicRectHack( pObj ));
 		Point aPt( aRect.Left(), aRect.Top() );
 
 		// Position is relative to anchor - calculate absoulte position
@@ -277,7 +279,7 @@
 	SdrObject* pObj = GetCurrentSdrObject();
 	if( pObj )
 	{
-		Rectangle aRect( getLogicRectHack( pObj ) );
+		Rectangle aRect( sch_getLogicRectHack( pObj ) );
 		Point aLocalPos( aPosition.X, aPosition.Y );
 
 		// Position is absolute - position relative to anchor is required
@@ -309,7 +311,7 @@
 	SdrObject* pObj = GetCurrentSdrObject();
 	if( pObj )
 	{
-		Rectangle aRect( getLogicRectHack( pObj ));
+		Rectangle aRect( sch_getLogicRectHack( pObj ));
 		Size aObjSize( aRect.GetWidth(), aRect.GetHeight() );
 		return awt::Size( aObjSize.getWidth(), aObjSize.getHeight() );
 	}