From 346749c2d26b4e4e9f0cd95df496e01b1875e3d6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Oct 27 2018 18:29:23 +0000 Subject: tdf#120376 fix duplicated styles on copy paste in draw --- diff --git a/0001-tdf-120376-sd-fix-duplicated-styles-on-copy-paste.patch b/0001-tdf-120376-sd-fix-duplicated-styles-on-copy-paste.patch new file mode 100644 index 0000000..b62a306 --- /dev/null +++ b/0001-tdf-120376-sd-fix-duplicated-styles-on-copy-paste.patch @@ -0,0 +1,41 @@ +From 69561c112dbaac0df32500e5c50e1ea3236d4b50 Mon Sep 17 00:00:00 2001 +From: Michael Stahl +Date: Sat, 27 Oct 2018 19:56:00 +0200 +Subject: [PATCH] tdf#120376 sd: fix duplicated styles on copy/paste + +Unfortunately the comparison was inverted, so a style is copied +iff it already exists, which is clearly the reviewer's fault... + +(regression from 57db6e24b5ad43d447c30e44a112c74c7e75b46b) + +Change-Id: I3425982feb08e980eca9243cc16120897b65a70f +--- + sd/source/core/stlpool.cxx | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx +index ff2a55a22f80..47c105a7d38a 100644 +--- a/sd/source/core/stlpool.cxx ++++ b/sd/source/core/stlpool.cxx +@@ -651,7 +651,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily + pExistingSheet = + GetStyleSheetByPositionInIndex(aSheetsWithName.front()); + if (!rRenameSuffix.isEmpty() && +- pExistingSheet->GetItemSet().Equals(pSheet->GetItemSet(), false)) ++ !pExistingSheet->GetItemSet().Equals(pSheet->GetItemSet(), false)) + { + // we have found a sheet with the same name, but different contents. Try to find a new name. + // If we already have a sheet with the new name, and it is equal to the one in the source pool, +@@ -663,7 +663,8 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily + aTmpName = aName + rRenameSuffix + OUString::number(nSuffix); + pExistingSheet = Find(aTmpName, eFamily); + nSuffix++; +- } while( pExistingSheet && pExistingSheet->GetItemSet().Equals(pSheet->GetItemSet(), false) ); ++ } while (pExistingSheet && ++ !pExistingSheet->GetItemSet().Equals(pSheet->GetItemSet(), false)); + aName = aTmpName; + bAddToList = true; + } +-- +2.17.1 + diff --git a/libreoffice.spec b/libreoffice.spec index 79e3fdd..834791f 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -64,7 +64,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 2%{?libo_prerelease}%{?dist} +Release: 3%{?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 MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -283,6 +283,7 @@ Patch12: 0001-implement-pdf-export-of-underline-for-outlined-font.patch Patch13: 0001-cov-scan-help-warnings.patch Patch14: 0001-cov-scan-warnings.patch Patch15: 0001-cannot-interact-with-chart-sidebar-as-the-previous-d.patch +Patch16: 0001-tdf-120376-sd-fix-duplicated-styles-on-copy-paste.patch %if 0%{?rhel} # not upstreamed @@ -2328,6 +2329,9 @@ done %{_includedir}/LibreOfficeKit %changelog +* Sat Oct 27 2018 Caolán McNamara - 1:6.0.6.2-3 +- tdf#120376 fix duplicated styles on copy paste in draw + * Mon Oct 22 2018 Caolán McNamara - 1:6.0.6.2-2 - fix inability to interact with chart sidebar