include/svx/svdoedge.hxx | 4 ++++ svx/source/svdraw/svdoedge.cxx | 39 ++++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-)
New commits: commit 046de18a83f156fe66d7999486ee23c522ab321e Author: Armin Le Grand <a...@apache.org> Date: Mon Sep 2 14:30:09 2013 +0000 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 diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx index ea0968c..180369f 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 d30350b..98c57f9 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits