diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-09-26 13:10:31 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-10-02 18:08:18 +0200 |
commit | a8e3f0a50e0e81004ec56b9b0dabc5f3a9ec5792 (patch) | |
tree | e93dfcbaa37434bb68a7e29f41da72acfd1697cd /svx/source | |
parent | n#780563: Fixed table import in shapes table handler was missing (diff) | |
download | core-a8e3f0a50e0e81004ec56b9b0dabc5f3a9ec5792.tar.gz core-a8e3f0a50e0e81004ec56b9b0dabc5f3a9ec5792.zip |
sw: implement page-relative size for drawing objects and import them from docx
Conflicts:
oox/inc/oox/vml/vmlshape.hxx
oox/source/vml/vmlshapecontext.cxx
svx/inc/svx/svdobj.hxx
Change-Id: I98b5c53d4860278e3646324ca045114e37b4cf61
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 7 | ||||
-rw-r--r-- | svx/source/svdraw/svdogrp.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdovirt.cxx | 4 |
4 files changed, 13 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 4359459954ca..dd049ab62a86 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1535,9 +1535,9 @@ void SdrObjCustomShape::NbcMove( const Size& rSiz ) mpLastShadowGeometry->NbcMove( rSiz ); } } -void SdrObjCustomShape::Resize( const Point& rRef, const Fraction& xFact, const Fraction& yFact ) +void SdrObjCustomShape::Resize( const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative ) { - SdrTextObj::Resize( rRef, xFact, yFact ); + SdrTextObj::Resize( rRef, xFact, yFact, bUnsetRelative ); } void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, const Fraction& ryFact ) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index ce624e0cb435..3a1fdbcb88c0 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1556,9 +1556,14 @@ void SdrObject::Move(const Size& rSiz) } } -void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) +void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative) { if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) { + if (bUnsetRelative) + { + mnRelativeWidth.reset( ); + mnRelativeHeight.reset( ); + } Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); NbcResize(rRef,xFact,yFact); SetChanged(); diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index d693d8b2035d..fca07fb60652 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -586,7 +586,7 @@ void SdrObjGroup::Move(const Size& rSiz) } -void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) +void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative) { if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) { bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); @@ -613,11 +613,11 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio sal_uIntPtr i; for (i=0; i<nObjAnz; i++) { SdrObject* pObj=pOL->GetObj(i); - if (pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact); + if (pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact,bUnsetRelative); } for (i=0; i<nObjAnz; i++) { SdrObject* pObj=pOL->GetObj(i); - if (!pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact); + if (!pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact,bUnsetRelative); } } else { ResizeRect(aOutRect,rRef,xFact,yFact); diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index 8bb8190bdd70..93ab3b8dbfb8 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -412,11 +412,11 @@ void SdrVirtObj::Move(const Size& rSiz) } } -void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) +void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative) { if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); - rRefObj.Resize(rRef-aAnchor,xFact,yFact); + rRefObj.Resize(rRef-aAnchor,xFact,yFact, bUnsetRelative); SetRectsDirty(); SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); } |