diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2022-02-06 14:05:46 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2022-02-07 07:05:17 +0100 |
commit | ed652a6af731c5cd024c245013923717b7764a60 (patch) | |
tree | 67ac6d2684178c97b58c020503b95e4fdd6e73ee /sw/source/core/unocore/unostyle.cxx | |
parent | 76fa8d13c5244cf8b1f573e849f4cd2d2347a128 (diff) |
Simplify sequences uses in sw (2)
Change-Id: Ic4b3136414d778990e179e36162ca61327cb13f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129578
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw/source/core/unocore/unostyle.cxx')
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index b19758648ddf..40b9878f59a2 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -21,6 +21,7 @@ #include <o3tl/safeint.hxx> #include <o3tl/string_view.hxx> +#include <comphelper/propertysequence.hxx> #include <hintids.hxx> #include <vcl/svapp.hxx> #include <svl/hint.hxx> @@ -598,15 +599,14 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL, uno::Sequence< beans::PropertyValue > SwXStyleFamilies::getStyleLoaderOptions() { SolarMutexGuard aGuard; - uno::Sequence< beans::PropertyValue > aSeq(5); - beans::PropertyValue* pArray = aSeq.getArray(); const uno::Any aVal(true); - pArray[0] = beans::PropertyValue(UNO_NAME_LOAD_TEXT_STYLES, -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[1] = beans::PropertyValue(UNO_NAME_LOAD_FRAME_STYLES, -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[2] = beans::PropertyValue(UNO_NAME_LOAD_PAGE_STYLES, -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[3] = beans::PropertyValue(UNO_NAME_LOAD_NUMBERING_STYLES, -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[4] = beans::PropertyValue(UNO_NAME_OVERWRITE_STYLES, -1, aVal, beans::PropertyState_DIRECT_VALUE); - return aSeq; + return comphelper::InitPropertySequence({ + { UNO_NAME_LOAD_TEXT_STYLES, aVal }, + { UNO_NAME_LOAD_FRAME_STYLES, aVal }, + { UNO_NAME_LOAD_PAGE_STYLES, aVal }, + { UNO_NAME_LOAD_NUMBERING_STYLES, aVal }, + { UNO_NAME_OVERWRITE_STYLES, aVal } + }); } static bool lcl_GetHeaderFooterItem( |