diff options
author | Armin Le Grand <alg@apache.org> | 2013-09-02 14:30:09 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-09-02 14:30:09 +0000 |
commit | c7d96eed93415894c5ca4522bd32ca06acd88233 (patch) | |
tree | ade301c5e471e48a17dbe934575dd3d81a0c2783 | |
parent | 06ccd57389a708bb168a1402521c8bb45a262fd7 (diff) |
i123048 Corrected connector layout after reload
Notes
merged as: 7c03fc2fe77f9b1f910f4ab395923e52648c32b5
-rw-r--r-- | svx/inc/svx/svdoedge.hxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 36 |
2 files changed, 26 insertions, 14 deletions
diff --git a/svx/inc/svx/svdoedge.hxx b/svx/inc/svx/svdoedge.hxx index 45d1c9f25e8f..2b03aaa49fda 100644 --- a/svx/inc/svx/svdoedge.hxx +++ b/svx/inc/svx/svdoedge.hxx @@ -186,6 +186,10 @@ protected: // is running, the flag is set, else it is always sal_False. unsigned mbBoundRectCalculationRunning : 1; + // #123048# need to remember if layouting was suppressed before to get + // to a correct state for first real layouting + unsigned mbSuppressed : 1; + public: // #109007# // Interface to default connect suppression diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 9756023d6511..67f3573d1276 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -179,7 +179,8 @@ SdrEdgeObj::SdrEdgeObj() // #109007# Default is to allow default connects mbSuppressDefaultConnect(sal_False), // #110649# - mbBoundRectCalculationRunning(sal_False) + mbBoundRectCalculationRunning(sal_False), + mbSuppressed(false) { bClosedObj=sal_False; bIsEdge=sal_True; @@ -552,12 +553,19 @@ void SdrEdgeObj::ImpUndirtyEdgeTrack() void SdrEdgeObj::ImpRecalcEdgeTrack() { - // #120437# if bEdgeTrackUserDefined, do not recalculate. Also not when model locked - if(bEdgeTrackUserDefined || !GetModel() || GetModel()->isLocked()) + // #120437# if bEdgeTrackUserDefined, do not recalculate + if(bEdgeTrackUserDefined) { return; } + // #120437# also not when model locked during import, but remember + if(!GetModel() || GetModel()->isLocked()) + { + mbSuppressed = true; + return; + } + // #110649# if(IsBoundRectCalculationRunning()) { @@ -566,19 +574,19 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() // Also, do not change bEdgeTrackDirty so that it gets recalculated // later at the first non-looping call. } - // #i43068# - else if(GetModel() && GetModel()->isLocked()) - { - // avoid re-layout during imports/API call sequences - // #i45294# but calc EdgeTrack and secure properties there - mbBoundRectCalculationRunning = sal_True; - *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo); - ImpSetAttrToEdgeInfo(); - bEdgeTrackDirty=sal_False; - mbBoundRectCalculationRunning = sal_False; - } else { + if(mbSuppressed) + { + // #123048# If layouting was ever suppressed, it needs to be done once + // and the attr need to be set at EdgeInfo, else these attr *will be lost* + // in the following call to ImpSetEdgeInfoToAttr() sice they were never + // set before (!) + *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo); + ImpSetAttrToEdgeInfo(); + mbSuppressed = false; + } + // To not run in a depth loop, use a coloring algorythm on // SdrEdgeObj BoundRect calculations mbBoundRectCalculationRunning = sal_True; |