diff options
author | Armin Le Grand <alg@apache.org> | 2013-09-02 14:30:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-02 05:13:20 -0600 |
commit | c2afbdb2f3c575fb29f9d8ceaad94d37ee6a05ac (patch) | |
tree | a67e44e55612e9fe59e2f6595fe3dd465a5a7aca | |
parent | c17453ed05aeef42e2e16c4df5f48e1a757d109f (diff) |
Related: #i123048# Corrected connector layout after reload
(cherry picked from commit c7d96eed93415894c5ca4522bd32ca06acd88233)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Conflicts:
svx/inc/svx/svdoedge.hxx
svx/source/svdraw/svdoedge.cxx
Change-Id: Id388fa7396751a2e8b5908373ca57eceee1a1af1
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/6862
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/svx/svdoedge.hxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 39 |
2 files changed, 28 insertions, 15 deletions
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx index ea0968cd9487..180369f81743 100644 --- a/include/svx/svdoedge.hxx +++ b/include/svx/svdoedge.hxx @@ -182,6 +182,10 @@ protected: // is running, the flag is set, else it is always sal_False. unsigned mbBoundRectCalculationRunning : 1; + // #i123048# 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 d30350b89bdc..98c57f9516ca 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -171,7 +171,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; @@ -543,12 +544,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 @@ -556,20 +565,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; |