Author: alg
Date: Mon Sep  2 14:30:09 2013
New Revision: 1519451

URL: http://svn.apache.org/r1519451
Log:
i123048 Corrected connector layout after reload

Modified:
    openoffice/trunk/main/svx/inc/svx/svdoedge.hxx
    openoffice/trunk/main/svx/source/svdraw/svdoedge.cxx

Modified: openoffice/trunk/main/svx/inc/svx/svdoedge.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svdoedge.hxx?rev=1519451&r1=1519450&r2=1519451&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/svdoedge.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/svdoedge.hxx Mon Sep  2 14:30:09 2013
@@ -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

Modified: openoffice/trunk/main/svx/source/svdraw/svdoedge.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/svdraw/svdoedge.cxx?rev=1519451&r1=1519450&r2=1519451&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/svdraw/svdoedge.cxx (original)
+++ openoffice/trunk/main/svx/source/svdraw/svdoedge.cxx Mon Sep  2 14:30:09 
2013
@@ -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,10 +553,17 @@ 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())
     {
-               return;
+        mbSuppressed = true;
+        return;
     }
 
        // #110649#
@@ -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;


Reply via email to