i123048 Corrected connector layout after reload
Notes:
merged as: 7c03fc2fe77f9b1f910f4ab395923e52648c32b5
diff --git a/svx/inc/svx/svdoedge.hxx b/svx/inc/svx/svdoedge.hxx
index 45d1c9f..2b03aaa 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 9756023..67f3573 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;