diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-06-11 15:44:56 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-06-11 18:12:48 +0200 |
commit | b49fce18d0b05a8b5f462ba9bf6c84f0bb107d93 (patch) | |
tree | 5467d582e25cba593d89f22835fe0f8f2f697c12 /sdext/source/presenter/PresenterTheme.cxx | |
parent | 513b54df70b5b9cde8d6ca2304378949256eea1d (diff) |
Simplify vector initializations
Change-Id: Icf8972be204799e9b3b3824ab18d8584911fe1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117061
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sdext/source/presenter/PresenterTheme.cxx')
-rw-r--r-- | sdext/source/presenter/PresenterTheme.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx index 52c2d875d4ef..bf911dd970c4 100644 --- a/sdext/source/presenter/PresenterTheme.cxx +++ b/sdext/source/presenter/PresenterTheme.cxx @@ -52,12 +52,13 @@ public: vector<sal_Int32> ToVector() { - vector<sal_Int32> aSequence (4); - aSequence[0] = mnLeft == mnInvalidValue ? 0 : mnLeft; - aSequence[1] = mnTop == mnInvalidValue ? 0 : mnTop; - aSequence[2] = mnRight == mnInvalidValue ? 0 : mnRight; - aSequence[3] = mnBottom == mnInvalidValue ? 0 : mnBottom; - return aSequence; + return + { + mnLeft == mnInvalidValue ? 0 : mnLeft, + mnTop == mnInvalidValue ? 0 : mnTop, + mnRight == mnInvalidValue ? 0 : mnRight, + mnBottom == mnInvalidValue ? 0 : mnBottom + }; }; void Merge (const BorderSize& rBorderSize) @@ -1034,9 +1035,7 @@ void StyleAssociationContainer::Read ( if (!xStyleAssociationList.is()) return; - ::std::vector<OUString> aProperties (2); - aProperties[0] = "ResourceURL"; - aProperties[1] = "StyleName"; + ::std::vector<OUString> aProperties { "ResourceURL", "StyleName" }; PresenterConfigurationAccess::ForAll( xStyleAssociationList, aProperties, |