sc/source/ui/view/tabvwsha.cxx |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 4c84edef794294e2341aaa6da775100d6ac285ba
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Thu Dec 7 23:31:11 2017 +0100

    simplify construction of a const vector
    
    Change-Id: I9860e6dc113df6d2d95f75df647a54bd8c9a5c1d
    Reviewed-on: https://gerrit.libreoffice.org/46054
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>

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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to