[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source

Szymon Kłos szymon.klos at collabora.com
Tue Sep 26 09:13:34 UTC 2017


 sw/source/core/edit/edfcol.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 3a2da5ebadd45511b5505fb72d9ca2d4254304cc
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Thu Sep 21 09:43:36 2017 +0200

    Watermark: apply to existing styles (also not used)
    
    Change-Id: Ic57418f3191cc3c30a348db3e784d4cfbeffae79
    Reviewed-on: https://gerrit.libreoffice.org/42576
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/42755
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 06a33461430f..6d8ac2eb87e6 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -205,9 +205,9 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli
     uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xModel, uno::UNO_QUERY);
     uno::Reference<container::XNameAccess> xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
     uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY);
+    uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
 
-    std::set<OUString> aUsedPageStyles = lcl_getUsedPageStyles(this);
-    for (const OUString& rPageStyleName : aUsedPageStyles)
+    for (const OUString& rPageStyleName : aStyles)
     {
         uno::Reference<beans::XPropertySet> xPageStyle(xStyleFamily->getByName(rPageStyleName), uno::UNO_QUERY);
         OUString aServiceName = "com.sun.star.text.TextField.DocInfo.Custom";
@@ -513,9 +513,9 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
     uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xModel, uno::UNO_QUERY);
     uno::Reference<container::XNameAccess> xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
     uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY);
+    uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
 
-    std::set<OUString> aUsedPageStyles = lcl_getUsedPageStyles(this);
-    for (const OUString& rPageStyleName : aUsedPageStyles)
+    for (const OUString& rPageStyleName : aStyles)
     {
         uno::Reference<beans::XPropertySet> xPageStyle(xStyleFamily->getByName(rPageStyleName), uno::UNO_QUERY);
 


More information about the Libreoffice-commits mailing list