[Libreoffice-commits] core.git: dbaccess/source editeng/source include/xmloff linguistic/source reportdesign/source sc/source starmath/source svx/source sw/source xmloff/inc xmloff/source

Stephan Bergmann sbergman at redhat.com
Thu Jan 9 01:12:47 PST 2014


 dbaccess/source/filter/xml/xmlfilter.cxx       |   18 ++++++--
 dbaccess/source/filter/xml/xmlfilter.hxx       |   11 +++--
 editeng/source/misc/SvXMLAutoCorrectImport.cxx |    4 -
 editeng/source/xml/xmltxtimp.cxx               |    2 
 include/xmloff/xmlimp.hxx                      |    7 +--
 linguistic/source/convdicxml.cxx               |    8 ---
 linguistic/source/convdicxml.hxx               |    5 --
 reportdesign/source/filter/xml/xmlfilter.cxx   |   20 ---------
 reportdesign/source/filter/xml/xmlfilter.hxx   |    5 --
 sc/source/filter/xml/xmlimprt.cxx              |   36 +++--------------
 sc/source/filter/xml/xmlimprt.hxx              |    5 --
 starmath/source/mathmlimport.cxx               |   35 ++---------------
 starmath/source/mathmlimport.hxx               |    5 --
 svx/source/xml/xmlxtimp.cxx                    |    2 
 sw/source/core/swg/SwXMLBlockImport.cxx        |    4 -
 sw/source/core/swg/SwXMLSectionList.cxx        |    2 
 sw/source/filter/xml/xmlimp.cxx                |   37 +++---------------
 sw/source/filter/xml/xmlimp.hxx                |    6 --
 xmloff/inc/SchXMLImport.hxx                    |    5 --
 xmloff/source/chart/SchXMLImport.cxx           |   33 ++--------------
 xmloff/source/core/xmlimp.cxx                  |   17 ++++----
 xmloff/source/draw/animationimport.cxx         |   51 ++++++-------------------
 xmloff/source/draw/sdxmlimp.cxx                |   50 +-----------------------
 xmloff/source/draw/sdxmlimp_impl.hxx           |    6 --
 xmloff/source/meta/MetaImportComponent.cxx     |    2 
 xmloff/source/meta/xmlversion.cxx              |    2 
 xmloff/source/text/XMLAutoTextEventImport.cxx  |    2 
 27 files changed, 94 insertions(+), 286 deletions(-)

New commits:
commit 6e12fb3be33379fa87b90ffae047cffe1370eef9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jan 9 10:12:01 2014 +0100

    Consolidate XServiceInfo for classes derived from SvXMLImport
    
    Change-Id: I5a269d8b7e95049c67ae14b06a79b417bc91a474

diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index a85bfbd..3bda64e 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -347,7 +347,7 @@ sal_Int32 ReadThroughComponent(
 DBG_NAME(ODBFilter)
 
 ODBFilter::ODBFilter( const uno::Reference< XComponentContext >& _rxContext )
-    :SvXMLImport(_rxContext)
+    :SvXMLImport(_rxContext, getImplementationName_Static())
     ,m_bNewFormat(false)
 {
     DBG_CTOR(ODBFilter,NULL);
@@ -369,9 +369,19 @@ ODBFilter::~ODBFilter() throw()
     DBG_DTOR(ODBFilter,NULL);
 }
 
-IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODBFilter, "com.sun.star.comp.sdb.DBFilter")
-IMPLEMENT_SERVICE_INFO_SUPPORTS(ODBFilter)
-IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODBFilter, "com.sun.star.document.ImportFilter")
+OUString ODBFilter::getImplementationName_Static()
+    throw (css::uno::RuntimeException)
+{
+    return OUString("com.sun.star.comp.sdb.DBFilter");
+}
+
+css::uno::Sequence<OUString> ODBFilter::getSupportedServiceNames_Static()
+    throw (css::uno::RuntimeException)
+{
+    css::uno::Sequence<OUString> s(1);
+    s[0] = "com.sun.star.document.ImportFilter";
+    return s;
+}
 
 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
     SAL_CALL ODBFilter::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx
index 0d083d0..971e56b 100644
--- a/dbaccess/source/filter/xml/xmlfilter.hxx
+++ b/dbaccess/source/filter/xml/xmlfilter.hxx
@@ -37,7 +37,6 @@
 #include <unotools/localfilehelper.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <xmloff/xmlimp.hxx>
-#include "apitools.hxx"
 
 #include <map>
 #include <memory>
@@ -114,8 +113,14 @@ public:
     // XFilter
     virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& rDescriptor ) throw(RuntimeException);
 
-    // XServiceInfo
-    DECLARE_SERVICE_INFO_STATIC( );
+    static OUString SAL_CALL getImplementationName_Static()
+        throw (css::uno::RuntimeException);
+
+    static css::uno::Sequence<OUString> SAL_CALL
+    getSupportedServiceNames_Static() throw (css::uno::RuntimeException);
+
+    static css::uno::Reference<css::uno::XInterface> SAL_CALL Create(
+        css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxORB);
 
     // helper class
     virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
index 10ea227..28b65c1 100644
--- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
@@ -32,7 +32,7 @@ SvXMLAutoCorrectImport::SvXMLAutoCorrectImport(
     SvxAutocorrWordList *pNewAutocorr_List,
     SvxAutoCorrect &rNewAutoCorrect,
     const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rNewStorage)
-:   SvXMLImport( xContext ),
+:   SvXMLImport( xContext, "" ),
     pAutocorr_List (pNewAutocorr_List),
     rAutoCorrect ( rNewAutoCorrect ),
     xStorage ( rNewStorage )
@@ -146,7 +146,7 @@ SvXMLWordContext::~SvXMLWordContext ( void )
 SvXMLExceptionListImport::SvXMLExceptionListImport(
     const uno::Reference< uno::XComponentContext > xContext,
     SvStringsISortDtor & rNewList )
-:   SvXMLImport( xContext ),
+:   SvXMLImport( xContext, "" ),
     rList (rNewList)
 {
     GetNamespaceMap().Add(
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index f5c7fbf..f00d0d9 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -127,7 +127,7 @@ private:
 SvxXMLXTextImportComponent::SvxXMLXTextImportComponent(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
     const uno::Reference< XText > & xText )
-:   SvXMLImport(xContext),
+:   SvXMLImport(xContext, ""),
     mxText( xText )
 {
     GetTextImport()->SetCursor( mxText->createTextCursor() );
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index b2e3baf..872a7bd 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -187,6 +187,7 @@ public:
     // SvXMLImport( sal_uInt16 nImportFlags = IMPORT_ALL ) throw();
     SvXMLImport(
         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
+        OUString const & implementationName,
         sal_uInt16 nImportFlags = IMPORT_ALL ) throw();
 
     virtual ~SvXMLImport() throw();
@@ -238,11 +239,11 @@ public:
 
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName(  )
-        throw(::com::sun::star::uno::RuntimeException);
+        throw(::com::sun::star::uno::RuntimeException) SAL_FINAL;
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
-        throw(::com::sun::star::uno::RuntimeException);
+        throw(::com::sun::star::uno::RuntimeException) SAL_FINAL;
     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  )
-        throw(::com::sun::star::uno::RuntimeException);
+        throw(::com::sun::star::uno::RuntimeException) SAL_FINAL;
 
     // may be called by certain subclasses that handle document meta-data
     // override to provide customized handling of document statistics
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 72dbc06..f003c00 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -411,12 +411,4 @@ SvXMLImportContext * ConvDicXMLImport::CreateContext(
     return pContext;
 }
 
-
-OUString SAL_CALL ConvDicXMLImport::getImplementationName()
-    throw( uno::RuntimeException )
-{
-    return OUString( "com.sun.star.lingu2.ConvDicXMLImport" );
-}
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index 82861e5..dd4521c 100644
--- a/linguistic/source/convdicxml.hxx
+++ b/linguistic/source/convdicxml.hxx
@@ -84,7 +84,7 @@ public:
 
     //!!  see comment for pDic member
     ConvDicXMLImport( ConvDic *pConvDic, const OUString /*&rFileName*/ ) :
-        SvXMLImport ( comphelper::getProcessComponentContext(), IMPORT_ALL ),
+        SvXMLImport ( comphelper::getProcessComponentContext(), "com.sun.star.lingu2.ConvDicXMLImport", IMPORT_ALL ),
         pDic        ( pConvDic )
     {
         nLanguage       = LANGUAGE_NONE;
@@ -96,9 +96,6 @@ public:
     {
     }
 
-    // XServiceInfo (override parent method)
-    OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-
     virtual void SAL_CALL startDocument(void) throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
     virtual void SAL_CALL endDocument(void) throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
 
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 589c433..a4dd612 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -41,7 +41,6 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/genericpropertyset.hxx>
 #include <unotools/mediadescriptor.hxx>
-#include <cppuhelper/supportsservice.hxx>
 #include <xmloff/ProgressBarHelper.hxx>
 #include <sfx2/docfile.hxx>
 #include <com/sun/star/io/XInputStream.hpp>
@@ -359,7 +358,7 @@ Sequence< OUString > ORptMetaImportHelper::getSupportedServiceNames_Static(  ) t
 // -------------
 DBG_NAME(rpt_ORptFilter)
 ORptFilter::ORptFilter( const uno::Reference< XComponentContext >& _rxContext,sal_uInt16 nImportFlags )
-    :SvXMLImport(_rxContext,nImportFlags)
+    :SvXMLImport(_rxContext, getImplementationName_Static(), nImportFlags)
 {
     DBG_CTOR(rpt_ORptFilter,NULL);
     GetMM100UnitConverter().SetCoreMeasureUnit(util::MeasureUnit::MM_100TH);
@@ -397,12 +396,6 @@ OUString ORptFilter::getImplementationName_Static(  ) throw(uno::RuntimeExceptio
     return OUString("com.sun.star.comp.report.OReportFilter");
 }
 
-//--------------------------------------------------------------------------
-OUString SAL_CALL ORptFilter::getImplementationName(  ) throw(uno::RuntimeException)
-{
-    return getImplementationName_Static();
-}
-//--------------------------------------------------------------------------
 uno::Sequence< OUString > ORptFilter::getSupportedServiceNames_Static(  ) throw(uno::RuntimeException)
 {
     uno::Sequence< OUString > aServices(1);
@@ -411,17 +404,6 @@ uno::Sequence< OUString > ORptFilter::getSupportedServiceNames_Static(  ) throw(
     return aServices;
 }
 
-//--------------------------------------------------------------------------
-uno::Sequence< OUString > SAL_CALL ORptFilter::getSupportedServiceNames(  ) throw(uno::RuntimeException)
-{
-    return getSupportedServiceNames_Static();
-}
-//------------------------------------------------------------------------------
-sal_Bool SAL_CALL ORptFilter::supportsService(const OUString& ServiceName) throw( uno::RuntimeException )
-{
-    return cppu::supportsService(this, ServiceName);
-}
-// -----------------------------------------------------------------------------
 sal_Bool SAL_CALL ORptFilter::filter( const Sequence< PropertyValue >& rDescriptor )
     throw (RuntimeException)
 {
diff --git a/reportdesign/source/filter/xml/xmlfilter.hxx b/reportdesign/source/filter/xml/xmlfilter.hxx
index c410784..4bb4376 100644
--- a/reportdesign/source/filter/xml/xmlfilter.hxx
+++ b/reportdesign/source/filter/xml/xmlfilter.hxx
@@ -125,11 +125,6 @@ public:
     // XFilter
     virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& rDescriptor ) throw(RuntimeException);
 
-    // ::com::sun::star::lang::XServiceInfo
-    virtual ::sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
-    virtual OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
-
     static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
     static OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
     static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 1f02083..abfe32a 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -120,7 +120,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_createInstance(
 {
     // #110680#
     // return (cppu::OWeakObject*)new ScXMLImport(IMPORT_ALL);
-    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_ALL );
+    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_getImplementationName(), IMPORT_ALL );
 }
 
 OUString SAL_CALL ScXMLImport_Meta_getImplementationName() throw()
@@ -139,7 +139,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Meta_createInstance(
 {
     // #110680#
     // return (cppu::OWeakObject*)new ScXMLImport(IMPORT_META);
-    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_META );
+    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Meta_getImplementationName(), IMPORT_META );
 }
 
 OUString SAL_CALL ScXMLImport_Styles_getImplementationName() throw()
@@ -158,7 +158,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Styles_createInstance(
 {
     // #110680#
     // return (cppu::OWeakObject*)new ScXMLImport(IMPORT_STYLES|IMPORT_AUTOSTYLES|IMPORT_MASTERSTYLES|IMPORT_FONTDECLS);
-    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_STYLES|IMPORT_AUTOSTYLES|IMPORT_MASTERSTYLES|IMPORT_FONTDECLS);
+    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Styles_getImplementationName(), IMPORT_STYLES|IMPORT_AUTOSTYLES|IMPORT_MASTERSTYLES|IMPORT_FONTDECLS);
 }
 
 OUString SAL_CALL ScXMLImport_Content_getImplementationName() throw()
@@ -177,7 +177,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Content_createInstance(
 {
     // #110680#
     // return (cppu::OWeakObject*)new ScXMLImport(IMPORT_META|IMPORT_STYLES|IMPORT_MASTERSTYLES|IMPORT_AUTOSTYLES|IMPORT_CONTENT|IMPORT_SCRIPTS|IMPORT_SETTINGS|IMPORT_FONTDECLS);
-    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_AUTOSTYLES|IMPORT_CONTENT|IMPORT_SCRIPTS|IMPORT_FONTDECLS);
+    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Content_getImplementationName(), IMPORT_AUTOSTYLES|IMPORT_CONTENT|IMPORT_SCRIPTS|IMPORT_FONTDECLS);
 }
 
 OUString SAL_CALL ScXMLImport_Settings_getImplementationName() throw()
@@ -196,7 +196,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScXMLImport_Settings_createInstance(
 {
     // #110680#
     // return (cppu::OWeakObject*)new ScXMLImport(IMPORT_SETTINGS);
-    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_SETTINGS );
+    return (cppu::OWeakObject*)new ScXMLImport( comphelper::getComponentContext(rSMgr), ScXMLImport_Settings_getImplementationName(), IMPORT_SETTINGS );
 }
 
 const SvXMLTokenMap& ScXMLImport::GetTableRowCellAttrTokenMap()
@@ -1992,8 +1992,8 @@ SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix,
 
 ScXMLImport::ScXMLImport(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
-    const sal_uInt16 nImportFlag)
-:   SvXMLImport( xContext, nImportFlag ),
+    OUString const & implementationName, sal_uInt16 nImportFlag)
+:   SvXMLImport( xContext, implementationName, nImportFlag ),
     pDoc( NULL ),
     pChangeTrackingImportHelper(NULL),
     pStylesImportHelper(NULL),
@@ -2978,28 +2978,6 @@ throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::R
         xActionLockable->addActionLock();
 }
 
-// XServiceInfo
-OUString SAL_CALL ScXMLImport::getImplementationName(  )
-throw(::com::sun::star::uno::RuntimeException)
-{
-    switch( getImportFlags() )
-    {
-    case IMPORT_ALL:
-        return ScXMLImport_getImplementationName();
-    case (IMPORT_STYLES|IMPORT_MASTERSTYLES|IMPORT_AUTOSTYLES|IMPORT_FONTDECLS):
-        return ScXMLImport_Styles_getImplementationName();
-    case (IMPORT_AUTOSTYLES|IMPORT_CONTENT|IMPORT_SCRIPTS|IMPORT_FONTDECLS):
-        return ScXMLImport_Content_getImplementationName();
-    case IMPORT_META:
-        return ScXMLImport_Meta_getImplementationName();
-    case IMPORT_SETTINGS:
-        return ScXMLImport_Settings_getImplementationName();
-    default:
-        // generic name for 'unknown' cases
-        return ScXMLImport_getImplementationName();
-    }
-}
-
 // ::com::sun::star::xml::sax::XDocumentHandler
 void SAL_CALL ScXMLImport::startDocument(void)
 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException )
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index bf2d9ae..1645c32 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -979,7 +979,7 @@ public:
     // #110680#
     ScXMLImport(
         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
-        const sal_uInt16 nImportFlag);
+        OUString const & implementationName, sal_uInt16 nImportFlag);
 
     ~ScXMLImport() throw();
 
@@ -1176,9 +1176,6 @@ public:
     // XImporter
     virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
 
-    // XServiceInfo
-    virtual OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
-
     virtual void SAL_CALL startDocument(void)
         throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
     virtual void SAL_CALL endDocument(void)
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index f360f71..f031b08 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -409,8 +409,8 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(
 
 SmXMLImport::SmXMLImport(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
-    sal_uInt16 nImportFlags)
-:   SvXMLImport( xContext, nImportFlags ),
+    OUString const & implementationName, sal_uInt16 nImportFlags)
+:   SvXMLImport( xContext, implementationName, nImportFlags ),
     pPresLayoutElemTokenMap(0),
     pPresLayoutAttrTokenMap(0),
     pFencedAttrTokenMap(0),
@@ -451,7 +451,7 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImport_createInstance(
     const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
     throw( uno::Exception )
 {
-    return (cppu::OWeakObject*)new SmXMLImport(comphelper::getComponentContext(rSMgr), IMPORT_ALL);
+    return (cppu::OWeakObject*)new SmXMLImport(comphelper::getComponentContext(rSMgr), SmXMLImport_getImplementationName(), IMPORT_ALL);
 }
 
 ////////////////////////////////////////////////////////////
@@ -473,7 +473,7 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImportMeta_createInstance(
     const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
 throw( uno::Exception )
 {
-    return (cppu::OWeakObject*)new SmXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_META );
+    return (cppu::OWeakObject*)new SmXMLImport( comphelper::getComponentContext(rSMgr), SmXMLImportMeta_getImplementationName(), IMPORT_META );
 }
 
 ////////////////////////////////////////////////////////////
@@ -495,34 +495,9 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImportSettings_createInstance(
     const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
     throw( uno::Exception )
 {
-    return (cppu::OWeakObject*)new SmXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_SETTINGS );
+    return (cppu::OWeakObject*)new SmXMLImport( comphelper::getComponentContext(rSMgr), SmXMLImportSettings_getImplementationName(), IMPORT_SETTINGS );
 }
 
-////////////////////////////////////////////////////////////
-
-// XServiceInfo
-// override empty method from parent class
-OUString SAL_CALL SmXMLImport::getImplementationName()
-    throw(uno::RuntimeException)
-{
-    OUString aTxt;
-    switch( getImportFlags() )
-    {
-        case IMPORT_META:
-            aTxt = SmXMLImportMeta_getImplementationName();
-            break;
-        case IMPORT_SETTINGS:
-            aTxt = SmXMLImportSettings_getImplementationName();
-            break;
-        case IMPORT_ALL:
-        default:
-            aTxt = SmXMLImport_getImplementationName();
-            break;
-    }
-    return aTxt;
-}
-
-
 sal_Int64 SAL_CALL SmXMLImport::getSomething(
     const uno::Sequence< sal_Int8 >&rId )
 throw(uno::RuntimeException)
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index c0d9e19..dcdae77 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -88,12 +88,9 @@ class SmXMLImport : public SvXMLImport
 public:
     SmXMLImport(
         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
-        sal_uInt16 nImportFlags=IMPORT_ALL);
+        OUString const & implementationName, sal_uInt16 nImportFlags);
     virtual ~SmXMLImport() throw ();
 
-    // XServiceInfo (override parent method)
-    OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-
     // XUnoTunnel
     sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException);
     static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index 246d094..b19345c 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -331,7 +331,7 @@ SvxXMLXTableImport::SvxXMLXTableImport(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
     const uno::Reference< XNameContainer > & rTable,
     uno::Reference< XGraphicObjectResolver >& xGrfResolver )
-:   SvXMLImport(xContext, 0),
+:   SvXMLImport(xContext, "", 0),
     mrTable( rTable )
 {
     SetGraphicResolver( xGrfResolver );
diff --git a/sw/source/core/swg/SwXMLBlockImport.cxx b/sw/source/core/swg/SwXMLBlockImport.cxx
index 7535d33..7fbc9d4 100644
--- a/sw/source/core/swg/SwXMLBlockImport.cxx
+++ b/sw/source/core/swg/SwXMLBlockImport.cxx
@@ -33,7 +33,7 @@ sal_Char const sXML_np__text[] = "_otext";
 SwXMLBlockListImport::SwXMLBlockListImport(
     const uno::Reference< uno::XComponentContext > xContext,
     SwXMLTextBlocks &rBlocks )
-:   SvXMLImport( xContext, 0 ),
+:   SvXMLImport( xContext, "", 0 ),
     rBlockList (rBlocks)
 {
     GetNamespaceMap().Add( OUString ( sXML_np__block_list ),
@@ -66,7 +66,7 @@ SwXMLTextBlockImport::SwXMLTextBlockImport(
     SwXMLTextBlocks &rBlocks,
     OUString & rNewText,
     sal_Bool bNewTextOnly )
-:   SvXMLImport(xContext, IMPORT_ALL ),
+:   SvXMLImport(xContext, "", IMPORT_ALL ),
     rBlockList ( rBlocks ),
     bTextOnly ( bNewTextOnly ),
     m_rText ( rNewText )
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index bd76ad7..f8795f3 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -34,7 +34,7 @@ sal_Char const sXML_np__text[] = "_otext";
 SwXMLSectionList::SwXMLSectionList(
     const uno::Reference< uno::XComponentContext > xContext,
     std::vector<OUString*> &rNewSectionList)
-:   SvXMLImport( xContext ),
+:   SvXMLImport( xContext, "" ),
     rSectionList ( rNewSectionList )
 {
     GetNamespaceMap().Add( OUString( sXML_np__office ),
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 23eb813..ace6e2b 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -408,8 +408,8 @@ SvXMLImportContext *SwXMLImport::CreateContext(
 
 SwXMLImport::SwXMLImport(
     const uno::Reference< uno::XComponentContext > xContext,
-    sal_uInt16 nImportFlags)
-:   SvXMLImport( xContext, nImportFlags ),
+    OUString const & implementationName, sal_uInt16 nImportFlags)
+:   SvXMLImport( xContext, implementationName, nImportFlags ),
     pSttNdIdx( 0 ),
     pTableItemMapper( 0 ),
     pDocElemTokenMap( 0 ),
@@ -1541,7 +1541,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImport_createInstance(
         const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
     throw( uno::Exception )
 {
-    return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_ALL );
+    return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), SwXMLImport_getImplementationName(), IMPORT_ALL );
 }
 
 OUString SAL_CALL SwXMLImportStyles_getImplementationName() throw()
@@ -1564,6 +1564,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportStyles_createInstance(
 {
     return (cppu::OWeakObject*)new SwXMLImport(
         comphelper::getComponentContext(rSMgr),
+        SwXMLImportStyles_getImplementationName(),
         IMPORT_STYLES | IMPORT_MASTERSTYLES | IMPORT_AUTOSTYLES |
         IMPORT_FONTDECLS );
 }
@@ -1588,6 +1589,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportContent_createInstance(
 {
     return (cppu::OWeakObject*)new SwXMLImport(
         comphelper::getComponentContext(rSMgr),
+        SwXMLImportContent_getImplementationName(),
         IMPORT_AUTOSTYLES | IMPORT_CONTENT | IMPORT_SCRIPTS |
         IMPORT_FONTDECLS );
 }
@@ -1610,7 +1612,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportMeta_createInstance(
         const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
     throw( uno::Exception )
 {
-    return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_META );
+    return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), SwXMLImportMeta_getImplementationName(), IMPORT_META );
 }
 
 OUString SAL_CALL SwXMLImportSettings_getImplementationName() throw()
@@ -1631,32 +1633,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwXMLImportSettings_createInstance(
         const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
     throw( uno::Exception )
 {
-    return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_SETTINGS );
-}
-
-
-// XServiceInfo
-// override empty method from parent class
-OUString SAL_CALL SwXMLImport::getImplementationName()
-    throw(RuntimeException)
-{
-    switch( getImportFlags() )
-    {
-        case IMPORT_ALL:
-            return SwXMLImport_getImplementationName();
-        case (IMPORT_STYLES|IMPORT_MASTERSTYLES|IMPORT_AUTOSTYLES|IMPORT_FONTDECLS):
-            return SwXMLImportStyles_getImplementationName();
-        case (IMPORT_AUTOSTYLES|IMPORT_CONTENT|IMPORT_SCRIPTS|IMPORT_FONTDECLS):
-            return SwXMLImportContent_getImplementationName();
-        case IMPORT_META:
-            return SwXMLImportMeta_getImplementationName();
-        case IMPORT_SETTINGS:
-            return SwXMLImportSettings_getImplementationName();
-        default:
-            // generic name for 'unknown' cases
-            return OUString(
-                "com.sun.star.comp.Writer.SwXMLImport" );
-    }
+    return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), SwXMLImportSettings_getImplementationName(), IMPORT_SETTINGS );
 }
 
 SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport& rImport )
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 91f2fe5..4b13b6c 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -110,7 +110,7 @@ protected:
 public:
     SwXMLImport(
         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
-        sal_uInt16 nImportFlags = IMPORT_ALL);
+        OUString const & implementationName, sal_uInt16 nImportFlags);
 
     ~SwXMLImport() throw();
 
@@ -127,10 +127,6 @@ public:
     // XInitialization
     virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
 
-    // XServiceInfo (override parent method)
-    OUString SAL_CALL getImplementationName()
-        throw( ::com::sun::star::uno::RuntimeException );
-
     void                    InsertStyles( sal_Bool bAuto );
     void                    FinishStyles();
 
diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
index f531de3..d42af34 100644
--- a/xmloff/inc/SchXMLImport.hxx
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -164,13 +164,10 @@ public:
     // #110680#
     SchXMLImport(
         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
-        sal_uInt16 nImportFlags = IMPORT_ALL );
+        OUString const & implementationName, sal_uInt16 nImportFlags );
 
     virtual ~SchXMLImport() throw ();
 
-    // XServiceInfo ( : SvXMLExport )
-    virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-
     SvXMLImportContext* CreateStylesContext( const OUString& rLocalName,
         const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
 
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index b7b99a5..8becd46 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -493,8 +493,8 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
 // #110680#
 SchXMLImport::SchXMLImport(
     const Reference< uno::XComponentContext >& xContext,
-    sal_uInt16 nImportFlags ) :
-        SvXMLImport( xContext, nImportFlags )
+    OUString const & implementationName, sal_uInt16 nImportFlags ) :
+    SvXMLImport( xContext, implementationName, nImportFlags )
 {
     GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
     GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT);
@@ -658,7 +658,7 @@ OUString SAL_CALL SchXMLImport_getImplementationName() throw()
 Reference< uno::XInterface > SAL_CALL SchXMLImport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
 {
     // #110680#
-    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr));
+    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_getImplementationName(), IMPORT_ALL);
 }
 
 // multiple storage version: one for content / styles / meta
@@ -678,7 +678,7 @@ OUString SAL_CALL SchXMLImport_Styles_getImplementationName() throw()
 Reference< uno::XInterface > SAL_CALL SchXMLImport_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
 {
     // #110680#
-    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_STYLES );
+    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Styles_getImplementationName(), IMPORT_STYLES );
 }
 
 Sequence< OUString > SAL_CALL SchXMLImport_Content_getSupportedServiceNames() throw()
@@ -696,7 +696,7 @@ OUString SAL_CALL SchXMLImport_Content_getImplementationName() throw()
 Reference< uno::XInterface > SAL_CALL SchXMLImport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
 {
     // #110680#
-    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS );
+    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Content_getImplementationName(), IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS );
 }
 
 Sequence< OUString > SAL_CALL SchXMLImport_Meta_getSupportedServiceNames() throw()
@@ -714,28 +714,7 @@ OUString SAL_CALL SchXMLImport_Meta_getImplementationName() throw()
 Reference< uno::XInterface > SAL_CALL SchXMLImport_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )
 {
     // #110680#
-    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), IMPORT_META );
-}
-
-// XServiceInfo
-OUString SAL_CALL SchXMLImport::getImplementationName() throw( uno::RuntimeException )
-{
-    switch( getImportFlags())
-    {
-        case IMPORT_ALL:
-            return SchXMLImport_getImplementationName();
-        case IMPORT_STYLES:
-            return SchXMLImport_Styles_getImplementationName();
-        case ( IMPORT_CONTENT | IMPORT_AUTOSTYLES | IMPORT_FONTDECLS ):
-            return SchXMLImport_Content_getImplementationName();
-        case IMPORT_META:
-            return SchXMLImport_Meta_getImplementationName();
-
-        case IMPORT_SETTINGS:
-        // there is no settings component in chart
-        default:
-            return OUString( "SchXMLImport" );
-    }
+    return (cppu::OWeakObject*)new SchXMLImport( comphelper::getComponentContext(rSMgr), SchXMLImport_Meta_getImplementationName(), IMPORT_META );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index c46757f..fdab947 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -50,6 +50,7 @@
 #include <comphelper/namecontainer.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/supportsservice.hxx>
 #include <comphelper/extract.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/documentconstants.hxx>
@@ -268,6 +269,7 @@ public:
     sal_Bool mbTextDocInOOoFileFormat;
 
     const uno::Reference< uno::XComponentContext > mxComponentContext;
+    OUString implementationName;
 
     uno::Reference< embed::XStorage > mxSourceStorage;
 
@@ -275,7 +277,8 @@ public:
 
     std::auto_ptr< DocumentInfo > mpDocumentInfo;
 
-    SvXMLImport_Impl( const uno::Reference< uno::XComponentContext >& rxContext)
+    SvXMLImport_Impl( const uno::Reference< uno::XComponentContext >& rxContext,
+                      OUString const & theImplementationName)
         : hBatsFontConv( 0 )
         , hMathFontConv( 0 )
         , mbOwnGraphicResolver( false )
@@ -285,6 +288,7 @@ public:
         , mbShapePositionInHoriL2R( sal_False )
         , mbTextDocInOOoFileFormat( sal_False )
         , mxComponentContext( rxContext )
+        , implementationName(theImplementationName)
         , mpRDFaHelper() // lazy
         , mpDocumentInfo() // lazy
     {
@@ -383,8 +387,8 @@ void SvXMLImport::_InitCtor()
 
 SvXMLImport::SvXMLImport(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
-    sal_uInt16 nImportFlags ) throw ()
-:   mpImpl( new SvXMLImport_Impl(xContext) ),
+    OUString const & implementationName, sal_uInt16 nImportFlags ) throw ()
+:   mpImpl( new SvXMLImport_Impl(xContext, implementationName) ),
     mpNamespaceMap( new SvXMLNamespaceMap ),
 
     mpUnitConv( new SvXMLUnitConverter( xContext,
@@ -965,16 +969,13 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
 OUString SAL_CALL SvXMLImport::getImplementationName()
     throw(uno::RuntimeException)
 {
-    OUString aStr;
-    return aStr;
+    return mpImpl->implementationName;
 }
 
 sal_Bool SAL_CALL SvXMLImport::supportsService( const OUString& rServiceName )
     throw(::com::sun::star::uno::RuntimeException)
 {
-    return
-        (rServiceName == "com.sun.star.document.ImportFilter") ||
-        (rServiceName == "com.sun.star.xml.XMLImportFilter");
+    return cppu::supportsService(this, rServiceName);
 }
 
 uno::Sequence< OUString > SAL_CALL SvXMLImport::getSupportedServiceNames(  )
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index f455858..00b531c 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -85,6 +85,18 @@ using ::com::sun::star::container::XEnumeration;
 using ::com::sun::star::lang::XMultiServiceFactory;
 using ::com::sun::star::lang::XInitialization;
 
+Sequence< OUString > SAL_CALL AnimationsImport_getSupportedServiceNames() throw()
+{
+    const OUString aServiceName( "com.sun.star.comp.Xmloff.AnimationsImport" );
+    const Sequence< OUString > aSeq( &aServiceName, 1 );
+    return aSeq;
+}
+
+OUString SAL_CALL AnimationsImport_getImplementationName() throw()
+{
+    return OUString( "xmloff::AnimationsImport" );
+}
+
 namespace xmloff
 {
 
@@ -1256,17 +1268,12 @@ public:
     // XAnimationNodeSupplier
     Reference< XAnimationNode > SAL_CALL getAnimationNode() throw (RuntimeException);
 
-    // XServiceInfo
-    virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
-    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException);
-    virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
-
 private:
     Reference< XAnimationNode > mxRootNode;
 };
 
 AnimationsImport::AnimationsImport( const Reference< XComponentContext > & rxContext )
-: SvXMLImport( rxContext , true )
+: SvXMLImport( rxContext, AnimationsImport_getImplementationName(), true )
 {
     // add namespaces
     GetNamespaceMap().Add(
@@ -1416,41 +1423,9 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const
 
 } // namespace xmloff
 
-Sequence< OUString > SAL_CALL AnimationsImport_getSupportedServiceNames() throw()
-{
-    const OUString aServiceName( "com.sun.star.comp.Xmloff.AnimationsImport" );
-    const Sequence< OUString > aSeq( &aServiceName, 1 );
-    return aSeq;
-}
-
-OUString SAL_CALL AnimationsImport_getImplementationName() throw()
-{
-    return OUString( "xmloff::AnimationsImport" );
-}
-
 Reference< XInterface > SAL_CALL AnimationsImport_createInstance(const Reference< XMultiServiceFactory > & rSMgr) throw( Exception )
 {
     return (cppu::OWeakObject*)new xmloff::AnimationsImport( comphelper::getComponentContext(rSMgr) );
 }
 
-namespace xmloff
-{
-
-OUString SAL_CALL AnimationsImport::getImplementationName() throw(RuntimeException)
-{
-    return AnimationsImport_getImplementationName();
-}
-
-sal_Bool SAL_CALL AnimationsImport::supportsService( const OUString& ServiceName ) throw(RuntimeException)
-{
-    return ServiceName == "com.sun.star.comp.Xmloff.AnimationsImport";
-}
-
-Sequence< OUString > SAL_CALL AnimationsImport::getSupportedServiceNames() throw(RuntimeException)
-{
-    return AnimationsImport_getSupportedServiceNames();
-}
-
-} // namespace xmloff
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 6b1dd4a..c48cb5f 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -266,7 +266,7 @@ OUString SAL_CALL classname##_getImplementationName() throw()\
 }\
 uno::Reference< uno::XInterface > SAL_CALL classname##_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw( uno::Exception )\
 {\
-    return (cppu::OWeakObject*)new SdXMLImport( comphelper::getComponentContext(rSMgr), draw, flags );\
+    return (cppu::OWeakObject*)new SdXMLImport( comphelper::getComponentContext(rSMgr), implementationname, draw, flags ); \
 }
 
 SERVICE( XMLImpressImportOasis, "com.sun.star.comp.Impress.XMLOasisImporter", "XMLImpressImportOasis", sal_False, IMPORT_ALL )
@@ -287,8 +287,9 @@ SERVICE( XMLDrawSettingsImportOasis, "com.sun.star.comp.Draw.XMLOasisSettingsImp
 // #110680#
 SdXMLImport::SdXMLImport(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
+    OUString const & implementationName,
     sal_Bool bIsDraw, sal_uInt16 nImportFlags )
-:   SvXMLImport( xContext, nImportFlags ),
+:   SvXMLImport( xContext, implementationName, nImportFlags ),
     mpMasterStylesContext(0L),
     mpDocElemTokenMap(0L),
     mpBodyElemTokenMap(0L),
@@ -893,51 +894,6 @@ void SdXMLImport::SetStatistics(
     }
 }
 
-// XServiceInfo
-OUString SAL_CALL SdXMLImport::getImplementationName() throw( uno::RuntimeException )
-{
-    if( IsDraw())
-    {
-        // Draw
-
-        switch( getImportFlags())
-        {
-            case IMPORT_ALL:
-                return XMLDrawImportOasis_getImplementationName();
-            case (IMPORT_STYLES|IMPORT_AUTOSTYLES|IMPORT_MASTERSTYLES):
-                return XMLDrawStylesImportOasis_getImplementationName();
-            case (IMPORT_AUTOSTYLES|IMPORT_CONTENT|IMPORT_SCRIPTS|IMPORT_FONTDECLS):
-                return XMLDrawContentImportOasis_getImplementationName();
-            case IMPORT_META:
-                return XMLDrawMetaImportOasis_getImplementationName();
-            case IMPORT_SETTINGS:
-                return XMLDrawSettingsImportOasis_getImplementationName();
-            default:
-                return XMLDrawImportOasis_getImplementationName();
-        }
-    }
-    else
-    {
-        // Impress
-
-        switch( getImportFlags())
-        {
-            case IMPORT_ALL:
-                return XMLImpressImportOasis_getImplementationName();
-            case (IMPORT_STYLES|IMPORT_AUTOSTYLES|IMPORT_MASTERSTYLES):
-                return XMLImpressStylesImportOasis_getImplementationName();
-            case (IMPORT_AUTOSTYLES|IMPORT_CONTENT|IMPORT_SCRIPTS|IMPORT_FONTDECLS):
-                return XMLImpressContentImportOasis_getImplementationName();
-            case IMPORT_META:
-                return XMLImpressMetaImportOasis_getImplementationName();
-            case IMPORT_SETTINGS:
-                return XMLImpressSettingsImportOasis_getImplementationName();
-            default:
-                return XMLImpressImportOasis_getImplementationName();
-        }
-    }
-}
-
 void SdXMLImport::AddHeaderDecl( const OUString& rName, const OUString& rText )
 {
     if( !rName.isEmpty() && !rText.isEmpty() )
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index 884ca77..302ba12 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -220,7 +220,8 @@ protected:
 public:
     SdXMLImport(
         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
-        sal_Bool bIsDraw, sal_uInt16 nImportFlags = IMPORT_ALL );
+        OUString const & implementationName,
+        sal_Bool bIsDraw, sal_uInt16 nImportFlags );
     ~SdXMLImport() throw ();
 
     // XImporter
@@ -290,9 +291,6 @@ public:
 
     sal_Bool IsPreview() const { return mbPreview; }
 
-    // XServiceInfo ( : SvXMLExport )
-    virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-
     void AddHeaderDecl( const OUString& rName, const OUString& rText );
     void AddFooterDecl( const OUString& rName, const OUString& rText );
     void AddDateTimeDecl( const OUString& rName, const OUString& rText, sal_Bool bFixed, const OUString& rDateTimeFormat );
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index c4d8e4f..3b85e7e 100644
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -31,7 +31,7 @@ using namespace ::xmloff::token;
 // #110680#
 XMLMetaImportComponent::XMLMetaImportComponent(
     const uno::Reference< uno::XComponentContext >& xContext) throw()
-    :   SvXMLImport(xContext), mxDocProps()
+    :   SvXMLImport(xContext, ""), mxDocProps()
 {
 }
 
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 111abc1..98fda5d 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -102,7 +102,7 @@ sal_uInt32 XMLVersionListExport::exportDoc( enum ::xmloff::token::XMLTokenEnum )
 XMLVersionListImport::XMLVersionListImport(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
     com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions )
-:   SvXMLImport(xContext),
+:   SvXMLImport(xContext, ""),
     maVersions( rVersions )
 {
     GetNamespaceMap().AddAtIndex( XML_NAMESPACE_FRAMEWORK_IDX, xmloff::token::GetXMLToken(xmloff::token::XML_NP_VERSIONS_LIST),
diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx
index 4dbf1de..e96e420 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.cxx
@@ -47,7 +47,7 @@ using ::xmloff::token::XML_AUTO_TEXT_EVENTS;
 
 XMLAutoTextEventImport::XMLAutoTextEventImport(
     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext) throw()
-:   SvXMLImport(xContext)
+:   SvXMLImport(xContext, "")
 {
 }
 


More information about the Libreoffice-commits mailing list