summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-09 10:12:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-09 10:12:19 +0100
commit6e12fb3be33379fa87b90ffae047cffe1370eef9 (patch)
tree1e39f01609c1471bbb0a2b0dcb85c6c67a7ff1f4
parent6d25220ad6c869bb7cd79cf678d092b81558a8d2 (diff)
Consolidate XServiceInfo for classes derived from SvXMLImport
Change-Id: I5a269d8b7e95049c67ae14b06a79b417bc91a474
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx18
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.hxx11
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.cxx4
-rw-r--r--editeng/source/xml/xmltxtimp.cxx2
-rw-r--r--include/xmloff/xmlimp.hxx7
-rw-r--r--linguistic/source/convdicxml.cxx8
-rw-r--r--linguistic/source/convdicxml.hxx5
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx20
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.hxx5
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx36
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx5
-rw-r--r--starmath/source/mathmlimport.cxx35
-rw-r--r--starmath/source/mathmlimport.hxx5
-rw-r--r--svx/source/xml/xmlxtimp.cxx2
-rw-r--r--sw/source/core/swg/SwXMLBlockImport.cxx4
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx37
-rw-r--r--sw/source/filter/xml/xmlimp.hxx6
-rw-r--r--xmloff/inc/SchXMLImport.hxx5
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx33
-rw-r--r--xmloff/source/core/xmlimp.cxx17
-rw-r--r--xmloff/source/draw/animationimport.cxx51
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx50
-rw-r--r--xmloff/source/draw/sdxmlimp_impl.hxx6
-rw-r--r--xmloff/source/meta/MetaImportComponent.cxx2
-rw-r--r--xmloff/source/meta/xmlversion.cxx2
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.cxx2
27 files changed, 94 insertions, 286 deletions
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index a85bfbdada16..3bda64eb25ac 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 0d083d0238d0..971e56b0ae8d 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 10ea2274476d..28b65c1f1311 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 f5c7fbf63969..f00d0d90189e 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 b2e3bafe305d..872a7bd3c642 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 72dbc064e53e..f003c001aecf 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 82861e5b8278..dd4521c4fb0a 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 589c433c7fd5..a4dd61210eec 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 c41078481024..4bb437681ff9 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 1f02083e63b3..abfe32ad8f9e 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 bf2d9ae5ea36..1645c32ec43a 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 f360f714a708..f031b086c701 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 c0d9e1938576..dcdae77d1325 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 246d0940302a..b19345c04f94 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 7535d33ce3c2..7fbc9d438be9 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 bd76ad7edd6d..f8795f32cced 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 23eb8138e571..ace6e2ba3c93 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 91f2fe5f10a9..4b13b6c6052d 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 f531de380e39..d42af3400b8a 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 b7b99a56eacd..8becd466ef22 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 c46757f70b5d..fdab947fcdd3 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 f455858d499f..00b531c2c00c 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 6b1dd4a795da..c48cb5f79e37 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 884ca77e16f5..302ba12ace44 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 c4d8e4f3b548..3b85e7eecb99 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 111abc1d7e2a..98fda5d9e74d 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 4dbf1defb4fe..e96e4209d35f 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, "")
{
}