[Libreoffice-commits] core.git: Branch 'libreoffice-6-1-3' - sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 28 14:08:52 UTC 2018


 sd/source/core/stlpool.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 1cf4d604db563a47e1c7f6282226aaa45c344374
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Sat Oct 27 19:56:00 2018 +0200
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Oct 28 15:08:30 2018 +0100

    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
    Reviewed-on: https://gerrit.libreoffice.org/62436
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit be9f3db2306150a37ef18e4ccc8d8f4a1934c5c1)
    Reviewed-on: https://gerrit.libreoffice.org/62449
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>
    (cherry picked from commit 8bef4f3033fff8eb12a58d3fa4cdd49076e18cf2)
    Reviewed-on: https://gerrit.libreoffice.org/62474
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 884c9ffa1e68..43d66378f80a 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -652,7 +652,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
             pExistingSheet =
                 GetStyleSheetByPositionInIndex(aSheetsWithName.front()).get();
             if (!rRenameSuffix.isEmpty() &&
-                pExistingSheet->GetItemSet().Equals(xSheet->GetItemSet(), false))
+                !pExistingSheet->GetItemSet().Equals(xSheet->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,
@@ -664,7 +664,8 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
                     aTmpName = aName + rRenameSuffix + OUString::number(nSuffix);
                     pExistingSheet = Find(aTmpName, eFamily);
                     nSuffix++;
-                } while( pExistingSheet && pExistingSheet->GetItemSet().Equals(xSheet->GetItemSet(), false) );
+                } while (pExistingSheet &&
+                        !pExistingSheet->GetItemSet().Equals(xSheet->GetItemSet(), false));
                 aName = aTmpName;
                 bAddToList = true;
             }


More information about the Libreoffice-commits mailing list