[Libreoffice-commits] core.git: sw/source
Szymon Kłos
szymon.klos at collabora.com
Fri Sep 22 09:48:24 UTC 2017
sw/source/core/edit/edfcol.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 5e1be0161918fac4f7ce642e3b4a6ba767658124
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>
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 2cd631b047f6..99853acf09de 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -571,9 +571,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::vector<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);
const OUString aServiceName = "com.sun.star.text.TextField.DocInfo.Custom";
@@ -879,9 +879,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::vector<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