diff options
author | Armin Le Grand <alg@apache.org> | 2013-09-02 14:30:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-02 20:16:18 +0100 |
commit | 7c03fc2fe77f9b1f910f4ab395923e52648c32b5 (patch) | |
tree | e19128377e8f55dd9717dc277389210c1164a2c0 /svx/source/svdraw/svdoedge.cxx | |
parent | 69895a60c839a865320a62cc2b659c660f5c0de6 (diff) |
Related: #i123048# Corrected connector layout after reload
(cherry picked from commit c7d96eed93415894c5ca4522bd32ca06acd88233)
Conflicts:
svx/inc/svx/svdoedge.hxx
svx/source/svdraw/svdoedge.cxx
Change-Id: Id388fa7396751a2e8b5908373ca57eceee1a1af1
Diffstat (limited to 'svx/source/svdraw/svdoedge.cxx')
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 9cd1071d2f1b..afb70f390a3b 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -174,7 +174,8 @@ SdrEdgeObj::SdrEdgeObj() bEdgeTrackUserDefined(sal_False), // Default is to allow default connects mbSuppressDefaultConnect(sal_False), - mbBoundRectCalculationRunning(sal_False) + mbBoundRectCalculationRunning(sal_False), + mbSuppressed(false) { bClosedObj=sal_False; bIsEdge=sal_True; @@ -546,12 +547,20 @@ void SdrEdgeObj::ImpUndirtyEdgeTrack() void SdrEdgeObj::ImpRecalcEdgeTrack() { - // #i120437# if bEdgeTrackUserDefined, do not recalculate. Also not when model locked - if(bEdgeTrackUserDefined || !GetModel() || GetModel()->isLocked()) + // #i120437# if bEdgeTrackUserDefined, do not recalculate + if(bEdgeTrackUserDefined) { return; } + // #i120437# also not when model locked during import, but remember + if(!GetModel() || GetModel()->isLocked()) + { + mbSuppressed = true; + return; + } + + // #i110649# if(IsBoundRectCalculationRunning()) { // This object is involved into another ImpRecalcEdgeTrack() call @@ -559,20 +568,20 @@ 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 calculate EdgeTrack and secure properties there - mbBoundRectCalculationRunning = sal_True; - *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo); - ImpSetAttrToEdgeInfo(); - bEdgeTrackDirty=sal_False; - mbBoundRectCalculationRunning = sal_False; - } else { - // To not run in a depth loop, use a coloring algorithm on + if(mbSuppressed) + { + // #i123048# 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; |