[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Mon Sep 14 05:49:46 PDT 2015


 sw/source/uibase/utlui/navicfg.cxx |   26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)

New commits:
commit b1152bdb3c0b32ba4a0dbf4690aa40086b73081d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Sep 14 14:49:21 2015 +0200

    Simplify a Sequence construction
    
    Change-Id: Ifb945147a29e26a7445d0a106542d7723e068ba3

diff --git a/sw/source/uibase/utlui/navicfg.cxx b/sw/source/uibase/utlui/navicfg.cxx
index d7dcab6..4c60c27 100644
--- a/sw/source/uibase/utlui/navicfg.cxx
+++ b/sw/source/uibase/utlui/navicfg.cxx
@@ -31,24 +31,14 @@ using namespace ::com::sun::star::uno;
 
 Sequence<OUString> SwNavigationConfig::GetPropertyNames()
 {
-    static const char* aPropNames[] =
-    {
-        "RootType",             //0
-        "SelectedPosition",     //1
-        "OutlineLevel",         //2
-        "InsertMode",           //3
-        "ActiveBlock",          //4
-        "ShowListBox",          //5
-        "GlobalDocMode"         //6
-    };
-    const int nCount = 7;
-    Sequence<OUString> aNames(nCount);
-    OUString* pNames = aNames.getArray();
-    for(int i = 0; i < nCount; i++)
-    {
-        pNames[i] = OUString::createFromAscii(aPropNames[i]);
-    }
-    return aNames;
+    return css::uno::Sequence<OUString>{
+        OUString("RootType"),
+        OUString("SelectedPosition"),
+        OUString("OutlineLevel"),
+        OUString("InsertMode"),
+        OUString("ActiveBlock"),
+        OUString("ShowListBox"),
+        OUString("GlobalDocMode")};
 }
 
 SwNavigationConfig::SwNavigationConfig() :


More information about the Libreoffice-commits mailing list