filter/source/msfilter/msdffimp.cxx | 10 ++ svx/source/svdraw/svdmodel.cxx | 4 - svx/source/svdraw/svdoedge.cxx | 123 +++++++++++++++++++++++------------- svx/source/svdraw/svdpage.cxx | 19 +++-- xmloff/source/draw/xexptran.cxx | 2 xmloff/source/draw/ximpshap.cxx | 2 6 files changed, 106 insertions(+), 54 deletions(-)
New commits: commit 87ee9a16b8993d4bc07292326ddfd4f8277bcd26 Author: Caolán McNamara <caol...@redhat.com> Date: Sat May 18 20:08:17 2013 +0100 set some bug id prefixes to indicate which tracker they are from Change-Id: I5df2dd44a0612da893b1afe08d0c7a9ea71f3905 diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 61a0771..97f8443 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -1582,7 +1582,7 @@ void SdXMLImExSvgDElement::AddPolygon( // some more circumstances in account when looking at curve segments. drawing::PolygonFlags* pFlagArray = (pFlags) ? pFlags->getArray() : 0L; - // #121090# only reduce double start/end points if polygon *is* closed + // #i121090# only reduce double start/end points if polygon *is* closed if(bClosed && (pPointArray->X == (pPointArray + (nCnt - 1))->X) && (pPointArray->Y == (pPointArray + (nCnt - 1))->Y)) { if(pFlags) diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 7447e17..1906703 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -1233,7 +1233,7 @@ void SdXMLEllipseShapeContext::StartElement(const uno::Reference< xml::sax::XAtt if(mnCX != 0 || mnCY != 0 || mnRX != 1 || mnRY != 1) { - // #121972# center/radius is used, put to pos and size + // #i121972# center/radius is used, put to pos and size maSize.Width = 2 * mnRX; maSize.Height = 2 * mnRY; maPosition.X = mnCX - mnRX; commit eb8971e5fe52bcb80eff56846182ac30c261e111 Author: Armin Le Grand <a...@apache.org> Date: Mon Aug 6 08:32:18 2012 +0000 Resolves: #i120437# Connector corrections in groups and PPT imports (cherry picked from commit b26e298d31cad25c326041287acb6544efac21c6) Conflicts: svx/source/svdraw/svdoedge.cxx Change-Id: Id4bed1c85bccdae878872557fd3e625d772228ff diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 549643b..922dec3 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4508,6 +4508,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r RotatePoint(aPoint1, aCenter, ss, cc); RotatePoint(aPoint2, aCenter, ss, cc); + + // #i120437# reset rotation, it is part of the path and shall not be applied again + nObjectRotation = 0; } // rotate/mirror line within the area as we need it @@ -4516,14 +4519,19 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r sal_Int32 n = aPoint1.X(); aPoint1.X() = aPoint2.X(); aPoint2.X() = n; + + // #i120437# reset hor filp + nSpFlags &= ~SP_FFLIPH; } if ( nSpFlags & SP_FFLIPV ) { sal_Int32 n = aPoint1.Y(); aPoint1.Y() = aPoint2.Y(); aPoint2.Y() = n; + + // #i120437# reset ver filp + nSpFlags &= ~SP_FFLIPV; } - nSpFlags &= ~( SP_FFLIPV | SP_FFLIPH ); pRet->NbcSetPoint(aPoint1, 0L); // start point pRet->NbcSetPoint(aPoint2, 1L); // endpoint diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 312c9c6..a184de7 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1843,11 +1843,13 @@ void SdrModel::setLock( bool bLock ) { if( mbModelLocked != bLock ) { + // #i120437# need to set first, else ImpReformatAllEdgeObjects will do nothing + mbModelLocked = bLock; + if( sal_False == bLock ) { ImpReformatAllEdgeObjects(); } - mbModelLocked = bLock; } } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index c4a1763..d30350b 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -462,6 +462,10 @@ void SdrEdgeObj::ConnectToNode(bool bTail1, SdrObject* pObj) if (pObj!=NULL) { pObj->AddListener(*this); rCon.pObj=pObj; + + // #i120437# If connection is set, reset bEdgeTrackUserDefined + bEdgeTrackUserDefined = false; + ImpDirtyEdgeTrack(); } } @@ -539,8 +543,11 @@ void SdrEdgeObj::ImpUndirtyEdgeTrack() void SdrEdgeObj::ImpRecalcEdgeTrack() { - if ( bEdgeTrackUserDefined && (GetModel() && GetModel()->isLocked()) ) + // #i120437# if bEdgeTrackUserDefined, do not recalculate. Also not when model locked + if(bEdgeTrackUserDefined || !GetModel() || GetModel()->isLocked()) + { return; + } if(IsBoundRectCalculationRunning()) { @@ -554,17 +561,17 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() { // avoid re-layout during imports/API call sequences // #i45294# but calculate EdgeTrack and secure properties there - ((SdrEdgeObj*)this)->mbBoundRectCalculationRunning = sal_True; + mbBoundRectCalculationRunning = sal_True; *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo); ImpSetAttrToEdgeInfo(); bEdgeTrackDirty=sal_False; - ((SdrEdgeObj*)this)->mbBoundRectCalculationRunning = sal_False; + mbBoundRectCalculationRunning = sal_False; } else { // To not run in a depth loop, use a coloring algorithm on // SdrEdgeObj BoundRect calculations - ((SdrEdgeObj*)this)->mbBoundRectCalculationRunning = sal_True; + mbBoundRectCalculationRunning = sal_True; Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetCurrentBoundRect(); SetRectsDirty(); @@ -577,7 +584,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); - ((SdrEdgeObj*)this)->mbBoundRectCalculationRunning = sal_False; + mbBoundRectCalculationRunning = sal_False; } } @@ -2256,65 +2263,95 @@ void SdrEdgeObj::NbcResize(const Point& rRefPnt, const Fraction& aXFact, const F } // #i54102# added rotation support -void SdrEdgeObj::NbcRotate(const Point& rRef, long /*nWink*/, double sn, double cs) +void SdrEdgeObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) { - // handle start and end point if not connected - bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage; - bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage; - - if(!bCon1 && pEdgeTrack) + if(bEdgeTrackUserDefined) { - RotatePoint((*pEdgeTrack)[0],rRef,sn,cs); - ImpDirtyEdgeTrack(); + // #i120437# special handling when track is imported, apply + // transformation directly to imported track. + SdrTextObj::NbcRotate(rRef, nWink, sn, cs); + RotateXPoly(*pEdgeTrack, rRef, sn, cs); } - - if(!bCon2 && pEdgeTrack) + else { - sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); - RotatePoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,sn,cs); - ImpDirtyEdgeTrack(); + // handle start and end point if not connected + bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage; + bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage; + + if(!bCon1 && pEdgeTrack) + { + RotatePoint((*pEdgeTrack)[0],rRef,sn,cs); + ImpDirtyEdgeTrack(); + } + + if(!bCon2 && pEdgeTrack) + { + sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); + RotatePoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,sn,cs); + ImpDirtyEdgeTrack(); + } } } // #i54102# added mirror support void SdrEdgeObj::NbcMirror(const Point& rRef1, const Point& rRef2) { - // handle start and end point if not connected - bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage; - bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage; - - if(!bCon1 && pEdgeTrack) + if(bEdgeTrackUserDefined) { - MirrorPoint((*pEdgeTrack)[0],rRef1,rRef2); - ImpDirtyEdgeTrack(); + // #i120437# special handling when track is imported, apply + // transformation directly to imported track. + SdrTextObj::NbcMirror(rRef1, rRef2); + MirrorXPoly(*pEdgeTrack, rRef1, rRef2); } - - if(!bCon2 && pEdgeTrack) + else { - sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); - MirrorPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef1,rRef2); - ImpDirtyEdgeTrack(); + // handle start and end point if not connected + bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage; + bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage; + + if(!bCon1 && pEdgeTrack) + { + MirrorPoint((*pEdgeTrack)[0],rRef1,rRef2); + ImpDirtyEdgeTrack(); + } + + if(!bCon2 && pEdgeTrack) + { + sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); + MirrorPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef1,rRef2); + ImpDirtyEdgeTrack(); + } } } // #i54102# added shear support -void SdrEdgeObj::NbcShear(const Point& rRef, long /*nWink*/, double tn, bool bVShear) +void SdrEdgeObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { - // handle start and end point if not connected - bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage; - bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage; - - if(!bCon1 && pEdgeTrack) + if(bEdgeTrackUserDefined) { - ShearPoint((*pEdgeTrack)[0],rRef,tn,bVShear); - ImpDirtyEdgeTrack(); + // #i120437# special handling when track is imported, apply + // transformation directly to imported track. + SdrTextObj::NbcShear(rRef, nWink, tn, bVShear); + ShearXPoly(*pEdgeTrack, rRef, tn, bVShear); } - - if(!bCon2 && pEdgeTrack) + else { - sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); - ShearPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,tn,bVShear); - ImpDirtyEdgeTrack(); + // handle start and end point if not connected + bool bCon1=aCon1.pObj!=NULL && aCon1.pObj->GetPage()==pPage; + bool bCon2=aCon2.pObj!=NULL && aCon2.pObj->GetPage()==pPage; + + if(!bCon1 && pEdgeTrack) + { + ShearPoint((*pEdgeTrack)[0],rRef,tn,bVShear); + ImpDirtyEdgeTrack(); + } + + if(!bCon2 && pEdgeTrack) + { + sal_uInt16 nPntAnz = pEdgeTrack->GetPointCount(); + ShearPoint((*pEdgeTrack)[sal_uInt16(nPntAnz-1)],rRef,tn,bVShear); + ImpDirtyEdgeTrack(); + } } } diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 715653f..58943d2 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -679,14 +679,17 @@ void SdrObjList::ReformatAllTextObjects() */ void SdrObjList::ReformatAllEdgeObjects() { - const sal_uInt32 nCount=GetObjCount(); - sal_uInt32 nObj; + // #i120437# go over whole hierarchy, not only over object level null (seen from grouping) + SdrObjListIter aIter(*this, IM_DEEPNOGROUPS); - for( nObj = 0; nObj < nCount; nObj++ ) + while(aIter.IsMore()) { - SdrObject* pObj = GetObj(nObj); - if( pObj->ISA(SdrEdgeObj) ) - static_cast<SdrEdgeObj*>(pObj)->Reformat(); + SdrEdgeObj* pSdrEdgeObj = dynamic_cast< SdrEdgeObj* >(aIter.Next()); + + if(pSdrEdgeObj) + { + pSdrEdgeObj->Reformat(); + } } } @@ -1765,7 +1768,9 @@ void SdrPage::SetInserted( bool bIns ) { mbInserted = bIns; - SdrObjListIter aIter( *this, IM_FLAT ); + // #i120437# go over whole hierarchy, not only over object level null (seen from grouping) + SdrObjListIter aIter(*this, IM_DEEPNOGROUPS); + while ( aIter.IsMore() ) { SdrObject* pObj = aIter.Next();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits