diff options
author | Caolán McNamara <cmc@openoffice.org> | 2001-09-18 08:52:58 +0000 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2001-09-18 08:52:58 +0000 |
commit | 05c0f064e017009e1452b8814517db62316a4f20 (patch) | |
tree | b6f14a77346dadb43de41ca17e2d938dd3837306 /svx/source | |
parent | 6bb26a8ddbcc0b491680a6ceb429dec697fe22fb (diff) |
#92104# displaced escher groups fixes
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/msfilter/eschesdo.cxx | 38 | ||||
-rw-r--r-- | svx/source/msfilter/eschesdo.hxx | 5 |
2 files changed, 27 insertions, 16 deletions
diff --git a/svx/source/msfilter/eschesdo.cxx b/svx/source/msfilter/eschesdo.cxx index ace956b602cb..af882cd692a1 100644 --- a/svx/source/msfilter/eschesdo.cxx +++ b/svx/source/msfilter/eschesdo.cxx @@ -2,9 +2,9 @@ * * $RCSfile: eschesdo.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: jp $ $Date: 2001-03-16 16:14:31 $ + * last change: $Author: cmc $ $Date: 2001-09-18 09:52:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -362,6 +362,22 @@ void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherProperty ImplWriteTextBundle( rObj, aPropOpt ); \ } +//Map from twips to export units, generally twips as well, only excel and word +//export is happening here, so native units are export units, leave as +//placeholder if required in future +void ImplEESdrWriter::MapRect(ImplEESdrObject& rObj) +{ +#if 0 + Rectangle aNewRect=rObj.GetRect(); + MapMode aOrig = maMapModeSrc; + maMapModeSrc = MapMode( MAP_INCH, Point(), + Fraction(1,EES_MAP_FRACTION), Fraction(1,EES_MAP_FRACTION)); + rObj.SetRect( ImplMapPoint(aNewRect.TopLeft()), + ImplMapSize(aNewRect.GetSize()) ); + maMapModeSrc = aOrig; +#endif +} + UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, EscherSolverContainer& rSolverContainer, ImplEESdrPageType ePageType ) @@ -531,8 +547,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, } break; } - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), - ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); + MapRect(rObj); } ImplWriteTextBundle( rObj, aPropOpt ); } @@ -641,8 +656,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, { ::com::sun::star::awt::Rectangle aNewRect; aPropOpt.CreatePolygonProperties( rObj.mXPropSet, ESCHER_CREATEPOLYGON_LINE, sal_False, aNewRect, NULL ); - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), - ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); + MapRect(rObj); if( rObj.ImplHasText() ) { aTextRefPoint = rObj.GetRect().TopLeft(); @@ -673,8 +687,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt ::com::sun::star::awt::Rectangle aNewRect; aPropOpt.CreatePolygonProperties( rObj.mXPropSet, ESCHER_CREATEPOLYGON_POLYPOLYGON, sal_False, aNewRect, NULL ); - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), - ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); + MapRect(rObj); aPropOpt.CreateFillProperties( rObj.mXPropSet, sal_True ); rObj.SetAngle( 0 ); } @@ -689,8 +702,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt ::com::sun::star::awt::Rectangle aNewRect; aPropOpt.CreatePolygonProperties( rObj.mXPropSet, ESCHER_CREATEPOLYGON_POLYLINE, sal_False, aNewRect, NULL ); - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), - ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); + MapRect(rObj); aPropOpt.CreateLineProperties( rObj.mXPropSet, sal_False ); rObj.SetAngle( 0 ); } @@ -705,8 +717,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt ::com::sun::star::awt::Rectangle aNewRect; aPropOpt.CreatePolygonProperties( rObj.mXPropSet, ESCHER_CREATEPOLYGON_POLYLINE, sal_True, aNewRect, NULL ); - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), - ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); + MapRect(rObj); aPropOpt.CreateLineProperties( rObj.mXPropSet, sal_False ); rObj.SetAngle( 0 ); } @@ -721,8 +732,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt ::com::sun::star::awt::Rectangle aNewRect; aPropOpt.CreatePolygonProperties( rObj.mXPropSet, ESCHER_CREATEPOLYGON_POLYPOLYGON, sal_True, aNewRect, NULL ); - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), - ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); + MapRect(rObj); aPropOpt.CreateFillProperties( rObj.mXPropSet, sal_True ); rObj.SetAngle( 0 ); } diff --git a/svx/source/msfilter/eschesdo.hxx b/svx/source/msfilter/eschesdo.hxx index 5923da0aa2f6..8314e6bf8ba0 100644 --- a/svx/source/msfilter/eschesdo.hxx +++ b/svx/source/msfilter/eschesdo.hxx @@ -2,9 +2,9 @@ * * $RCSfile: eschesdo.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: sj $ $Date: 2001-01-23 09:36:28 $ + * last change: $Author: cmc $ $Date: 2001-09-18 09:52:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -215,6 +215,7 @@ public: Point ImplMapPoint( const Point& rPoint ); Size ImplMapSize( const Size& rSize ); EscherExHostAppData* ImplGetHostData() { return mpHostAppData; } + void MapRect(ImplEESdrObject& rObj); }; |