summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-12-07 23:31:11 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-08 07:19:55 +0100
commit4c84edef794294e2341aaa6da775100d6ac285ba (patch)
tree16fb8dc9ba34890543144f3ea1a066fc92aae34d
parentcecaa5974775cfbb2884c7bdd6e9c497c52f14ad (diff)
simplify construction of a const vector
Change-Id: I9860e6dc113df6d2d95f75df647a54bd8c9a5c1d Reviewed-on: https://gerrit.libreoffice.org/46054 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/view/tabvwsha.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 861ced08b5a6..64aee60e6b09 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -481,15 +481,14 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
pOldSet->MergeRange(SID_ATTR_BORDER_STYLES, SID_ATTR_BORDER_DEFAULT_WIDTH);
// We only allow these border line types.
- std::vector<sal_Int32> aBorderStyles;
- aBorderStyles.reserve(5);
- aBorderStyles.push_back(table::BorderLineStyle::SOLID);
- aBorderStyles.push_back(table::BorderLineStyle::DOTTED);
- aBorderStyles.push_back(table::BorderLineStyle::DASHED);
- aBorderStyles.push_back(table::BorderLineStyle::FINE_DASHED);
- aBorderStyles.push_back(table::BorderLineStyle::DASH_DOT);
- aBorderStyles.push_back(table::BorderLineStyle::DASH_DOT_DOT);
- aBorderStyles.push_back(table::BorderLineStyle::DOUBLE_THIN);
+ const std::vector<sal_Int32> aBorderStyles{
+ table::BorderLineStyle::SOLID,
+ table::BorderLineStyle::DOTTED,
+ table::BorderLineStyle::DASHED,
+ table::BorderLineStyle::FINE_DASHED,
+ table::BorderLineStyle::DASH_DOT,
+ table::BorderLineStyle::DASH_DOT_DOT,
+ table::BorderLineStyle::DOUBLE_THIN };
SfxIntegerListItem aBorderStylesItem(SID_ATTR_BORDER_STYLES, aBorderStyles);
pOldSet->Put(aBorderStylesItem);