summaryrefslogtreecommitdiff
path: root/starmath
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 /starmath
parent6d25220ad6c869bb7cd79cf678d092b81558a8d2 (diff)
Consolidate XServiceInfo for classes derived from SvXMLImport
Change-Id: I5a269d8b7e95049c67ae14b06a79b417bc91a474
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathmlimport.cxx35
-rw-r--r--starmath/source/mathmlimport.hxx5
2 files changed, 6 insertions, 34 deletions
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();