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

Takeshi Abe tabe at fixedpoint.jp
Wed Apr 11 07:31:55 UTC 2018


 toolkit/source/controls/controlmodelcontainerbase.cxx |   56 ++++++++----------
 1 file changed, 27 insertions(+), 29 deletions(-)

New commits:
commit 5823ecd54b16974ffe8821a5ae061cd0ecc4cf84
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Apr 10 22:12:06 2018 +0900

    toolkit: Recover missing service names for ControlModelContainerBase
    
    namely:
    com.sun.star.awt.UnoControlProgressBarModel
    com.sun.star.awt.UnoControlScrollBarModel
    com.sun.star.awt.UnoControlFixedLineModel
    com.sun.star.awt.UnoControlRoadmapModel
    
    They seems accidentally dropped at 45fe77164c90cf15b78cd8b99adc043e2dd26be1.
    
    Change-Id: Iebd72cadc9eb9bdcb80f9b8c11f6e5e40bdb50a2
    Reviewed-on: https://gerrit.libreoffice.org/52673
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 8f6cf1783f29..767501c91b4d 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -413,35 +413,33 @@ Reference< XInterface > ControlModelContainerBase::createInstanceWithArguments(
 
 Sequence< OUString > ControlModelContainerBase::getAvailableServiceNames()
 {
-    static Sequence< OUString >* pNamesSeq = nullptr;
-    if ( !pNamesSeq )
-    {
-        pNamesSeq = new Sequence< OUString >( 26 );
-        OUString* pNames = pNamesSeq->getArray();
-        pNames[0] = "com.sun.star.awt.UnoControlEditModel";
-        pNames[1] = "com.sun.star.awt.UnoControlFormattedFieldModel";
-        pNames[2] = "com.sun.star.awt.UnoControlFileControlModel";
-        pNames[3] = "com.sun.star.awt.UnoControlButtonModel";
-        pNames[4] = "com.sun.star.awt.UnoControlImageControlModel";
-        pNames[5] = "com.sun.star.awt.UnoControlRadioButtonModel";
-        pNames[6] = "com.sun.star.awt.UnoControlCheckBoxModel";
-        pNames[7] = "com.sun.star.awt.UnoControlFixedTextModel";
-        pNames[8] = "com.sun.star.awt.UnoControlGroupBoxModel";
-        pNames[9] = "com.sun.star.awt.UnoControlListBoxModel";
-        pNames[10] = "com.sun.star.awt.UnoControlComboBoxModel";
-        pNames[11] = "com.sun.star.awt.UnoControlDateFieldModel";
-        pNames[12] = "com.sun.star.awt.UnoControlTimeFieldModel";
-        pNames[13] = "com.sun.star.awt.UnoControlNumericFieldModel";
-        pNames[14] = "com.sun.star.awt.UnoControlCurrencyFieldModel";
-        pNames[15] = "com.sun.star.awt.UnoControlPatternFieldModel";
-        pNames[16] = "com.sun.star.awt.tree.TreeControlModel";
-        pNames[21] = "com.sun.star.awt.grid.UnoControlGridModel";
-        pNames[22] = "com.sun.star.awt.tab.UnoControlTabPageContainerModel";
-        pNames[23] = "com.sun.star.awt.tab.UnoControlTabPageModel";
-        pNames[24] = "com.sun.star.awt.UnoMultiPageModel";
-        pNames[25] = "com.sun.star.awt.UnoFrameModel";
-    }
-    return *pNamesSeq;
+    return { "com.sun.star.awt.UnoControlEditModel",
+            "com.sun.star.awt.UnoControlFormattedFieldModel",
+            "com.sun.star.awt.UnoControlFileControlModel",
+            "com.sun.star.awt.UnoControlButtonModel",
+            "com.sun.star.awt.UnoControlImageControlModel",
+            "com.sun.star.awt.UnoControlRadioButtonModel",
+            "com.sun.star.awt.UnoControlCheckBoxModel",
+            "com.sun.star.awt.UnoControlFixedTextModel",
+            "com.sun.star.awt.UnoControlGroupBoxModel",
+            "com.sun.star.awt.UnoControlListBoxModel",
+            "com.sun.star.awt.UnoControlComboBoxModel",
+            "com.sun.star.awt.UnoControlDateFieldModel",
+            "com.sun.star.awt.UnoControlTimeFieldModel",
+            "com.sun.star.awt.UnoControlNumericFieldModel",
+            "com.sun.star.awt.UnoControlCurrencyFieldModel",
+            "com.sun.star.awt.UnoControlPatternFieldModel",
+            "com.sun.star.awt.UnoControlProgressBarModel",
+            "com.sun.star.awt.UnoControlScrollBarModel",
+            "com.sun.star.awt.UnoControlFixedLineModel",
+            "com.sun.star.awt.UnoControlRoadmapModel",
+            "com.sun.star.awt.tree.TreeControlModel",
+            "com.sun.star.awt.grid.UnoControlGridModel",
+            "com.sun.star.awt.tab.UnoControlTabPageContainerModel",
+            "com.sun.star.awt.tab.UnoControlTabPageModel",
+            "com.sun.star.awt.UnoMultiPageModel",
+            "com.sun.star.awt.UnoFrameModel"
+    };
 }
 
 // XContainer


More information about the Libreoffice-commits mailing list