[libreoffice/f20] Resolves: rhbz#1039902 Corrected connector layout after reload

Caolán McNamara caolanm at fedoraproject.org
Tue Dec 10 10:44:26 UTC 2013


commit 874722fe9cb28649c6b62f8d04832592656628ab
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 10 10:44:04 2013 +0000

    Resolves: rhbz#1039902 Corrected connector layout after reload

 ...3048-Corrected-connector-layout-after-rel.patch |  114 ++++++++++++++++++++
 libreoffice.spec                                   |    7 +-
 2 files changed, 120 insertions(+), 1 deletions(-)
---
diff --git a/0001-Related-i123048-Corrected-connector-layout-after-rel.patch b/0001-Related-i123048-Corrected-connector-layout-after-rel.patch
new file mode 100644
index 0000000..e57ada6
--- /dev/null
+++ b/0001-Related-i123048-Corrected-connector-layout-after-rel.patch
@@ -0,0 +1,114 @@
+From c2afbdb2f3c575fb29f9d8ceaad94d37ee6a05ac Mon Sep 17 00:00:00 2001
+From: Armin Le Grand <alg at apache.org>
+Date: Mon, 2 Sep 2013 14:30:09 +0000
+Subject: [PATCH] Related: #i123048# Corrected connector layout after reload
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+(cherry picked from commit c7d96eed93415894c5ca4522bd32ca06acd88233)
+
+Signed-off-by: Andras Timar <andras.timar at collabora.com>
+
+Conflicts:
+	svx/inc/svx/svdoedge.hxx
+	svx/source/svdraw/svdoedge.cxx
+
+Change-Id: Id388fa7396751a2e8b5908373ca57eceee1a1af1
+Signed-off-by: Andras Timar <andras.timar at collabora.com>
+Reviewed-on: https://gerrit.libreoffice.org/6862
+Reviewed-by: Caolán McNamara <caolanm at redhat.com>
+Tested-by: Caolán McNamara <caolanm at redhat.com>
+---
+ include/svx/svdoedge.hxx       |  4 ++++
+ 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 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;
+ 
+-- 
+1.8.3.1
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 70705d0..808770e 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -43,7 +43,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        10%{?libo_prerelease}%{?dist}
+Release:        11%{?libo_prerelease}%{?dist}
 License:        (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
 Group:          Applications/Productivity
 URL:            http://www.libreoffice.org/default/
@@ -281,6 +281,7 @@ Patch40: 0001-rhbz-1030009-Remove-global-XModel-ref.patch
 Patch41: 0001-Resolves-rhbz-1035092-no-shortcut-key-for-Italian-To.patch
 Patch42: 0001-Resolves-rhbz-912529-Kerkis-SmallCaps-shown-instead-.patch
 Patch43: 0001-Resolves-rhbz-1038189-refresh-printer-list-when-prin.patch
+Patch44: 0001-Related-i123048-Corrected-connector-layout-after-rel.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -1059,6 +1060,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch41 -p1 -b .rhbz-1035092-no-shortcut-key-for-Italian-To.patch
 %patch42 -p1 -b .rhbz-912529-Kerkis-SmallCaps-shown-instead-.patch
 %patch43 -p1 -b .rhbz-1038189-refresh-printer-list-when-prin.patch
+%patch44 -p1 -b .i123048-Corrected-connector-layout-after-rel.patch
 
 # TODO: check this
 # these are horribly incomplete--empty translations and copied english
@@ -2148,6 +2150,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Tue Dec 10 2013 Caolán McNamara <caolanm at redhat.com> - 1:4.1.3.2-11
+- Resolves: rhbz#1039902 Corrected connector layout after reload
+
 * Wed Dec 04 2013 Caolán McNamara <caolanm at redhat.com> - 1:4.1.3.2-10
 - Resolves: rhbz#912529 Kerkis SmallCaps shown instead of Kerkis Regular
 - Resolves: rhbz#1038189 refresh printer list when print dialog launched


More information about the scm-commits mailing list