summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-04-08 14:27:10 +0000
committerRüdiger Timm <rt@openoffice.org>2003-04-08 14:27:10 +0000
commit9a419f5e1053378ee317363f0013fbb73239c69d (patch)
tree2e8de757fccc073151db96f20bdf074c08c702ac /svx
parentd017d9bdf3bdc2aa2c6778e1e78b8a612541ef07 (diff)
INTEGRATION: CWS draw8 (1.28.4.1.36); FILE MERGED
2003/03/19 11:43:22 sj 1.28.4.1.36.1: #108274# swapping start and end arrow if arc is fliped
Diffstat (limited to 'svx')
-rw-r--r--svx/source/msfilter/msashape.cxx47
1 files changed, 45 insertions, 2 deletions
diff --git a/svx/source/msfilter/msashape.cxx b/svx/source/msfilter/msashape.cxx
index 4e6aeddb96c8..9868ed8cb5c5 100644
--- a/svx/source/msfilter/msashape.cxx
+++ b/svx/source/msfilter/msashape.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: msashape.cxx,v $
*
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
- * last change: $Author: hr $ $Date: 2003-03-27 15:03:39 $
+ * last change: $Author: rt $ $Date: 2003-04-08 15:27:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,24 @@
#ifndef _RTL_CRC_H_
#include <rtl/crc.h>
#endif
+#ifndef _SVX_XLNSTIT_HXX
+#include <svx/xlnstit.hxx>
+#endif
+#ifndef _SVX_XLNEDIT_HXX
+#include <svx/xlnedit.hxx>
+#endif
+#ifndef _SVX_XLNSTWIT_HXX
+#include <svx/xlnstwit.hxx>
+#endif
+#ifndef _SVX_XLNEDWIT_HXX
+#include <svx/xlnedwit.hxx>
+#endif
+#ifndef _SVX_XLNSTCIT_HXX
+#include <svx/xlnstcit.hxx>
+#endif
+#ifndef _SVX_XLNEDCIT_HXX
+#include <svx/xlnedcit.hxx>
+#endif
struct SvxMSDffVertPair
{
@@ -5694,6 +5712,26 @@ MSO_SPT SvxMSDffAutoShape::GetShapeTypeFromSdrObject( const SdrObject* pObj )
return eShapeType;
}
+void SvxMSDffAutoShape::SwapStartAndEndArrow( SdrObject* pObj ) //#108274
+{
+ XLineStartItem aLineStart;
+ aLineStart.SetValue(((XLineStartItem&)pObj->GetItem( XATTR_LINEEND )).GetValue());
+ XLineStartWidthItem aLineStartWidth(((XLineStartWidthItem&)pObj->GetItem( XATTR_LINEENDWIDTH )).GetValue());
+ XLineStartCenterItem aLineStartCenter(((XLineStartCenterItem&)pObj->GetItem( XATTR_LINEENDCENTER )).GetValue());
+
+ XLineEndItem aLineEnd;
+ aLineEnd.SetValue(((XLineEndItem&)pObj->GetItem( XATTR_LINESTART )).GetValue());
+ XLineEndWidthItem aLineEndWidth(((XLineEndWidthItem&)pObj->GetItem( XATTR_LINESTARTWIDTH )).GetValue());
+ XLineEndCenterItem aLineEndCenter(((XLineEndCenterItem&)pObj->GetItem( XATTR_LINESTARTCENTER )).GetValue());
+
+ pObj->SetItem( aLineStart );
+ pObj->SetItem( aLineStartWidth );
+ pObj->SetItem( aLineStartCenter );
+ pObj->SetItem( aLineEnd );
+ pObj->SetItem( aLineEndWidth );
+ pObj->SetItem( aLineEndCenter );
+}
+
SdrObject* SvxMSDffAutoShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet, sal_Bool bSetAutoShapeAdjustItem )
{
SdrObject* pRet = NULL;
@@ -5813,6 +5851,11 @@ SdrObject* SvxMSDffAutoShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet,
pObjCirc->SetModel( pSdrModel );
pObjCirc->SetItemSet( rSet );
+ int nSwap = bFlipH ? 1 : 0;
+ nSwap ^= bFlipV ? 1 : 0;
+ if ( nSwap )
+ SwapStartAndEndArrow( pObjCirc );
+
SdrRectObj* pRect = new SdrRectObj( aPolyArcRect );
pRect->SetSnapRect( aPolyArcRect );
pRect->SetModel( pSdrModel );