incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1353473 [1/2] - in /incubator/ooo/branches/alg/aw080/main: filter/inc/filter/msfilter/ filter/source/msfilter/ oox/inc/oox/export/ sc/source/filter/excel/ sc/source/filter/inc/ sc/source/filter/xcl97/ sd/source/filter/eppt/ svx/source/svdr...
Date Mon, 25 Jun 2012 11:44:16 GMT
Author: alg
Date: Mon Jun 25 11:44:13 2012
New Revision: 1353473

URL: http://svn.apache.org/viewvc?rev=1353473&view=rev
Log:
aw080: use B2DRange for escher engine im/export, this will work since the rects used there do not include mirroring and/or rotations anyways

Modified:
    incubator/ooo/branches/alg/aw080/main/filter/inc/filter/msfilter/escherex.hxx
    incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx
    incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.cxx
    incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.hxx
    incubator/ooo/branches/alg/aw080/main/oox/inc/oox/export/vmlexport.hxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xeescher.cxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xiescher.cxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xlescher.cxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97esc.hxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97rec.hxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xeescher.hxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xlescher.hxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97esc.cxx
    incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97rec.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.hxx
    incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/epptso.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/escherex.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/escherex.hxx
    incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdoedge.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/filter/ww8/escher.hxx
    incubator/ooo/branches/alg/aw080/main/sw/source/filter/ww8/wrtw8esh.cxx

Modified: incubator/ooo/branches/alg/aw080/main/filter/inc/filter/msfilter/escherex.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/filter/inc/filter/msfilter/escherex.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/filter/inc/filter/msfilter/escherex.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/filter/inc/filter/msfilter/escherex.hxx Mon Jun 25 11:44:13 2012
@@ -1094,8 +1094,7 @@ class MSFILTER_DLLPUBLIC EscherGraphicPr
 		sal_uInt32	GetBlibID( 
             SvStream& rPicOutStream, 
             const ByteString& rGraphicId, 
-            const basegfx::B2DPoint& rObjectPosition, 
-            const basegfx::B2DVector& rObjectScale,
+            const basegfx::B2DRange& rObjectRange,
 			const com::sun::star::awt::Rectangle* pVisArea = NULL, 
             const GraphicAttr* pGrafikAttr = NULL );
 		sal_Bool	HasGraphics() const { return mnBlibEntrys != 0; };
@@ -1157,9 +1156,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyC
 {
 		EscherGraphicProvider*	pGraphicProvider;
 		SvStream*				pPicOutStrm;
-        basegfx::B2DPoint*      mpObjectPosition;
-        basegfx::B2DVector*     mpObjectScale;
-
+        basegfx::B2DRange*      mpObjectRange;
 		EscherPropSortStruct*	pSortStruct;
 
 		sal_uInt32				nSortCount;
@@ -1183,8 +1180,8 @@ class MSFILTER_DLLPUBLIC EscherPropertyC
 		EscherPropertyContainer(
 			EscherGraphicProvider& rGraphicProvider,	// the PropertyContainer needs to know
 			SvStream* pPicOutStrm,				        // the GraphicProvider to be able to write
-            basegfx::B2DPoint& rObjectPosition,         // FillBitmaps or GraphicObjects.
-            basegfx::B2DVector& rObjectScale);          // under some cirumstances the ShapeBoundRect is adjusted
+            basegfx::B2DRange& rObjectRange);           // FillBitmaps or GraphicObjects.
+                                                        // under some cirumstances the ShapeBoundRect is adjusted
 														// this will happen when rotated GraphicObjects
 														// are saved to PowerPoint
 		~EscherPropertyContainer();
@@ -1311,8 +1308,7 @@ public:
 								/// record data written to rEx.GetStream()
 	virtual	void				WriteData( 
                                     EscherEx& rEx,
-									const basegfx::B2DPoint& rObjectPosition, 
-                                    const basegfx::B2DVector& rObjectScale) = 0;
+                                    const basegfx::B2DRange& rObjectRange) = 0;
 };
 
 
@@ -1345,8 +1341,8 @@ public:
 		EscherExClientRecord_Base* GetClientTextbox() const
 			{ return pClientTextbox; }
 
-		void WriteClientAnchor( EscherEx& rEx, const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale )
-			{ if( pClientAnchor ) 	pClientAnchor->WriteData( rEx, rObjectPosition, rObjectScale ); }
+		void WriteClientAnchor( EscherEx& rEx, const basegfx::B2DRange& rObjectRange )
+			{ if( pClientAnchor ) 	pClientAnchor->WriteData( rEx, rObjectRange ); }
 		void WriteClientData( EscherEx& rEx )
 			{ if( pClientData ) 	pClientData->WriteData( rEx ); }
 		void WriteClientTextbox( EscherEx& rEx )
@@ -1541,28 +1537,22 @@ public:
 		virtual void EndAtom( sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
 		virtual void AddAtom( sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
 		virtual void AddChildAnchor(
-            const basegfx::B2DPoint& rObjectPosition,
-            const basegfx::B2DVector& rObjectScale);
+            const basegfx::B2DRange& rObjectRange);
 		virtual void AddClientAnchor(
-            const basegfx::B2DPoint& rObjectPosition,
-            const basegfx::B2DVector& rObjectScale);
+            const basegfx::B2DRange& rObjectRange);
 
 		virtual sal_uInt32 EnterGroup( 
             const String& rShapeName, 
-            const basegfx::B2DPoint* pObjectPosition = 0,
-            const basegfx::B2DVector* pObjectScale = 0 );
+            const basegfx::B2DRange* pObjectRange = 0);
 		sal_uInt32	EnterGroup( 
-            const basegfx::B2DPoint* pObjectPosition = 0,
-            const basegfx::B2DVector* pObjectScale = 0 );
+            const basegfx::B2DRange* pObjectRange = 0);
 		sal_uInt32	GetGroupLevel() const { return mnGroupLevel; };
 		virtual sal_Bool SetGroupSnapPositionAndScale( 
             sal_uInt32 nGroupLevel, 
-            const basegfx::B2DPoint& rObjectPosition,
-            const basegfx::B2DVector& rObjectScale);
+            const basegfx::B2DRange& rObjectRange);
 		virtual sal_Bool SetGroupLogicPositionAndScale( 
             sal_uInt32 nGroupLevel, 
-            const basegfx::B2DPoint& rObjectPosition,
-            const basegfx::B2DVector& rObjectScale);
+            const basegfx::B2DRange& rObjectRange);
 		virtual void LeaveGroup();
 
 				// ein ESCHER_Sp wird geschrieben ( Ein ESCHER_DgContainer muss dazu geoeffnet sein !!)
@@ -1570,8 +1560,7 @@ public:
 
 		virtual void Commit( 
             EscherPropertyContainer& rProps, 
-            const basegfx::B2DPoint& rObjectPosition,
-            const basegfx::B2DVector& rObjectScale);
+            const basegfx::B2DRange& rObjectRange);
 
 		sal_uInt32	GetColor( const sal_uInt32 nColor, sal_Bool bSwap = sal_True );
 		sal_uInt32	GetColor( const Color& rColor, sal_Bool bSwap = sal_True );
@@ -1594,8 +1583,7 @@ public:
 				/// shape is ignored.
     virtual EscherExHostAppData* StartShape(
                             const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape,
-                            const basegfx::B2DPoint* pObjectPosition,
-                            const basegfx::B2DVector* pObjectScale);
+                            const basegfx::B2DRange* pObjectRange);
 
 				/// Called after a shape is written to inform the application
 				/// of the resulted shape type and ID.

Modified: incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/escherex.cxx Mon Jun 25 11:44:13 2012
@@ -169,13 +169,11 @@ EscherPropertyContainer::EscherPropertyC
 EscherPropertyContainer::EscherPropertyContainer(
 	EscherGraphicProvider& rGraphProv,
     SvStream* pPiOutStrm,
-	basegfx::B2DPoint& rObjectPosition,         // FillBitmaps or GraphicObjects.
-    basegfx::B2DVector& rObjectScale) :
+	basegfx::B2DRange& rObjectRange) :         // FillBitmaps or GraphicObjects.
 
 	pGraphicProvider	( &rGraphProv ),
 	pPicOutStrm			( pPiOutStrm ),
-    mpObjectPosition(&rObjectPosition),
-    mpObjectScale(&rObjectScale)
+    mpObjectRange(&rObjectRange)
 {
 	ImplInit();
 }
@@ -1174,7 +1172,7 @@ sal_Bool EscherPropertyContainer::Create
 					AddOpt( ESCHER_Prop_fillType, ESCHER_FillPicture );
 					uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
 
-					if ( pGraphicProvider && pPicOutStrm && mpObjectPosition && mpObjectScale && aXPropSet.is() )
+					if ( pGraphicProvider && pPicOutStrm && mpObjectRange && aXPropSet.is() )
 					{
 						::com::sun::star::uno::Any aAny;
 						::com::sun::star::awt::Rectangle* pVisArea = NULL;
@@ -1184,10 +1182,10 @@ sal_Bool EscherPropertyContainer::Create
 							aAny >>= (*pVisArea);
 						}
 
-                        const basegfx::B2DPoint aPoint(0.0, 0.0);
-                        const basegfx::B2DVector aVector(*mpObjectScale);
-						sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aPoint, aVector, pVisArea, NULL );
-						if ( nBlibId )
+                        const basegfx::B2DRange aRange(0.0, 0.0, mpObjectRange->getWidth(), mpObjectRange->getHeight());
+						const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRange, pVisArea, NULL));
+						
+                        if ( nBlibId )
 						{
 							AddOpt( ESCHER_Prop_pib, nBlibId, sal_True );
 							ImplCreateGraphicAttributes( aXPropSet, nBlibId, sal_False );
@@ -1209,10 +1207,9 @@ sal_Bool EscherPropertyContainer::ImplCr
     {
         EscherGraphicProvider aProvider;
         SvMemoryStream aMemStrm;
-        const basegfx::B2DPoint aPoint(0.0, 0.0);
-        const basegfx::B2DVector aVector(1.0, 1.0);
+        const basegfx::B2DRange aRange(0.0, 0.0, 1.0, 1.0);
 
-        if ( aProvider.GetBlibID( aMemStrm, rUniqueId, aPoint, aVector ) )
+        if(aProvider.GetBlibID(aMemStrm, rUniqueId, aRange))
         {
             // grab BLIP from stream and insert directly as complex property
             // ownership of stream memory goes to complex property
@@ -1481,16 +1478,20 @@ sal_Bool EscherPropertyContainer::Create
                 else
                 {
                     pGraphicAttr->SetRotation( nAngle );
-                    if ( nAngle && mpObjectPosition && mpObjectScale )   // up to xp ppoint does not rotate bitmaps !
+                    if ( nAngle && mpObjectRange )   // up to xp ppoint does not rotate bitmaps !
                     {
-						Rectangle aOldRect(
-							Point(basegfx::fround(mpObjectPosition->getX()), basegfx::fround(mpObjectPosition->getY())), 
-							Size(basegfx::fround(mpObjectScale->getX()), basegfx::fround(mpObjectScale->getY())));
-                        Polygon aPoly( aOldRect );
-                        aPoly.Rotate( aOldRect.TopLeft(), nAngle );
-                        aOldRect = aPoly.GetBoundRect();
-                        *mpObjectPosition = basegfx::B2DPoint(aOldRect.Left(), aOldRect.Top());
-                        *mpObjectScale = basegfx::B2DVector(aOldRect.GetWidth(), aOldRect.GetHeight());
+                        mpObjectRange->transform( // TTTT check if this is the same as below
+                            basegfx::tools::createRotateAroundPoint(
+                                mpObjectRange->getMinimum(),
+                                nAngle * F_PI1800)); // nAngle is in 1/10th degree
+						//Rectangle aOldRect(
+						//	Point(basegfx::fround(mpObjectPosition->getX()), basegfx::fround(mpObjectPosition->getY())), 
+						//	Size(basegfx::fround(mpObjectScale->getX()), basegfx::fround(mpObjectScale->getY())));
+                        //Polygon aPoly( aOldRect );
+                        //aPoly.Rotate( aOldRect.TopLeft(), nAngle );
+                        //aOldRect = aPoly.GetBoundRect();
+                        //*mpObjectPosition = basegfx::B2DPoint(aOldRect.Left(), aOldRect.Top());
+                        //*mpObjectScale = basegfx::B2DVector(aOldRect.GetWidth(), aOldRect.GetHeight());
                         bSuppressRotation = sal_True;
                     }
                 }
@@ -1504,13 +1505,11 @@ sal_Bool EscherPropertyContainer::Create
             if ( aUniqueId.Len() )
             {
                 // write out embedded graphic
-                if ( pGraphicProvider && pPicOutStrm && mpObjectPosition && mpObjectScale )
+                if ( pGraphicProvider && pPicOutStrm && mpObjectRange )
                 {
-                    const basegfx::B2DPoint aPoint(0.0, 0.0);
-                    const basegfx::B2DVector aVector(*mpObjectScale);
+                    const basegfx::B2DRange aRange(0.0, 0.0, mpObjectRange->getWidth(), mpObjectRange->getHeight());
+                    const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRange, NULL, pGraphicAttr));
 
-                    sal_uInt32 nBlibId = 0;
-                    nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aPoint, aVector, NULL, pGraphicAttr );
                     if ( nBlibId )
                     {
                         if ( bCreateFillBitmap )
@@ -1527,10 +1526,9 @@ sal_Bool EscherPropertyContainer::Create
                 {
                     EscherGraphicProvider aProvider;
                     SvMemoryStream aMemStrm;
-                    const basegfx::B2DPoint aPoint(0.0, 0.0);
-                    const basegfx::B2DVector aVector(1.0, 1.0);
+                    const basegfx::B2DRange aRange(0.0, 0.0, mpObjectRange->getWidth(), mpObjectRange->getHeight());
 
-                    if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aPoint, aVector, NULL, pGraphicAttr ) )
+                    if(aProvider.GetBlibID(aMemStrm, aUniqueId, aRange, NULL, pGraphicAttr))
                     {
                         // grab BLIP from stream and insert directly as complex property
                         // ownership of stream memory goes to complex property
@@ -3797,8 +3795,7 @@ sal_Bool EscherGraphicProvider::GetPrefS
 sal_uInt32 EscherGraphicProvider::GetBlibID( 
     SvStream& rPicOutStrm, 
     const ByteString& rId,
-	const basegfx::B2DPoint& /*rObjectPosition*/, 
-    const basegfx::B2DVector& /*rObjectScale*/,
+    const basegfx::B2DRange& /*rObjectRange*/,
     const com::sun::star::awt::Rectangle* pVisArea, 
     const GraphicAttr* pGraphicAttr )
 {
@@ -4824,29 +4821,27 @@ void EscherEx::AddAtom( sal_uInt32 nAtom
 // ---------------------------------------------------------------------------------------------
 
 void EscherEx::AddChildAnchor(
-    const basegfx::B2DPoint& rObjectPosition,
-    const basegfx::B2DVector& rObjectScale)
+    const basegfx::B2DRange& rObjectRange)
 {
     AddAtom( 16, ESCHER_ChildAnchor );
-    *mpOutStrm  << (sal_Int32)basegfx::fround(rObjectPosition.getX())
-                << (sal_Int32)basegfx::fround(rObjectPosition.getY())
-                << (sal_Int32)basegfx::fround(rObjectPosition.getX() + rObjectScale.getX())
-                << (sal_Int32)basegfx::fround(rObjectPosition.getY() + rObjectScale.getX());
+    *mpOutStrm  << (sal_Int32)basegfx::fround(rObjectRange.getMinX())
+                << (sal_Int32)basegfx::fround(rObjectRange.getMinY())
+                << (sal_Int32)basegfx::fround(rObjectRange.getMaxX())
+                << (sal_Int32)basegfx::fround(rObjectRange.getMaxY());
 }
 
 // ---------------------------------------------------------------------------------------------
 
 void EscherEx::AddClientAnchor(
-    const basegfx::B2DPoint& rObjectPosition,
-    const basegfx::B2DVector& rObjectScale)
+    const basegfx::B2DRange& rObjectRange)
 {
 	AddAtom( 8, ESCHER_ClientAnchor );
 	// Askes SJ, here it is CORRECT to first write Y, then X (!)
 	// Do NOT change this, it's NOT a typo (!)
-    *mpOutStrm << (sal_Int16)basegfx::fround(rObjectPosition.getY())
-               << (sal_Int16)basegfx::fround(rObjectPosition.getX())
-               << (sal_Int16)basegfx::fround(rObjectPosition.getX() + rObjectScale.getX())
-               << (sal_Int16)basegfx::fround(rObjectPosition.getY() + rObjectScale.getY());
+    *mpOutStrm << (sal_Int16)basegfx::fround(rObjectRange.getMinY())
+               << (sal_Int16)basegfx::fround(rObjectRange.getMinX())
+               << (sal_Int16)basegfx::fround(rObjectRange.getMaxX())
+               << (sal_Int16)basegfx::fround(rObjectRange.getMaxY());
 }
 
 // ---------------------------------------------------------------------------------------------
@@ -4860,20 +4855,13 @@ EscherExHostAppData* EscherEx::EnterAddi
 
 sal_uInt32 EscherEx::EnterGroup( 
     const String& rShapeName, 
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale )
+    const basegfx::B2DRange* pObjectRange)
 {
-    basegfx::B2DPoint aObjectPosition(0.0, 0.0);
-    basegfx::B2DVector aObjectScale(1.0, 1.0);
+    basegfx::B2DRange aObjectRange(0.0, 0.0, 1.0, 1.0);
 
-    if(pObjectPosition)
+    if(pObjectRange)
     {
-        aObjectPosition = *pObjectPosition;
-    }
-
-    if(pObjectScale)
-    {
-        aObjectScale = *pObjectScale;
+        aObjectRange = *pObjectRange;
     }
 
 	OpenContainer( ESCHER_SpgrContainer );
@@ -4881,10 +4869,10 @@ sal_uInt32 EscherEx::EnterGroup( 
 	AddAtom( 16, ESCHER_Spgr, 1 );
 	PtReplaceOrInsert( ESCHER_Persist_Grouping_Snap | mnGroupLevel,
 						mpOutStrm->Tell() );
-	*mpOutStrm	<< (sal_Int32)basegfx::fround(aObjectPosition.getX())	// Bounding box fuer die Gruppierten shapes an die sie attached werden
-				<< (sal_Int32)basegfx::fround(aObjectPosition.getY())
-				<< (sal_Int32)basegfx::fround(aObjectPosition.getX() + aObjectScale.getX())
-				<< (sal_Int32)basegfx::fround(aObjectPosition.getY() + aObjectScale.getY());
+	*mpOutStrm	<< (sal_Int32)basegfx::fround(aObjectRange.getMinX())	// Bounding box fuer die Gruppierten shapes an die sie attached werden
+				<< (sal_Int32)basegfx::fround(aObjectRange.getMinY())
+				<< (sal_Int32)basegfx::fround(aObjectRange.getMaxX())
+				<< (sal_Int32)basegfx::fround(aObjectRange.getMaxY());
 
     sal_uInt32 nShapeId = GenerateShapeId();
 	if ( !mnGroupLevel )
@@ -4901,15 +4889,15 @@ sal_uInt32 EscherEx::EnterGroup( 
         if( rShapeName.Len() > 0 )
             aPropOpt.AddOpt( ESCHER_Prop_wzName, rShapeName );
 
-		Commit( aPropOpt, aObjectPosition, aObjectScale );
+		Commit( aPropOpt, aObjectRange );
 		if ( mnGroupLevel > 1 )
-            AddChildAnchor( aObjectPosition, aObjectScale );
+            AddChildAnchor( aObjectRange );
 
 		EscherExHostAppData* pAppData = mpImplEscherExSdr->ImplGetHostData();
 		if( pAppData )
 		{
 			if ( mnGroupLevel <= 1 )
-				pAppData->WriteClientAnchor( *this, aObjectPosition, aObjectScale );
+				pAppData->WriteClientAnchor( *this, aObjectRange );
 			pAppData->WriteClientData( *this );
 		}
 	}
@@ -4919,18 +4907,16 @@ sal_uInt32 EscherEx::EnterGroup( 
 }
 
 sal_uInt32 EscherEx::EnterGroup(
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale)
+    const basegfx::B2DRange* pObjectRange)
 {
-    return EnterGroup( String::EmptyString(), pObjectPosition, pObjectScale );
+    return EnterGroup( String::EmptyString(), pObjectRange );
 }
 
 // ---------------------------------------------------------------------------------------------
 
 sal_Bool EscherEx::SetGroupSnapPositionAndScale( 
     sal_uInt32 nGroupLevel, 
-    const basegfx::B2DPoint& rObjectPosition,
-    const basegfx::B2DVector& rObjectScale)
+    const basegfx::B2DRange& rObjectRange)
 {
 	sal_Bool bRetValue = sal_False;
 	if ( nGroupLevel )
@@ -4938,10 +4924,10 @@ sal_Bool EscherEx::SetGroupSnapPositionA
 		sal_uInt32 nCurrentPos = mpOutStrm->Tell();
 		if ( DoSeek( ESCHER_Persist_Grouping_Snap | ( nGroupLevel - 1 ) ) )
 		{
-			*mpOutStrm	<< (sal_Int32)basegfx::fround(rObjectPosition.getX())	// Bounding box fuer die Gruppierten shapes an die sie attached werden
-						<< (sal_Int32)basegfx::fround(rObjectPosition.getY())
-						<< (sal_Int32)basegfx::fround(rObjectPosition.getX() + rObjectScale.getX())
-						<< (sal_Int32)basegfx::fround(rObjectPosition.getY() + rObjectScale.getY());
+			*mpOutStrm	<< (sal_Int32)basegfx::fround(rObjectRange.getMinX())	// Bounding box fuer die Gruppierten shapes an die sie attached werden
+						<< (sal_Int32)basegfx::fround(rObjectRange.getMinY())
+						<< (sal_Int32)basegfx::fround(rObjectRange.getMaxX())
+						<< (sal_Int32)basegfx::fround(rObjectRange.getMaxY());
 			mpOutStrm->Seek( nCurrentPos );
 		}
 	}
@@ -4952,8 +4938,7 @@ sal_Bool EscherEx::SetGroupSnapPositionA
 
 sal_Bool EscherEx::SetGroupLogicPositionAndScale( 
     sal_uInt32 nGroupLevel, 
-    const basegfx::B2DPoint& rObjectPosition,
-    const basegfx::B2DVector& rObjectScale)
+    const basegfx::B2DRange& rObjectRange)
 {
 	sal_Bool bRetValue = sal_False;
 	if ( nGroupLevel )
@@ -4961,10 +4946,10 @@ sal_Bool EscherEx::SetGroupLogicPosition
 		sal_uInt32 nCurrentPos = mpOutStrm->Tell();
 		if ( DoSeek( ESCHER_Persist_Grouping_Logic | ( nGroupLevel - 1 ) ) )
 		{
-			*mpOutStrm << (sal_Int16)basegfx::fround(rObjectPosition.getX()) 
-					   << (sal_Int16)basegfx::fround(rObjectPosition.getY()) 
-					   << (sal_Int16)basegfx::fround(rObjectPosition.getX() + rObjectScale.getX()) 
-					   << (sal_Int16)basegfx::fround(rObjectPosition.getY() + rObjectScale.getY());
+			*mpOutStrm << (sal_Int16)basegfx::fround(rObjectRange.getMinX()) 
+					   << (sal_Int16)basegfx::fround(rObjectRange.getMinY()) 
+					   << (sal_Int16)basegfx::fround(rObjectRange.getMaxX()) 
+					   << (sal_Int16)basegfx::fround(rObjectRange.getMaxY());
 			mpOutStrm->Seek( nCurrentPos );
 		}
 	}
@@ -5002,8 +4987,7 @@ void EscherEx::AddShape( sal_uInt32 nShp
 
 void EscherEx::Commit( 
     EscherPropertyContainer& rProps, 
-    const basegfx::B2DPoint& /*rObjectPosition*/,
-    const basegfx::B2DVector& /*rObjectScale*/)
+    const basegfx::B2DRange& /*rObjectRange*/)
 {
 	rProps.Commit( GetStream() );
 }

Modified: incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.cxx Mon Jun 25 11:44:13 2012
@@ -101,34 +101,53 @@ void ImplEESdrWriter::implPrepareLogicTo
 }
 
 // -------------------------------------------------------------------
+// TTTT not needed?
+//basegfx::B2DPoint ImplEESdrWriter::ImplMapB2DPoint( const basegfx::B2DPoint& rB2DPoint )
+//{
+//	if(maMapModeSrc == maMapModeDest)
+//	{
+//		return rB2DPoint;
+//	}
+//	else
+//	{
+//		implPrepareLogicToLogic();
+//
+//		return maLogicToLogic * rB2DPoint;
+//	}
+//}
 
-basegfx::B2DPoint ImplEESdrWriter::ImplMapB2DPoint( const basegfx::B2DPoint& rB2DPoint )
+// -------------------------------------------------------------------
+
+basegfx::B2DVector ImplEESdrWriter::ImplMapB2DVector( const basegfx::B2DVector& rB2DVector )
 {
 	if(maMapModeSrc == maMapModeDest)
 	{
-		return rB2DPoint;
+		return rB2DVector;
 	}
 	else
-	{
+{
 		implPrepareLogicToLogic();
 
-		return maLogicToLogic * rB2DPoint;
+		return maLogicToLogic * rB2DVector;
 	}
 }
 
 // -------------------------------------------------------------------
 
-basegfx::B2DVector ImplEESdrWriter::ImplMapB2DVector( const basegfx::B2DVector& rB2DVector )
+basegfx::B2DRange ImplEESdrWriter::ImplMapB2DRange(const basegfx::B2DRange& rRange)
 {
 	if(maMapModeSrc == maMapModeDest)
 	{
-		return rB2DVector;
+		return rRange;
 	}
 	else
-{
+	{
 		implPrepareLogicToLogic();
 
-		return maLogicToLogic * rB2DVector;
+        basegfx::B2DRange aRetval(rRange);
+
+        aRetval.transform(maLogicToLogic);
+		return aRetval;
 	}
 }
 
@@ -147,8 +166,8 @@ void ImplEESdrWriter::ImplFlipBoundingBo
 	double	fCos = cos( fVal );
 	double	fSin = sin( fVal );
 
-    basegfx::B2DPoint aPoint(rObj.getObjectPosition());
-    basegfx::B2DVector aScale(rObj.getObjectScale());
+    basegfx::B2DPoint aPoint(rObj.getObjectRange().getMinimum());
+    const basegfx::B2DVector aScale(rObj.getObjectRange().getRange());
 	const basegfx::B2DVector aHalfScale(aScale * 0.5);
 	const double nXDiff(fCos * aHalfScale.getX() + fSin * (-aHalfScale.getY()));
 	const double nYDiff(-( fSin * aHalfScale.getX() - fCos * ( -aHalfScale.getY())));
@@ -161,7 +180,7 @@ void ImplEESdrWriter::ImplFlipBoundingBo
 	rPropOpt.AddOpt( ESCHER_Prop_Rotation, nAngle );
 
 	rObj.SetAngle( nAngle );
-	rObj.setObjectPositionAndScale(aPoint, aScale);
+	rObj.setObjectRange(basegfx::B2DRange(aPoint, aPoint + aScale));
 }
 
 //	-----------------------------------------------------------------------
@@ -206,7 +225,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 
 	do {
         const bool bHandOverPosAndSize(mpEscherEx->GetGroupLevel() > 1);
-        mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), bHandOverPosAndSize ? &rObj.getObjectPosition() : 0, bHandOverPosAndSize ? &rObj.getObjectScale() : 0 );
+        mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), bHandOverPosAndSize ? &rObj.getObjectRange() : 0);
 		if ( mpHostAppData && mpHostAppData->DontWriteShape() )
 			break;
 
@@ -224,7 +243,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 
 			if( xXIndexAccess.is() && 0 != xXIndexAccess->getCount() )
 			{
-                nShapeID = mpEscherEx->EnterGroup( aShapeName, &rObj.getObjectPosition(), &rObj.getObjectScale() );
+                nShapeID = mpEscherEx->EnterGroup( aShapeName, &rObj.getObjectRange() );
 				nShapeType = ESCHER_ShpInst_Min;
 
 				for( sal_uInt32 n = 0, nCnt = xXIndexAccess->getCount();
@@ -259,22 +278,20 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 		}
 
         // TTTT: adapted to transformation
-        basegfx::B2DPoint maObjectPosition(0.0, 0.0);
-        basegfx::B2DVector maObjectScale(1.0, 1.0);
+        basegfx::B2DRange aObjectRange(0.0, 0.0, 1.0, 1.0);
 
 		if(rObj.ImplGetPropertyValue(::rtl::OUString::createFromAscii("Transformation")))
         {
 		    drawing::HomogenMatrix3 aMatrix;
             rObj.GetUsrAny() >>= aMatrix;
             const basegfx::tools::B2DHomMatrixBufferedDecompose aMat(basegfx::tools::UnoHomogenMatrix3ToB2DHomMatrix(aMatrix));
-            maObjectPosition = aMat.getTranslate();
-            maObjectScale = aMat.getScale();
+            aObjectRange = basegfx::B2DRange(aMat.getTranslate(), aMat.getTranslate() + basegfx::absolute(aMat.getScale()));
         }
 
         if ( !mpPicStrm )
             mpPicStrm = mpEscherEx->QueryPictureStream();
         
-        EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, maObjectPosition, maObjectScale );
+        EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aObjectRange );
 
         // #i51348# shape name
         if( aShapeName.Len() > 0 )
@@ -298,11 +315,9 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 						SdrObject* pObj = GetSdrObjectFromXShape( rObj.GetShapeRef() );
 					if ( pObj )
 					{
-						const basegfx::B2DRange aBound(pObj->getObjectRange(0));
-						const basegfx::B2DPoint aPosition(ImplMapB2DPoint(aBound.getMinimum()));
-						const basegfx::B2DVector aScale(ImplMapB2DVector(aBound.getRange()));
+						const basegfx::B2DRange aRange(ImplMapB2DRange(pObj->getObjectRange(0)));
 						
-						rObj.setObjectPositionAndScale(aPosition, aScale);
+						rObj.setObjectRange(aRange);
 						rObj.SetAngle( 0 );
 						bDontWriteText = sal_True;
 					}
@@ -332,7 +347,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 			{
 				nRadius = ImplMapB2DVector(basegfx::B2DVector(nRadius, 0.0)).getLength();
 				ADD_SHAPE( ESCHER_ShpInst_RoundRectangle, 0xa00 );	// Flags: Connector | HasSpt
-				const sal_Int32 nLenght(basegfx::fround((std::min(rObj.getObjectScale().getX(), rObj.getObjectScale().getY())) * 0.5));
+				const sal_Int32 nLenght(basegfx::fround((std::min(rObj.getObjectRange().getWidth(), rObj.getObjectRange().getHeight())) * 0.5));
 				if ( nRadius >= nLenght )
 					nRadius = 0x2a30;							// 0x2a30 ist PPTs maximum radius
 				else
@@ -395,10 +410,9 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 					aPropOpt.CreateLineProperties( rObj.mXPropSet, sal_False );
                 }
 				
-				const basegfx::B2DPoint aPosition(ImplMapB2DPoint(basegfx::B2DPoint(aNewRect.X, aNewRect.Y)));
-				const basegfx::B2DVector aScale(ImplMapB2DVector(basegfx::B2DVector(aNewRect.Width, aNewRect.Height)));
+                const basegfx::B2DRange aRange(ImplMapB2DRange(basegfx::B2DRange(aNewRect.X, aNewRect.Y, aNewRect.X + aNewRect.Width, aNewRect.Y + aNewRect.Height)));
 				
-				rObj.setObjectPositionAndScale(aPosition, aScale);
+				rObj.setObjectRange(aRange);
 			}
 			if ( rObj.ImplGetText() )
 				aPropOpt.CreateTextProperties( rObj.mXPropSet,
@@ -418,10 +432,9 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 							rSolverContainer, aNewRect, nSpType, nSpFlags ) == sal_False )
 				break;
 
-			const basegfx::B2DPoint aPosition(ImplMapB2DPoint(basegfx::B2DPoint(aNewRect.X, aNewRect.Y)));
-			const basegfx::B2DVector aScale(ImplMapB2DVector(basegfx::B2DVector(aNewRect.Width, aNewRect.Height)));
+            const basegfx::B2DRange aRange(ImplMapB2DRange(basegfx::B2DRange(aNewRect.X, aNewRect.Y, aNewRect.X + aNewRect.Width, aNewRect.Y + aNewRect.Height)));
 				
-			rObj.setObjectPositionAndScale(aPosition, aScale);
+			rObj.setObjectRange(aRange);
             mpEscherEx->OpenContainer( ESCHER_SpContainer );
 			ADD_SHAPE( nSpType, nSpFlags );
 		}
@@ -532,7 +545,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 		{
 			if( rObj.ImplHasText() )
 			{
-				nGrpShapeID = ImplEnterAdditionalTextGroup(	rObj.GetShapeRef(), &rObj.getObjectPosition(), &rObj.getObjectScale() );
+				nGrpShapeID = ImplEnterAdditionalTextGroup(	rObj.GetShapeRef(), &rObj.getObjectRange() );
 				bAdditionalText = sal_True;
 			}
 			mpEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -571,7 +584,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 		{
 			if ( rObj.ImplHasText() )
 			{
-				nGrpShapeID = ImplEnterAdditionalTextGroup(	rObj.GetShapeRef(), &rObj.getObjectPosition(), &rObj.getObjectScale() );
+				nGrpShapeID = ImplEnterAdditionalTextGroup(	rObj.GetShapeRef(), &rObj.getObjectRange() );
 				bAdditionalText = sal_True;
 			}
 			mpEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -719,13 +732,13 @@ sal_uInt32 ImplEESdrWriter::ImplWriteSha
 			ImplFlipBoundingBox( rObj, aPropOpt );
 
 		aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
-		mpEscherEx->Commit( aPropOpt, rObj.getObjectPosition(), rObj.getObjectScale() );
+		mpEscherEx->Commit( aPropOpt, rObj.getObjectRange() );
 		if( mpEscherEx->GetGroupLevel() > 1 )
-            mpEscherEx->AddChildAnchor( rObj.getObjectPosition(), rObj.getObjectScale() );
+            mpEscherEx->AddChildAnchor( rObj.getObjectRange() );
 
 		if ( mpHostAppData )
 		{	//! with AdditionalText the App has to control whether these are written or not
-			mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.getObjectPosition(), rObj.getObjectScale() );
+			mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.getObjectRange() );
 			mpHostAppData->WriteClientData( *mpEscherEx );
 			if ( !bDontWriteText )
 				mpHostAppData->WriteClientTextbox( *mpEscherEx );
@@ -755,39 +768,39 @@ void ImplEESdrWriter::ImplWriteAdditiona
 	do
 	{
         const bool bHandOver(mpEscherEx->GetGroupLevel() > 1);
-        mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), bHandOver ? &rObj.getObjectPosition() : 0, bHandOver ? &rObj.getObjectScale() : 0 );
+        mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), bHandOver ? &rObj.getObjectRange() : 0 );
 		if ( mpHostAppData && mpHostAppData->DontWriteShape() )
 			break;
 
         // TTTT: adapted to transformation
-        basegfx::B2DPoint maObjectPosition(0.0, 0.0);
-        basegfx::B2DVector maObjectScale(1.0, 1.0);
+        basegfx::B2DRange aObjectRange(0.0, 0.0, 1.0, 1.0);
 
 		if(rObj.ImplGetPropertyValue(::rtl::OUString::createFromAscii("Transformation")))
         {
 		    drawing::HomogenMatrix3 aMatrix;
             rObj.GetUsrAny() >>= aMatrix;
             const basegfx::tools::B2DHomMatrixBufferedDecompose aMat(basegfx::tools::UnoHomogenMatrix3ToB2DHomMatrix(aMatrix));
-            maObjectPosition = aMat.getTranslate();
-            maObjectScale = aMat.getScale();
+            aObjectRange = basegfx::B2DRange(aMat.getTranslate(), aMat.getTranslate() + basegfx::absolute(aMat.getScale()));
         }
 		
         if ( !mpPicStrm )
             mpPicStrm = mpEscherEx->QueryPictureStream();
         
-        EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, maObjectPosition, maObjectScale );
+        EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aObjectRange );
 
         rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle")));
 		sal_Int32 nAngle = rObj.GetAngle();
 		if( rObj.GetType().EqualsAscii( "drawing.Line" ))
 		{
 //2do: this does not work right
-			const double fDist(hypot(rObj.getObjectScale().getX(), rObj.getObjectScale().getY()));
-            rObj.setObjectPositionAndScale(basegfx::B2DPoint(rTextRefPoint.X(), rTextRefPoint.Y()), basegfx::B2DVector(fDist, -1));
-
+			const double fDist(hypot(rObj.getObjectRange().getWidth(), rObj.getObjectRange().getHeight()));
+            const basegfx::B2DRange aRange(rTextRefPoint.X(), rTextRefPoint.Y(), rTextRefPoint.X() + fDist, rTextRefPoint.Y());
+            
+            rObj.setObjectRange(aRange);
 			mpEscherEx->OpenContainer( ESCHER_SpContainer );
 			mpEscherEx->AddShape( ESCHER_ShpInst_TextBox, 0xa00 );
-			if ( rObj.ImplGetText() )
+			
+            if ( rObj.ImplGetText() )
 				aPropOpt.CreateTextProperties( rObj.mXPropSet,
 					mpEscherEx->QueryTextID( rObj.GetShapeRef(),
 						rObj.GetShapeId() ) );
@@ -821,19 +834,19 @@ void ImplEESdrWriter::ImplWriteAdditiona
 			nAngle += 0x8000;
 			nAngle &=~0xffff;	// nAngle auf volle Gradzahl runden
 			aPropOpt.AddOpt( ESCHER_Prop_Rotation, nAngle );
-			mpEscherEx->SetGroupSnapPositionAndScale( mpEscherEx->GetGroupLevel(), rObj.getObjectPosition(), rObj.getObjectScale() );
-			mpEscherEx->SetGroupLogicPositionAndScale( mpEscherEx->GetGroupLevel(), rObj.getObjectPosition(), rObj.getObjectScale() );
+			mpEscherEx->SetGroupSnapPositionAndScale( mpEscherEx->GetGroupLevel(), rObj.getObjectRange() );
+			mpEscherEx->SetGroupLogicPositionAndScale( mpEscherEx->GetGroupLevel(), rObj.getObjectRange() );
 		}
 		rObj.SetAngle( nAngle );
 		aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
-		mpEscherEx->Commit( aPropOpt, rObj.getObjectPosition(), rObj.getObjectScale() );
+		mpEscherEx->Commit( aPropOpt, rObj.getObjectRange() );
 
 		// write the childanchor
-        mpEscherEx->AddChildAnchor( rObj.getObjectPosition(), rObj.getObjectScale() );
+        mpEscherEx->AddChildAnchor( rObj.getObjectRange() );
 
 #if defined EES_WRITE_EPP
 		// ClientAnchor
-		mpEscherEx->AddClientAnchor( rObj.getObjectPosition(), rObj.getObjectScale() );
+		mpEscherEx->AddClientAnchor( rObj.getObjectRange() );
 		// ClientTextbox
 		mpEscherEx->OpenContainer( ESCHER_ClientTextbox );
 		mpEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
@@ -843,7 +856,7 @@ void ImplEESdrWriter::ImplWriteAdditiona
 #else // !EES_WRITE_EPP
 		if ( mpHostAppData )
 		{	//! the App has to control whether these are written or not
-			mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.getObjectPosition(), rObj.getObjectScale() );
+			mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.getObjectRange() );
 			mpHostAppData->WriteClientData( *mpEscherEx );
 			mpHostAppData->WriteClientTextbox( *mpEscherEx );
 		}
@@ -859,12 +872,11 @@ void ImplEESdrWriter::ImplWriteAdditiona
 
 sal_uInt32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( 
     const Reference< XShape >& rShape,
-	const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale)
+    const basegfx::B2DRange* pObjectRange)
 {
 	mpHostAppData = mpEscherEx->EnterAdditionalTextGroup();
-	sal_uInt32 nGrpId = mpEscherEx->EnterGroup( pObjectPosition, pObjectScale );
-    mpHostAppData = mpEscherEx->StartShape( rShape, pObjectPosition, pObjectScale );
+	sal_uInt32 nGrpId = mpEscherEx->EnterGroup( pObjectRange );
+    mpHostAppData = mpEscherEx->StartShape( rShape, pObjectRange );
 	return nGrpId;
 }
 
@@ -1072,8 +1084,7 @@ void EscherEx::EndSdrObjectPage()
 
 EscherExHostAppData* EscherEx::StartShape( 
     const Reference< XShape >& /* rShape */, 
-    const basegfx::B2DPoint* /*pObjectPosition*/,
-    const basegfx::B2DVector* /*pObjectScale*/ )
+    const basegfx::B2DRange* /*pObjectRange*/ )
 {
 	return NULL;
 }
@@ -1168,10 +1179,11 @@ void ImplEESdrObject::Init( ImplEESdrWri
 	{
 		static const sal_Char aPrefix[] = "com.sun.star.";
 		static const xub_StrLen nPrefix = sizeof(aPrefix)-1;
-		const basegfx::B2DPoint aPosition(rEx.ImplMapB2DPoint(basegfx::B2DPoint(mXShape->getPosition().X, mXShape->getPosition().Y)));
-		const basegfx::B2DVector aScale(rEx.ImplMapB2DVector(basegfx::B2DVector(mXShape->getSize().Width, mXShape->getSize().Height)));
+        const ::com::sun::star::awt::Point aPoint(mXShape->getPosition());
+        const ::com::sun::star::awt::Size aSize(mXShape->getSize());
+        const basegfx::B2DRange aRange(rEx.ImplMapB2DRange(basegfx::B2DRange(aPoint.X, aPoint.Y, aPoint.X + aSize.Width, aPoint.Y + aSize.Height)));
 
-		setObjectPositionAndScale(aPosition, aScale);
+		setObjectRange(aRange);
 		mType = String( mXShape->getShapeType() );
 		mType.Erase( 0, nPrefix );	// strip "com.sun.star."
 		xub_StrLen nPos = mType.SearchAscii( "Shape" );

Modified: incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/filter/source/msfilter/eschesdo.hxx Mon Jun 25 11:44:13 2012
@@ -42,8 +42,7 @@ class ImplEESdrObject
 	::com::sun::star::uno::Any				mAny;
 	
     // the object range, split in pos and scale to keep the evtl. negative size (mirroring)
-    basegfx::B2DPoint   maObjectPosition;
-    basegfx::B2DVector  maObjectScale;
+    basegfx::B2DRange   maObjectRange;
 
     String				mType;
 	sal_uInt32				mnShapeId;
@@ -71,9 +70,8 @@ public:
 	const String&		GetType() const 		{ return mType; }
 	void				SetType( const String& rS ) { mType = rS; }
 
-    void setObjectPositionAndScale(const basegfx::B2DPoint& rNewPos, const basegfx::B2DVector& rNewSize) { maObjectPosition = rNewPos; maObjectScale = rNewSize; }
-    const basegfx::B2DPoint& getObjectPosition() const { return maObjectPosition; }
-    const basegfx::B2DVector& getObjectScale() const { return maObjectScale; }
+    void setObjectRange(const basegfx::B2DRange& rObjectRange) { maObjectRange = rObjectRange; }
+    const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
 
 	sal_Int32				GetAngle() const 		{ return mnAngle; }
 	void				SetAngle( sal_Int32 nVal ) 	{ mnAngle = nVal; }
@@ -168,13 +166,13 @@ protected:
 												const Point& rTextRefPoint );
 			sal_uInt32				ImplEnterAdditionalTextGroup(
 										const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape,
-										const basegfx::B2DPoint* pObjectPosition = 0,
-                                        const basegfx::B2DVector* pObjectScale = 0);
+                                        const basegfx::B2DRange* pObjectRange = 0);
 
 
 public:
-			basegfx::B2DPoint ImplMapB2DPoint( const basegfx::B2DPoint& rPoint );
+//			basegfx::B2DPoint ImplMapB2DPoint( const basegfx::B2DPoint& rPoint );
 			basegfx::B2DVector ImplMapB2DVector( const basegfx::B2DVector& rScale );
+			basegfx::B2DRange ImplMapB2DRange(const basegfx::B2DRange& rRange);
 
 			EscherExHostAppData* ImplGetHostData() { return mpHostAppData; }
             void MapRect(ImplEESdrObject& rObj);

Modified: incubator/ooo/branches/alg/aw080/main/oox/inc/oox/export/vmlexport.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/oox/inc/oox/export/vmlexport.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/oox/inc/oox/export/vmlexport.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/oox/inc/oox/export/vmlexport.hxx Mon Jun 25 11:44:13 2012
@@ -85,8 +85,7 @@ protected:
 
     virtual void        Commit( 
         EscherPropertyContainer& rProps, 
-        const basegfx::B2DPoint& rObjectPosition,
-        const basegfx::B2DVector& rObjectScale);
+        const basegfx::B2DRange& rObjectRange);
 
 private:
 

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xeescher.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xeescher.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xeescher.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xeescher.cxx Mon Jun 25 11:44:13 2012
@@ -101,7 +101,7 @@ void XclExpDffAnchorBase::SetSdrObject( 
 {
     const basegfx::B2DRange aRange(rSdrObj.getObjectRange(0));
     ImplSetFlags( rSdrObj );
-    ImplCalcAnchorRange( aRange.getMinimum(), aRange.getRange(), MAP_100TH_MM );
+    ImplCalcAnchorRange( aRange, MAP_100TH_MM );
 }
 
 void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const
@@ -111,11 +111,10 @@ void XclExpDffAnchorBase::WriteDffData( 
 }
 
 void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, 
-    const basegfx::B2DPoint& rObjectPosition, 
-    const basegfx::B2DVector& rObjectScale)
+    const basegfx::B2DRange& rObjectRange)
 {
     // the passed rectangle is in twips
-    ImplCalcAnchorRange( rObjectPosition, rObjectScale, MAP_TWIP );
+    ImplCalcAnchorRange( rObjectRange, MAP_TWIP );
     WriteDffData( rEscherEx );
 }
 
@@ -124,7 +123,7 @@ void XclExpDffAnchorBase::ImplSetFlags( 
     OSL_ENSURE( false, "XclExpDffAnchorBase::ImplSetFlags - not implemented" );
 }
 
-void XclExpDffAnchorBase::ImplCalcAnchorRange( const basegfx::B2DPoint& /*rObjectPosition*/, const basegfx::B2DVector& /*rObjectScale*/, MapUnit )
+void XclExpDffAnchorBase::ImplCalcAnchorRange( const basegfx::B2DRange& /*rObjectRange*/, MapUnit )
 {
     OSL_ENSURE( false, "XclExpDffAnchorBase::ImplCalcAnchorRect - not implemented" );
 }
@@ -143,9 +142,9 @@ void XclExpDffSheetAnchor::ImplSetFlags(
     mnFlags = rSdrObj.getUniversalApplicationFlag01() ? EXC_ESC_ANCHOR_LOCKED : 0;
 }
 
-void XclExpDffSheetAnchor::ImplCalcAnchorRange( const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit )
+void XclExpDffSheetAnchor::ImplCalcAnchorRange( const basegfx::B2DRange& rObjectRange, MapUnit eMapUnit )
 {
-    maAnchor.SetRangeAtAnchor( GetRoot(), mnScTab, rObjectPosition, rObjectScale, eMapUnit );
+    maAnchor.SetRangeAtAnchor( GetRoot(), mnScTab, rObjectRange, eMapUnit );
 }
 
 // ----------------------------------------------------------------------------
@@ -164,17 +163,17 @@ void XclExpDffEmbeddedAnchor::ImplSetFla
     // TODO (unsupported feature): fixed size
 }
 
-void XclExpDffEmbeddedAnchor::ImplCalcAnchorRange( const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit )
+void XclExpDffEmbeddedAnchor::ImplCalcAnchorRange( const basegfx::B2DRange& rObjectRange, MapUnit eMapUnit )
 {
-    maAnchor.SetRangeAtAnchor( maPageScale, mfScaleX, mfScaleY, rObjectPosition, rObjectScale, eMapUnit, true );
+    maAnchor.SetRangeAtAnchor( maPageScale, mfScaleX, mfScaleY, rObjectRange, eMapUnit, true );
 }
 
 // ----------------------------------------------------------------------------
 
-XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale ) :
+XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const basegfx::B2DRange& rObjectRange ) :
     XclExpDffAnchorBase( rRoot, EXC_ESC_ANCHOR_SIZELOCKED )
 {
-    maAnchor.SetRangeAtAnchor( rRoot, rRoot.GetCurrScTab(), rObjectPosition, rObjectScale, MAP_100TH_MM );
+    maAnchor.SetRangeAtAnchor( rRoot, rRoot.GetCurrScTab(), rObjectRange, MAP_100TH_MM );
 }
 
 // ----------------------------------------------------------------------------
@@ -381,8 +380,7 @@ void XclExpControlHelper::WriteFormulaSu
 XclExpOcxControlObj::XclExpOcxControlObj( 
     XclExpObjectManager& rObjMgr, 
     Reference< XShape > xShape,
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale,
+    const basegfx::B2DRange* pObjectRange,
     const String& rClassName, 
     sal_uInt32 nStrmStart, 
     sal_uInt32 nStrmSize ) 
@@ -428,7 +426,7 @@ XclExpOcxControlObj::XclExpOcxControlObj
     aPropOpt.Commit( mrEscherEx.GetStream() );
 
     // anchor
-    ImplWriteAnchor( GetRoot(), SdrObject::getSdrObjectFromXShape( xShape ), pObjectPosition, pObjectScale);
+    ImplWriteAnchor( GetRoot(), SdrObject::getSdrObjectFromXShape( xShape ), pObjectRange );
 
     mrEscherEx.AddAtom( 0, ESCHER_ClientData );                       // OBJ record
     mrEscherEx.CloseContainer();  // ESCHER_SpContainer
@@ -492,8 +490,7 @@ void XclExpOcxControlObj::WriteSubRecs( 
 XclExpTbxControlObj::XclExpTbxControlObj( 
     XclExpObjectManager& rObjMgr, 
     Reference< XShape > xShape, 
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale) 
+    const basegfx::B2DRange* pObjectRange) 
 :   XclObj( rObjMgr, EXC_OBJTYPE_UNKNOWN, true ),
     XclExpControlHelper( rObjMgr.GetRoot() ),
     mnHeight( 0 ),
@@ -571,7 +568,7 @@ XclExpTbxControlObj::XclExpTbxControlObj
     aPropOpt.Commit( mrEscherEx.GetStream() );
 
     // anchor
-    ImplWriteAnchor( GetRoot(), SdrObject::getSdrObjectFromXShape( xShape ), pObjectPosition, pObjectScale);
+    ImplWriteAnchor( GetRoot(), SdrObject::getSdrObjectFromXShape( xShape ), pObjectRange );
 
     mrEscherEx.AddAtom( 0, ESCHER_ClientData );                       // OBJ record
     mrEscherEx.UpdateDffFragmentEnd();
@@ -930,8 +927,7 @@ void XclExpTbxControlObj::WriteSbs( XclE
 XclExpChartObj::XclExpChartObj( 
     XclExpObjectManager& rObjMgr, 
     Reference< XShape > xShape, 
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale) 
+    const basegfx::B2DRange* pObjectRange) 
 :   XclObj( rObjMgr, EXC_OBJTYPE_CHART ),
     XclExpRoot( rObjMgr.GetRoot() )
 {
@@ -952,7 +948,7 @@ XclExpChartObj::XclExpChartObj( 
 
     // anchor
     SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape );
-    ImplWriteAnchor( GetRoot(), pSdrObj, pObjectPosition, pObjectScale );
+    ImplWriteAnchor( GetRoot(), pSdrObj, pObjectRange );
 
     // client data (the following OBJ record)
     mrEscherEx.AddAtom( 0, ESCHER_ClientData );
@@ -1016,9 +1012,10 @@ XclExpNote::XclExpNote( const XclExpRoot
                 if( SdrCaptionObj* pCaption = pScNote->GetOrCreateCaption( maScPos ) )
                     if( const OutlinerParaObject* pOPO = pCaption->GetOutlinerParaObject() )
                     {
+                        const basegfx::B2DRange aRange(pCaption->getSdrObjectTranslate(), pCaption->getSdrObjectScale());
                         mnObjId = rRoot.GetObjectManager().AddObj( 
                             new XclObjComment( 
-                                rRoot.GetObjectManager(), pCaption->getSdrObjectTranslate(), pCaption->getSdrObjectScale(), pOPO->GetTextObject(), pCaption, mbVisible ) );
+                                rRoot.GetObjectManager(), aRange, pOPO->GetTextObject(), pCaption, mbVisible ) );
                     }
 
             SetRecSize( 9 + maAuthor.GetSize() );

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xiescher.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xiescher.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xiescher.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xiescher.cxx Mon Jun 25 11:44:13 2012
@@ -1735,7 +1735,7 @@ void XclImpChartObj::FinalizeTabChart()
 
     // create the object anchor
     XclObjAnchor aAnchor;
-    aAnchor.SetRangeAtAnchor( GetRoot(), GetCurrScTab(), basegfx::B2DPoint(1000.0, 500.0), basegfx::B2DVector(fWidth, fHeight), MAP_100TH_MM );
+    aAnchor.SetRangeAtAnchor( GetRoot(), GetCurrScTab(), basegfx::B2DRange(1000.0, 500.0, 1000.0 + fWidth, 500.0 + fHeight), MAP_100TH_MM );
     SetAnchor( aAnchor );
 }
 

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xlescher.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xlescher.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xlescher.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/excel/xlescher.cxx Mon Jun 25 11:44:13 2012
@@ -203,10 +203,13 @@ basegfx::B2DRange XclObjAnchor::GetRange
 	return aRange;
 }
 
-void XclObjAnchor::SetRangeAtAnchor( const XclRoot& rRoot, SCTAB nScTab, const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit )
+void XclObjAnchor::SetRangeAtAnchor( 
+    const XclRoot& rRoot, 
+    SCTAB nScTab, 
+    const basegfx::B2DRange& rObjectRange, 
+    MapUnit eMapUnit )
 {
-    basegfx::B2DPoint aObjectPosition(rObjectPosition);
-    basegfx::B2DVector aObjectScale(rObjectScale);
+    basegfx::B2DRange aObjectRange(rObjectRange);
     ScDocument& rDoc = rRoot.GetDoc();
     sal_uInt16 nXclMaxCol = rRoot.GetXclMaxPos().Col();
     sal_uInt16 nXclMaxRow = static_cast<sal_uInt16>( rRoot.GetXclMaxPos().Row());
@@ -214,22 +217,27 @@ void XclObjAnchor::SetRangeAtAnchor( con
     // #106948# adjust coordinates in mirrored sheets
     if( rDoc.IsLayoutRTL( nScTab ) )
 	{
-        aObjectPosition.setX(-aObjectPosition.getX());
-        aObjectScale.setX(-aObjectScale.getX());
+        aObjectRange = basegfx::B2DRange(
+            -aObjectRange.getMinX(), aObjectRange.getMinY(), 
+            -aObjectRange.getMaxX(), aObjectRange.getMaxY());
 	}
 
     const double fScale(lclGetTwipsScale( eMapUnit ));
     long nDummy = 0;
-    lclGetColFromX( rDoc, nScTab, maFirst.mnCol, mnLX, 0,             nXclMaxCol, nDummy, aObjectPosition.getX(), fScale );
-    lclGetColFromX( rDoc, nScTab, maLast.mnCol,  mnRX, maFirst.mnCol, nXclMaxCol, nDummy, aObjectPosition.getX() + aObjectScale.getX(), fScale );
+    lclGetColFromX( rDoc, nScTab, maFirst.mnCol, mnLX, 0,             nXclMaxCol, nDummy, aObjectRange.getMinX(), fScale );
+    lclGetColFromX( rDoc, nScTab, maLast.mnCol,  mnRX, maFirst.mnCol, nXclMaxCol, nDummy, aObjectRange.getMaxX(), fScale );
     nDummy = 0;
-    lclGetRowFromY( rDoc, nScTab, maFirst.mnRow, mnTY, 0,             nXclMaxRow, nDummy, aObjectPosition.getY(), fScale );
-    lclGetRowFromY( rDoc, nScTab, maLast.mnRow,  mnBY, maFirst.mnRow, nXclMaxRow, nDummy, aObjectPosition.getY() + aObjectScale.getY(), fScale );
+    lclGetRowFromY( rDoc, nScTab, maFirst.mnRow, mnTY, 0,             nXclMaxRow, nDummy, aObjectRange.getMinY(), fScale );
+    lclGetRowFromY( rDoc, nScTab, maLast.mnRow,  mnBY, maFirst.mnRow, nXclMaxRow, nDummy, aObjectRange.getMaxY(), fScale );
 }
 
 void XclObjAnchor::SetRangeAtAnchor(
-	const basegfx::B2DVector& rPageScale, double fScaleX, double fScaleY,
-    const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit, bool bDffAnchor )
+	const basegfx::B2DVector& rPageScale, 
+    double fScaleX, 
+    double fScaleY,
+    const basegfx::B2DRange& rObjectRange, 
+    MapUnit eMapUnit, 
+    bool bDffAnchor )
 {
     double fScale = 1.0;
     switch( eMapUnit )
@@ -242,10 +250,10 @@ void XclObjAnchor::SetRangeAtAnchor(
     /*  In objects with DFF client anchor, the position of the shape is stored
         in the cell address components of the client anchor. In old BIFF3-BIFF5
         objects, the position is stored in the offset components of the anchor. */
-    (bDffAnchor ? maFirst.mnCol : mnLX) = lclGetEmbeddedScale( rPageScale.getX(), fScaleX, rObjectPosition.getX(), fScale );
-    (bDffAnchor ? maFirst.mnRow : mnTY) = lclGetEmbeddedScale( rPageScale.getY(), fScaleY, rObjectPosition.getY(), fScale );
-    (bDffAnchor ? maLast.mnCol  : mnRX) = lclGetEmbeddedScale( rPageScale.getX(), fScaleX, rObjectPosition.getX() + rObjectScale.getX(), fScale );
-    (bDffAnchor ? maLast.mnRow  : mnBY) = lclGetEmbeddedScale( rPageScale.getY(), fScaleY, rObjectPosition.getY() + rObjectScale.getY(), fScale );
+    (bDffAnchor ? maFirst.mnCol : mnLX) = lclGetEmbeddedScale( rPageScale.getX(), fScaleX, rObjectRange.getMinX(), fScale );
+    (bDffAnchor ? maFirst.mnRow : mnTY) = lclGetEmbeddedScale( rPageScale.getY(), fScaleY, rObjectRange.getMinY(), fScale );
+    (bDffAnchor ? maLast.mnCol  : mnRX) = lclGetEmbeddedScale( rPageScale.getX(), fScaleX, rObjectRange.getMaxX(), fScale );
+    (bDffAnchor ? maLast.mnRow  : mnBY) = lclGetEmbeddedScale( rPageScale.getY(), fScaleY, rObjectRange.getMaxY(), fScale );
 
     // for safety, clear the other members
     if( bDffAnchor )

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97esc.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97esc.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97esc.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97esc.hxx Mon Jun 25 11:44:13 2012
@@ -98,8 +98,7 @@ public:
 
     virtual EscherExHostAppData* StartShape(
                             const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& rxShape,
-                            const basegfx::B2DPoint* pObjectPosition,
-                            const basegfx::B2DVector* pObjectScale);
+                            const basegfx::B2DRange* pObjectRange);
 	virtual	void				EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID );
 	virtual	EscherExHostAppData*	EnterAdditionalTextGroup();
 
@@ -111,8 +110,7 @@ public:
         @descr  Writes the form control data to the 'Ctls' stream. */
     XclExpOcxControlObj* CreateCtrlObj(
                             ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape,
-                            const basegfx::B2DPoint* pObjectPosition,
-                            const basegfx::B2DVector* pObjectScale);
+                            const basegfx::B2DRange* pObjectRange);
 
 private:
     SotStorageStreamRef  mxCtlsStrm;         /// The 'Ctls' stream.
@@ -120,8 +118,7 @@ private:
     /** Creates a TBX form control OBJ record from the passed form control. */
     XclExpTbxControlObj* CreateCtrlObj(
                             ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape,
-                            const basegfx::B2DPoint* pObjectPosition,
-                            const basegfx::B2DVector* pObjectScale);
+                            const basegfx::B2DRange* pObjectRange);
 
 private:
     /** Tries to get the name of a Basic macro from a control. */

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97rec.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97rec.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97rec.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xcl97rec.hxx Mon Jun 25 11:44:13 2012
@@ -86,8 +86,7 @@ protected:
     void                        ImplWriteAnchor( 
                                     const XclExpRoot& rRoot, 
                                     const SdrObject* pSdrObj, 
-                                    const basegfx::B2DPoint* pObjectPosition,
-                                    const basegfx::B2DVector* pObjectScale);
+                                    const basegfx::B2DRange* pObjectRange);
 
 								// overwritten for writing MSODRAWING record
     virtual void                WriteBody( XclExpStream& rStrm );
@@ -138,13 +137,13 @@ class XclObjComment : public XclObj
 {
 public:
                                 XclObjComment( XclExpObjectManager& rObjMgr,
-                                    const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, const EditTextObject& rEditObj, SdrObject* pCaption, bool bVisible );
+                                    const basegfx::B2DRange& rObjectRange, const EditTextObject& rEditObj, SdrObject* pCaption, bool bVisible );
 	virtual						~XclObjComment();
 
     /** c'tor process for formatted text objects above .
        @descr used to construct the MSODRAWING Escher object properties. */
     void                        ProcessEscherObj( const XclExpRoot& rRoot,
-                                    const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, SdrObject* pCaption, bool bVisible );
+                                    const basegfx::B2DRange& rObjectRange, SdrObject* pCaption, bool bVisible );
 
 
 	virtual	void				Save( XclExpStream& rStrm );

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xeescher.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xeescher.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xeescher.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xeescher.hxx Mon Jun 25 11:44:13 2012
@@ -54,12 +54,11 @@ public:
         @param rRect  The object anchor rectangle to be exported (in twips). */
     virtual void        WriteData( 
                             EscherEx& rEscherEx, 
-                            const basegfx::B2DPoint& rObjectPosition, 
-                            const basegfx::B2DVector& rObjectScale);
+                            const basegfx::B2DRange& rObjectRange);
 
 private:
     virtual void        ImplSetFlags( const SdrObject& rSdrObj );
-    virtual void        ImplCalcAnchorRange( const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit );
+    virtual void        ImplCalcAnchorRange( const basegfx::B2DRange& rObjectRange, MapUnit eMapUnit );
 
 protected:  // for access in derived classes
     XclObjAnchor        maAnchor;       /// The client anchor data.
@@ -76,7 +75,7 @@ public:
 
 private:
     virtual void        ImplSetFlags( const SdrObject& rSdrObj );
-    virtual void        ImplCalcAnchorRange( const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit );
+    virtual void        ImplCalcAnchorRange( const basegfx::B2DRange& rObjectRange, MapUnit eMapUnit );
 
 private:
     SCTAB               mnScTab;        /// Calc sheet index.
@@ -93,7 +92,7 @@ public:
 
 private:
     virtual void        ImplSetFlags( const SdrObject& rSdrObj );
-    virtual void        ImplCalcAnchorRange( const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit );
+    virtual void        ImplCalcAnchorRange( const basegfx::B2DRange& rObjectRange, MapUnit eMapUnit );
 
 private:
     basegfx::B2DVector	maPageScale;
@@ -107,7 +106,7 @@ private:
 class XclExpDffNoteAnchor : public XclExpDffAnchorBase
 {
 public:
-    explicit            XclExpDffNoteAnchor( const XclExpRoot& rRoot, const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale );
+    explicit            XclExpDffNoteAnchor( const XclExpRoot& rRoot, const basegfx::B2DRange& rObjectRange );
 };
 
 // ----------------------------------------------------------------------------
@@ -217,8 +216,7 @@ public:
     explicit            XclExpOcxControlObj(
                             XclExpObjectManager& rObjMgr,
                             ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape,
-                            const basegfx::B2DPoint* pObjectPosition,
-                            const basegfx::B2DVector* pObjectScale,
+                            const basegfx::B2DRange* pObjectRange,
                             const String& rClassName,
                             sal_uInt32 nStrmStart, sal_uInt32 nStrmSize );
 
@@ -240,8 +238,7 @@ public:
     explicit            XclExpTbxControlObj(
                             XclExpObjectManager& rObjMgr,
                             ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape,
-                            const basegfx::B2DPoint* pObjectPosition,
-                            const basegfx::B2DVector* pObjectScale);
+                            const basegfx::B2DRange* pObjectRange);
 
     /** Sets the name of a macro attached to this control.
         @return  true = The passed event descriptor was valid, macro name has been found. */
@@ -289,8 +286,7 @@ public:
     explicit            XclExpChartObj(
                             XclExpObjectManager& rObjMgr,
                             ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape,
-                            const basegfx::B2DPoint* pObjectPosition,
-                            const basegfx::B2DVector* pObjectScale);
+                            const basegfx::B2DRange* pObjectRange);
     virtual             ~XclExpChartObj();
 
     /** Writes the OBJ record and the entire chart substream. */

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xlescher.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xlescher.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xlescher.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/inc/xlescher.hxx Mon Jun 25 11:44:13 2012
@@ -320,11 +320,11 @@ struct XclObjAnchor : public XclRange
     /** Calculates a rectangle from the contained coordinates. */
     basegfx::B2DRange	GetRangeFromAnchor( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const;
     /** Initializes the anchor coordinates for a sheet. */
-    void                SetRangeAtAnchor( const XclRoot& rRoot, SCTAB nScTab, const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit );
+    void                SetRangeAtAnchor( const XclRoot& rRoot, SCTAB nScTab, const basegfx::B2DRange& rObjectRange, MapUnit eMapUnit );
 
     /** Initializes the anchor coordinates for an embedded draw page. */
     void                SetRangeAtAnchor( const basegfx::B2DVector& rPageScale, double fScaleX, double fScaleY,
-                            const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, MapUnit eMapUnit, bool bDffAnchor );
+                            const basegfx::B2DRange& rObjectRange, MapUnit eMapUnit, bool bDffAnchor );
 };
 
 template< typename StreamType >

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97esc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97esc.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97esc.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97esc.cxx Mon Jun 25 11:44:13 2012
@@ -192,8 +192,7 @@ bool lcl_IsFontwork( const SdrObject* pO
 
 EscherExHostAppData* XclEscherEx::StartShape( 
     const Reference< XShape >& rxShape, 
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale)
+    const basegfx::B2DRange* pObjectRange)
 {
 	if ( nAdditionalText )
 		nAdditionalText++;
@@ -229,7 +228,7 @@ EscherExHostAppData* XclEscherEx::StartS
                     SvGlobalName aObjClsId( xObj->getClassID() );
                     if ( SotExchange::IsChart( aObjClsId ) )
                     {   // yes, it's a chart diagram
-                        mrObjMgr.AddObj( new XclExpChartObj( mrObjMgr, rxShape, pObjectPosition, pObjectScale) );
+                        mrObjMgr.AddObj( new XclExpChartObj( mrObjMgr, rxShape, pObjectRange) );
                         pCurrXclObj = NULL;     // no metafile or whatsoever
                     }
                     else    // metafile and OLE object
@@ -246,9 +245,9 @@ EscherExHostAppData* XclEscherEx::StartS
 #if EXC_EXP_OCX_CTRL
             // no ActiveX controls in embedded drawings (chart shapes)
             if( mbIsRootDff )
-                pCurrXclObj = CreateCtrlObj( rxShape, pObjectPosition, pObjectScale );
+                pCurrXclObj = CreateCtrlObj( rxShape, pObjectRange );
 #else
-            pCurrXclObj = CreateCtrlObj( rxShape, pObjectPosition, pObjectScale );
+            pCurrXclObj = CreateCtrlObj( rxShape, pObjectRange );
 #endif
             if( !pCurrXclObj )
                 pCurrXclObj = new XclObjAny( mrObjMgr );   // just a metafile
@@ -373,9 +372,8 @@ void XclEscherEx::EndDocument()
 #if EXC_EXP_OCX_CTRL
 
 XclExpOcxControlObj* XclEscherEx::CreateCtrlObj( 
-    Reference< XShape > xShape, 
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale)
+    Reference< XShape > xShape,
+    const basegfx::B2DRange* pObjectRange)
 {
     ::std::auto_ptr< XclExpOcxControlObj > xOcxCtrl;
 
@@ -396,7 +394,7 @@ XclExpOcxControlObj* XclEscherEx::Create
                 sal_uInt32 nStrmSize = static_cast< sal_uInt32 >( mxCtlsStrm->Tell() - nStrmStart );
                 // adjust the class name to "Forms.***.1"
                 aClassName.InsertAscii( "Forms.", 0 ).AppendAscii( ".1" );
-                xOcxCtrl.reset( new XclExpOcxControlObj( mrObjMgr, xShape, pObjectPosition, pObjectScale, aClassName, nStrmStart, nStrmSize ) );
+                xOcxCtrl.reset( new XclExpOcxControlObj( mrObjMgr, xShape, pObjectRange, aClassName, nStrmStart, nStrmSize ) );
             }
         }
     }
@@ -407,10 +405,9 @@ XclExpOcxControlObj* XclEscherEx::Create
 
 XclExpTbxControlObj* XclEscherEx::CreateCtrlObj( 
     Reference< XShape > xShape, 
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale)
+    const basegfx::B2DRange* pObjectRange)
 {
-    ::std::auto_ptr< XclExpTbxControlObj > xTbxCtrl( new XclExpTbxControlObj( mrObjMgr, xShape, pObjectPosition, pObjectScale) );
+    ::std::auto_ptr< XclExpTbxControlObj > xTbxCtrl( new XclExpTbxControlObj( mrObjMgr, xShape, pObjectRange) );
     if( xTbxCtrl->GetObjType() == EXC_OBJTYPE_UNKNOWN )
         xTbxCtrl.reset();
 

Modified: incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97rec.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97rec.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97rec.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sc/source/filter/xcl97/xcl97rec.cxx Mon Jun 25 11:44:13 2012
@@ -176,12 +176,11 @@ XclObj::~XclObj()
 void XclObj::ImplWriteAnchor( 
     const XclExpRoot& /*rRoot*/, 
     const SdrObject* pSdrObj, 
-    const basegfx::B2DPoint* pObjectPosition,
-    const basegfx::B2DVector* pObjectScale)
+    const basegfx::B2DRange* pObjectRange)
 {
-    if( pObjectPosition && pObjectScale )
+    if( pObjectRange )
     {
-        mrEscherEx.AddChildAnchor( *pObjectPosition, *pObjectScale );
+        mrEscherEx.AddChildAnchor( *pObjectRange );
     }
     else if( pSdrObj )
     {
@@ -288,15 +287,15 @@ void XclObj::SaveTextRecs( XclExpStream&
 
 // --- class XclObjComment -------------------------------------------
 
-XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, const EditTextObject& rEditObj, SdrObject* pCaption, bool bVisible ) :
+XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const basegfx::B2DRange& rObjectRange, const EditTextObject& rEditObj, SdrObject* pCaption, bool bVisible ) :
     XclObj( rObjMgr, EXC_OBJTYPE_NOTE, true )
 {
-    ProcessEscherObj( rObjMgr.GetRoot(), rObjectPosition, rObjectScale, pCaption, bVisible);
+    ProcessEscherObj( rObjMgr.GetRoot(), rObjectRange, pCaption, bVisible);
 	// TXO
     pTxo = new XclTxo( rObjMgr.GetRoot(), rEditObj, pCaption );
 }
 
-void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const basegfx::B2DPoint& rObjectPosition, const basegfx::B2DVector& rObjectScale, SdrObject* pCaption, const bool bVisible )
+void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const basegfx::B2DRange& rObjectRange, SdrObject* pCaption, const bool bVisible )
 {
     Reference<XShape> aXShape;
     EscherPropertyContainer aPropOpt;
@@ -351,7 +350,7 @@ void XclObjComment::ProcessEscherObj( co
     aPropOpt.AddOpt( ESCHER_Prop_fPrint, nFlags );                  // bool field
     aPropOpt.Commit( mrEscherEx.GetStream() );
 
-    XclExpDffNoteAnchor( rRoot, rObjectPosition, rObjectScale ).WriteDffData( mrEscherEx );
+    XclExpDffNoteAnchor( rRoot, rObjectRange ).WriteDffData( mrEscherEx );
 
     mrEscherEx.AddAtom( 0, ESCHER_ClientData );                        // OBJ record
     mrEscherEx.UpdateDffFragmentEnd();

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.cxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.cxx Mon Jun 25 11:44:13 2012
@@ -1707,9 +1707,8 @@ void PPTWriter::ImplWriteBackground( ::c
 
     mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
     mpPptEscherEx->AddShape( ESCHER_ShpInst_Rectangle, 0xc00 );                     // Flags: Connector | Background | HasSpt
-    basegfx::B2DPoint aObjectPosition(0.0, 0.0);
-    basegfx::B2DVector aObjectScale(28000.0, 21000.0);
-    EscherPropertyContainer aPropOpt(mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aObjectPosition, aObjectScale);
+    basegfx::B2DRange aObjectRange(0.0, 0.0, 28000.0, 21000.0);
+    EscherPropertyContainer aPropOpt(mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aObjectRange);
     aPropOpt.AddOpt( ESCHER_Prop_fillType, ESCHER_FillSolid );
     ::com::sun::star::drawing::FillStyle aFS( ::com::sun::star::drawing::FillStyle_NONE );
     if ( ImplGetPropertyValue( rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" ) ) ) )

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.hxx?rev=1353473&r1=1353472&r2=1353473&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/filter/eppt/eppt.hxx Mon Jun 25 11:44:13 2012
@@ -712,9 +712,8 @@ class PPTWriter : public GroupTable, pub
 		::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField >				mXTextField;
 		
         // the object range, split in pos and scale to keep the evtl. negative size (mirroring)
-        basegfx::B2DPoint   maObjectPosition;
-        basegfx::B2DVector  maObjectScale;
-//        basegfx::B2DRange               maObjectRange;
+        basegfx::B2DRange   maObjectRange;
+//        basegfx::B2DRange               maObjectRange; // TTTT mirrored needed here ?!?
 //        bool                            mbMirroredX;
 //        bool                            mbMirroredY;
         double                          mfObjectRotation;



Mime
View raw message