summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-11 15:44:56 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-11 18:12:48 +0200
commitb49fce18d0b05a8b5f462ba9bf6c84f0bb107d93 (patch)
tree5467d582e25cba593d89f22835fe0f8f2f697c12 /sdext
parent513b54df70b5b9cde8d6ca2304378949256eea1d (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')
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx28
-rw-r--r--sdext/source/presenter/PresenterTheme.cxx17
2 files changed, 24 insertions, 21 deletions
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index 30f1864e8aed..c624adcdf614 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -663,13 +663,15 @@ void PresenterScreen::ProcessLayout (
"Layout"),
UNO_QUERY_THROW);
- ::std::vector<OUString> aProperties (6);
- aProperties[0] = "PaneURL";
- aProperties[1] = "ViewURL";
- aProperties[2] = "RelativeX";
- aProperties[3] = "RelativeY";
- aProperties[4] = "RelativeWidth";
- aProperties[5] = "RelativeHeight";
+ ::std::vector<OUString> aProperties
+ {
+ "PaneURL",
+ "ViewURL",
+ "RelativeX",
+ "RelativeY",
+ "RelativeWidth",
+ "RelativeHeight"
+ };
PresenterConfigurationAccess::ForAll(
xList,
aProperties,
@@ -692,11 +694,13 @@ void PresenterScreen::ProcessViewDescriptions (
rConfiguration.GetConfigurationNode("Presenter/Views"),
UNO_QUERY_THROW);
- ::std::vector<OUString> aProperties (4);
- aProperties[0] = "ViewURL";
- aProperties[1] = "Title";
- aProperties[2] = "AccessibleTitle";
- aProperties[3] = "IsOpaque";
+ ::std::vector<OUString> aProperties
+ {
+ "ViewURL",
+ "Title",
+ "AccessibleTitle",
+ "IsOpaque"
+ };
PresenterConfigurationAccess::ForAll(
xViewDescriptionsNode,
aProperties,
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,