[Libreoffice-commits] core.git: compilerplugins/clang editeng/source include/svx sc/inc sc/source sd/source svx/Library_svxcore.mk svx/source sw/inc sw/source

Noel Grandin noel at peralex.com
Thu Nov 5 02:02:27 PST 2015


 compilerplugins/clang/mergeclasses.results |    1 
 editeng/source/xml/xmltxtexp.cxx           |    2 
 include/svx/fmdmod.hxx                     |   40 +++++++++++
 include/svx/unomodel.hxx                   |    6 -
 sc/inc/docuno.hxx                          |    4 -
 sc/source/ui/unoobj/docuno.cxx             |   10 +-
 sd/source/ui/inc/unomodel.hxx              |    6 -
 sd/source/ui/unoidl/unomodel.cxx           |    8 +-
 svx/Library_svxcore.mk                     |    1 
 svx/source/form/fmdmod.cxx                 |  100 +++++++++++++++++++++++++++++
 svx/source/unodraw/unomod.cxx              |   61 +----------------
 sw/inc/unotxdoc.hxx                        |    4 -
 sw/source/uibase/uno/unotxdoc.cxx          |    8 +-
 13 files changed, 172 insertions(+), 79 deletions(-)

New commits:
commit 609b22787392be4c2eac6fe098a70341a4c204e4
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Nov 5 11:33:34 2015 +0200

    fix tdf#95488, crash in report wizard
    
    This reverts commit bb76b8f10697f3d5ca1f9a2f19902b043bd61cd7
    "loplugin:mergeclasses"
    
    Change-Id: Ib65459ab45cd4cefa859ed75f9ddc4f070879b1d

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index 5d77cd6..95bd5da 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -68,6 +68,7 @@ merge StarSymbolToMSMultiFont with StarSymbolToMSMultiFontImpl
 merge StgReader with WW8Reader
 merge SvListView with SvTreeListBox
 merge SvxShapeMaster with SdXShape
+merge SvxUnoDrawMSFactory with SvxFmMSFactory
 merge SwXParaFrameEnumeration with SwXParaFrameEnumerationImpl
 merge SwXParagraphEnumeration with SwXParagraphEnumerationImpl
 merge SwXTextRanges with SwXTextRangesImpl
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 2dad6f4..6b69e04 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -193,7 +193,7 @@ SvxSimpleUnoModel::~SvxSimpleUnoModel()
 {
 }
 
-// XMultiServiceFactory ( SvxUnoDrawMSFactory )
+// XMultiServiceFactory ( SvxFmMSFactory )
 uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( const OUString& aServiceSpecifier )
     throw(uno::Exception, uno::RuntimeException, std::exception)
 {
diff --git a/include/svx/fmdmod.hxx b/include/svx/fmdmod.hxx
new file mode 100644
index 0000000..8a5a167
--- /dev/null
+++ b/include/svx/fmdmod.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SVX_FMDMOD_HXX
+#define INCLUDED_SVX_FMDMOD_HXX
+
+#include <svx/unomod.hxx>
+#include <svx/svxdllapi.h>
+
+class SVX_DLLPUBLIC SvxFmMSFactory : public SvxUnoDrawMSFactory
+{
+
+public:
+    SvxFmMSFactory() {};
+
+    virtual ~SvxFmMSFactory() {}
+
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance(const OUString& ServiceSpecifier) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+    virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+};
+
+#endif // INCLUDED_SVX_FMDMOD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unomodel.hxx b/include/svx/unomodel.hxx
index 7cce6bc..17d857b 100644
--- a/include/svx/unomodel.hxx
+++ b/include/svx/unomodel.hxx
@@ -26,13 +26,13 @@
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <sfx2/sfxbasemodel.hxx>
+#include <svx/fmdmod.hxx>
 #include <svx/svxdllapi.h>
-#include <svx/unomod.hxx>
 
 class SdrModel;
 
 class SVX_DLLPUBLIC SvxUnoDrawingModel : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
-                           public SvxUnoDrawMSFactory,
+                           public SvxFmMSFactory,
                            public css::drawing::XDrawPagesSupplier,
                            public css::lang::XServiceInfo,
                            public css::ucb::XAnyCompareFactory
@@ -76,7 +76,7 @@ public:
     // XDrawPagesSupplier
     virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages(  ) throw(css::uno::RuntimeException, std::exception) override;
 
-    // XMultiServiceFactory ( SvxUnoDrawMSFactory )
+    // XMultiServiceFactory ( SvxFmMSFactory )
     virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) throw(css::uno::Exception, css::uno::RuntimeException, std::exception) override;
     virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames(  ) throw(css::uno::RuntimeException, std::exception) override;
 
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 96511886..45fd943 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -23,6 +23,7 @@
 #include "address.hxx"
 #include <sfx2/sfxbasemodel.hxx>
 #include <svl/lstner.hxx>
+#include <svx/fmdmod.hxx>
 #include <com/sun/star/view/XRenderable.hpp>
 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
 #include <com/sun/star/document/XActionLockable.hpp>
@@ -52,7 +53,6 @@
 #include <svl/itemprop.hxx>
 #include <vcl/event.hxx>
 #include <vcl/ITiledRenderable.hxx>
-#include <svx/unomod.hxx>
 #include "drwlayer.hxx"
 
 class ScDocShell;
@@ -81,7 +81,7 @@ class SC_DLLPUBLIC ScModelObj : public SfxBaseModel,
                     public css::view::XRenderable,
                     public css::document::XLinkTargetSupplier,
                     public css::beans::XPropertySet,
-                    public SvxUnoDrawMSFactory,  ///< derived from XMultiServiceFactory
+                    public SvxFmMSFactory,  ///< derived from XMultiServiceFactory
                     public css::lang::XServiceInfo,
                     public css::util::XChangesNotifier,
                     public css::sheet::opencl::XOpenCLSelection
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 45e5db9..f8e85de 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -2424,14 +2424,14 @@ css::uno::Reference<css::uno::XInterface> ScModelObj::create(
     }
     else
     {
-        //  alles was ich nicht kenn, werf ich der SvxUnoDrawMSFactory an den Hals,
+        //  alles was ich nicht kenn, werf ich der SvxFmMSFactory an den Hals,
         //  da wird dann 'ne Exception geworfen, wenn's nicht passt...
 
         try
         {
             xRet = arguments == 0
-                ? SvxUnoDrawMSFactory::createInstance(aServiceSpecifier)
-                : SvxUnoDrawMSFactory::createInstanceWithArguments(
+                ? SvxFmMSFactory::createInstance(aServiceSpecifier)
+                : SvxFmMSFactory::createInstanceWithArguments(
                     aServiceSpecifier, *arguments);
             // extra block to force deletion of the temporary before ScShapeObj ctor (setDelegator)
         }
@@ -2490,10 +2490,10 @@ uno::Sequence<OUString> SAL_CALL ScModelObj::getAvailableServiceNames()
 
     //! warum sind die Parameter bei concatServiceNames nicht const ???
     //! return concatServiceNames( ScServiceProvider::GetAllServiceNames(),
-    //!                            SvxUnoDrawMSFactory::getAvailableServiceNames() );
+    //!                            SvxFmMSFactory::getAvailableServiceNames() );
 
     uno::Sequence<OUString> aMyServices(ScServiceProvider::GetAllServiceNames());
-    uno::Sequence<OUString> aDrawServices(SvxUnoDrawMSFactory::getAvailableServiceNames());
+    uno::Sequence<OUString> aDrawServices(SvxFmMSFactory::getAvailableServiceNames());
 
     return concatServiceNames( aMyServices, aDrawServices );
 }
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 68c7e7c..11076ca 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -43,7 +43,7 @@
 
 #include <svl/lstner.hxx>
 #include <sfx2/sfxbasemodel.hxx>
-#include <svx/unomod.hxx>
+#include <svx/fmdmod.hxx>
 
 #include <vcl/event.hxx>
 #include <vcl/ITiledRenderable.hxx>
@@ -69,7 +69,7 @@ extern OUString getPageApiNameFromUiName( const OUString& rUIName );
 *                                                                      *
 ***********************************************************************/
 class SD_DLLPUBLIC SdXImpressDocument : public SfxBaseModel, // implements SfxListener, OWEAKOBJECT & other
-                           public SvxUnoDrawMSFactory,
+                           public SvxFmMSFactory,
                            public css::drawing::XDrawPageDuplicator,
                            public css::drawing::XLayerSupplier,
                            public css::drawing::XMasterPagesSupplier,
@@ -191,7 +191,7 @@ public:
     // XPresentationSupplier
     virtual css::uno::Reference< css::presentation::XPresentation > SAL_CALL getPresentation(  ) throw(css::uno::RuntimeException, std::exception) override;
 
-    // XMultiServiceFactory ( SvxUnoDrawMSFactory )
+    // XMultiServiceFactory ( SvxFmMSFactory )
     virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) throw(css::uno::Exception, css::uno::RuntimeException, std::exception) override;
     virtual css::uno::Reference<css::uno::XInterface> SAL_CALL
     createInstanceWithArguments(
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e426351..f1e5614 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -815,7 +815,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::getHandoutMast
     return xPage;
 }
 
-// XMultiServiceFactory ( SvxUnoDrawMSFactory )
+// XMultiServiceFactory ( SvxFmMSFactory )
 
 css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
     OUString const & aServiceSpecifier, OUString const & referer)
@@ -1075,7 +1075,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
     }
     else
     {
-        xRet = SvxUnoDrawMSFactory::createInstance( aServiceSpecifier );
+        xRet = SvxFmMSFactory::createInstance( aServiceSpecifier );
     }
 
     uno::Reference< drawing::XShape > xShape( xRet, uno::UNO_QUERY );
@@ -1111,7 +1111,7 @@ SdXImpressDocument::createInstanceWithArguments(
     {
         return create(ServiceSpecifier, arg);
     }
-    return SvxUnoDrawMSFactory::createInstanceWithArguments(
+    return SvxFmMSFactory::createInstanceWithArguments(
         ServiceSpecifier, Arguments);
 }
 
@@ -1123,7 +1123,7 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
     if( NULL == mpDoc )
         throw lang::DisposedException();
 
-    const uno::Sequence< OUString > aSNS_ORG( SvxUnoDrawMSFactory::getAvailableServiceNames() );
+    const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
 
     uno::Sequence< OUString > aSNS( mbImpressDoc ? (36) : (19) );
 
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 837a865..ca9e5c5 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -427,6 +427,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
     svx/source/form/delayedevent \
     svx/source/form/fmcontrolbordermanager \
     svx/source/form/fmcontrollayout \
+    svx/source/form/fmdmod \
     svx/source/form/fmdocumentclassification \
     svx/source/form/fmdpage \
     svx/source/form/fmexch \
diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx
new file mode 100644
index 0000000..bb63fed
--- /dev/null
+++ b/svx/source/form/fmdmod.cxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/macros.h>
+#include <svx/fmdmod.hxx>
+#include "fmservs.hxx"
+#include <fmobj.hxx>
+#include <svx/unoshape.hxx>
+#include <comphelper/processfactory.hxx>
+#include <svx/fmglob.hxx>
+
+using namespace ::svxform;
+
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >  SAL_CALL SvxFmMSFactory::createInstance(const OUString& rServiceSpecifier) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception )
+{
+    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >  xRet;
+    if ( rServiceSpecifier.startsWith( "com.sun.star.form.component." ) )
+    {
+        css::uno::Reference<css::uno::XComponentContext> xContext = comphelper::getProcessComponentContext();
+        xRet = xContext->getServiceManager()->createInstanceWithContext(rServiceSpecifier, xContext);
+    }
+    else if ( rServiceSpecifier == "com.sun.star.drawing.ControlShape" )
+    {
+        SdrObject* pObj = new FmFormObj();
+        xRet = static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper*>(new SvxShapeControl(pObj)));
+    }
+    if (!xRet.is())
+        xRet = SvxUnoDrawMSFactory::createInstance(rServiceSpecifier);
+    return xRet;
+}
+
+
+
+// Encapsulation violation: We *know* that
+// SvxUnoDrawMSFactory::createInstanceWithArguments() always throws.
+
+SAL_WNOUNREACHABLE_CODE_PUSH
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL  SvxFmMSFactory::createInstanceWithArguments(const OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception )
+{
+    return SvxUnoDrawMSFactory::createInstanceWithArguments(ServiceSpecifier, Arguments );
+}
+
+SAL_WNOUNREACHABLE_CODE_POP
+
+
+::com::sun::star::uno::Sequence< OUString > SAL_CALL SvxFmMSFactory::getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception )
+{
+    static const OUString aSvxComponentServiceNameList[] =
+    {
+        OUString(FM_SUN_COMPONENT_TEXTFIELD),
+        OUString(FM_SUN_COMPONENT_FORM),
+        OUString(FM_SUN_COMPONENT_LISTBOX),
+        OUString(FM_SUN_COMPONENT_COMBOBOX),
+        OUString(FM_SUN_COMPONENT_RADIOBUTTON),
+        OUString(FM_SUN_COMPONENT_GROUPBOX),
+        OUString(FM_SUN_COMPONENT_FIXEDTEXT),
+        OUString(FM_SUN_COMPONENT_COMMANDBUTTON),
+        OUString(FM_SUN_COMPONENT_CHECKBOX),
+        OUString(FM_SUN_COMPONENT_GRIDCONTROL),
+        OUString(FM_SUN_COMPONENT_IMAGEBUTTON),
+        OUString(FM_SUN_COMPONENT_FILECONTROL),
+        OUString(FM_SUN_COMPONENT_TIMEFIELD),
+        OUString(FM_SUN_COMPONENT_DATEFIELD),
+        OUString(FM_SUN_COMPONENT_NUMERICFIELD),
+        OUString(FM_SUN_COMPONENT_CURRENCYFIELD),
+        OUString(FM_SUN_COMPONENT_PATTERNFIELD),
+        OUString(FM_SUN_COMPONENT_HIDDENCONTROL),
+        OUString(FM_SUN_COMPONENT_IMAGECONTROL)
+    };
+
+    static const sal_uInt16 nSvxComponentServiceNameListCount = sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] );
+
+    ::com::sun::star::uno::Sequence< OUString > aSeq( nSvxComponentServiceNameListCount );
+    OUString* pStrings = aSeq.getArray();
+    for( sal_uInt16 nIdx = 0; nIdx < nSvxComponentServiceNameListCount; nIdx++ )
+        pStrings[nIdx] = aSvxComponentServiceNameList[nIdx];
+
+    ::com::sun::star::uno::Sequence< OUString > aParentSeq( SvxUnoDrawMSFactory::getAvailableServiceNames() );
+    return concatServiceNames( aParentSeq, aSeq );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index de6a352..7c6b9d7 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -26,7 +26,6 @@
 #include <svtools/unoevent.hxx>
 #include <comphelper/sequence.hxx>
 #include <comphelper/servicehelper.hxx>
-#include <comphelper/processfactory.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
 #include <cppuhelper/implbase.hxx>
@@ -51,8 +50,6 @@
 #include <svx/svdpage.hxx>
 #include <svx/unoshape.hxx>
 #include <svx/xmlgrhlp.hxx>
-#include <fmobj.hxx>
-#include "fmservs.hxx"
 
 #include <com/sun/star/text/textfield/Type.hpp>
 
@@ -199,23 +196,10 @@ css::uno::Reference<css::uno::XInterface> create(
 
 }
 
-uno::Reference< uno::XInterface >  SAL_CALL SvxUnoDrawMSFactory::createInstance(const OUString& rServiceSpecifier)
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& rServiceSpecifier )
     throw( uno::Exception, uno::RuntimeException, std::exception )
 {
-    css::uno::Reference< css::uno::XInterface >  xRet;
-    if ( rServiceSpecifier.startsWith( "com.sun.star.form.component." ) )
-    {
-        css::uno::Reference<css::uno::XComponentContext> xContext = comphelper::getProcessComponentContext();
-        xRet = xContext->getServiceManager()->createInstanceWithContext(rServiceSpecifier, xContext);
-    }
-    else if ( rServiceSpecifier == "com.sun.star.drawing.ControlShape" )
-    {
-        SdrObject* pObj = new FmFormObj();
-        xRet = static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper*>(new SvxShapeControl(pObj)));
-    }
-    if (!xRet.is())
-        xRet = create(rServiceSpecifier, "");
-    return xRet;
+    return create(rServiceSpecifier, "");
 }
 
 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField( const OUString& ServiceSpecifier ) throw(css::uno::Exception, css::uno::RuntimeException)
@@ -236,45 +220,12 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWi
     throw lang::NoSupportException();
 }
 
-
 uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames()
     throw( uno::RuntimeException, std::exception )
 {
-    static const OUString aSvxComponentServiceNameList[] =
-    {
-        OUString(FM_SUN_COMPONENT_TEXTFIELD),
-        OUString(FM_SUN_COMPONENT_FORM),
-        OUString(FM_SUN_COMPONENT_LISTBOX),
-        OUString(FM_SUN_COMPONENT_COMBOBOX),
-        OUString(FM_SUN_COMPONENT_RADIOBUTTON),
-        OUString(FM_SUN_COMPONENT_GROUPBOX),
-        OUString(FM_SUN_COMPONENT_FIXEDTEXT),
-        OUString(FM_SUN_COMPONENT_COMMANDBUTTON),
-        OUString(FM_SUN_COMPONENT_CHECKBOX),
-        OUString(FM_SUN_COMPONENT_GRIDCONTROL),
-        OUString(FM_SUN_COMPONENT_IMAGEBUTTON),
-        OUString(FM_SUN_COMPONENT_FILECONTROL),
-        OUString(FM_SUN_COMPONENT_TIMEFIELD),
-        OUString(FM_SUN_COMPONENT_DATEFIELD),
-        OUString(FM_SUN_COMPONENT_NUMERICFIELD),
-        OUString(FM_SUN_COMPONENT_CURRENCYFIELD),
-        OUString(FM_SUN_COMPONENT_PATTERNFIELD),
-        OUString(FM_SUN_COMPONENT_HIDDENCONTROL),
-        OUString(FM_SUN_COMPONENT_IMAGECONTROL)
-    };
-
-    static const sal_uInt16 nSvxComponentServiceNameListCount = SAL_N_ELEMENTS(aSvxComponentServiceNameList);
-
-    uno::Sequence< OUString > aSeq( nSvxComponentServiceNameListCount );
-    OUString* pStrings = aSeq.getArray();
-    for( sal_uInt16 nIdx = 0; nIdx < nSvxComponentServiceNameListCount; nIdx++ )
-        pStrings[nIdx] = aSvxComponentServiceNameList[nIdx];
-
-    uno::Sequence< OUString > aParentSeq( UHashMap::getServiceNames() );
-    return concatServiceNames( aParentSeq, aSeq );
+    return UHashMap::getServiceNames();
 }
 
-
 uno::Sequence< OUString > SvxUnoDrawMSFactory::concatServiceNames( uno::Sequence< OUString >& rServices1, uno::Sequence< OUString >& rServices2 ) throw()
 {
     const sal_Int32 nLen1 = rServices1.getLength();
@@ -398,7 +349,7 @@ uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages(
     return xDrawPages;
 }
 
-// XMultiServiceFactory ( SvxUnoDrawMSFactory )
+// XMultiServiceFactory ( SvxFmMSFactory )
 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( const OUString& aServiceSpecifier )
     throw(uno::Exception, uno::RuntimeException, std::exception)
 {
@@ -552,7 +503,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
     }
     else
     {
-        xRet = SvxUnoDrawMSFactory::createInstance( aServiceSpecifier );
+        xRet = SvxFmMSFactory::createInstance( aServiceSpecifier );
     }
 
     return xRet;
@@ -561,7 +512,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
 uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getAvailableServiceNames()
     throw(uno::RuntimeException, std::exception)
 {
-    const uno::Sequence< OUString > aSNS_ORG( SvxUnoDrawMSFactory::getAvailableServiceNames() );
+    const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
 
     uno::Sequence< OUString > aSNS( 21 );
 
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index d5c5eb9..e4ea694 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -62,7 +62,7 @@
 #include <com/sun/star/document/XDocumentLanguages.hpp>
 #include <com/sun/star/util/XCloneable.hpp>
 #include <svl/itemprop.hxx>
-#include <svx/unomod.hxx>
+#include <svx/fmdmod.hxx>
 #include <editeng/UnoForbiddenCharsTable.hxx>
 #include <cppuhelper/weak.hxx>
 #include <cppuhelper/implbase.hxx>
@@ -126,7 +126,7 @@ typedef cppu::WeakImplHelper
 SwXTextDocumentBaseClass;
 
 class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
-    public SvxUnoDrawMSFactory,
+    public SvxFmMSFactory,
     public SfxBaseModel,
     public vcl::ITiledRenderable,
     public ::com::sun::star::tiledrendering::XTiledRenderable
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 79b5b90..4c54dc9 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1668,8 +1668,8 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
     }
     Reference<XInterface> xTmp(
         arguments == 0
-        ? SvxUnoDrawMSFactory::createInstance(aTmpServiceName)
-        : SvxUnoDrawMSFactory::createInstanceWithArguments(
+        ? SvxFmMSFactory::createInstance(aTmpServiceName)
+        : SvxFmMSFactory::createInstanceWithArguments(
             aTmpServiceName, *arguments));
     if (rServiceName == "com.sun.star.drawing.GroupShape"
         || rServiceName == "com.sun.star.drawing.Shape3DSceneObject")
@@ -1703,7 +1703,7 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames()
     static Sequence< OUString > aServices;
     if ( aServices.getLength() == 0 )
     {
-        Sequence< OUString > aRet =  SvxUnoDrawMSFactory::getAvailableServiceNames();
+        Sequence< OUString > aRet =  SvxFmMSFactory::getAvailableServiceNames();
         OUString* pRet = aRet.getArray();
         for ( sal_Int32 i = 0; i < aRet.getLength(); ++i )
         {
@@ -1715,7 +1715,7 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames()
             }
         }
         Sequence< OUString > aOwn = SwXServiceProvider::GetAllServiceNames();
-        aServices = SvxUnoDrawMSFactory::concatServiceNames(aRet, aOwn);
+        aServices = SvxFmMSFactory::concatServiceNames(aRet, aOwn);
     }
 
     return aServices;


More information about the Libreoffice-commits mailing list