summaryrefslogtreecommitdiff
path: root/starmath/source/register.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-04-04 18:12:51 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-04-04 18:12:51 +0000
commit726125348e86b557e27ea09148f2e7afe5361bbb (patch)
tree83293ba52c3813d432e81347b3e6453db13b6609 /starmath/source/register.cxx
parent0de9fde00aa8213fc646f7ad64f9779fcb089c89 (diff)
INTEGRATION: CWS mav3 (1.4.38); FILE MERGED
2003/02/20 10:03:19 mav 1.4.38.1: #i2822# new document UNO services supporting XModel
Diffstat (limited to 'starmath/source/register.cxx')
-rw-r--r--starmath/source/register.cxx30
1 files changed, 28 insertions, 2 deletions
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index c9a9f7517ab7..752d8060a626 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: register.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cmc $ $Date: 2002-07-19 15:19:46 $
+ * last change: $Author: hr $ $Date: 2003-04-04 19:12:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,15 @@
using namespace ::com::sun::star::lang;
+//Math document
+extern ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+SmDocument_getSupportedServiceNames() throw();
+extern ::rtl::OUString SAL_CALL SmDocument_getImplementationName() throw();
+extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+SAL_CALL SmDocument_createInstance(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw(
+ ::com::sun::star::uno::Exception );
+
//MathML import
extern ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
SmXMLImport_getSupportedServiceNames() throw();
@@ -198,6 +207,14 @@ sal_Bool SAL_CALL component_writeInfo( void* pServiceManager ,
for(i = 0; i < rServices.getLength(); i++ )
xNewKey->createKey( rServices.getConstArray()[i]);
+ xNewKey = xKey->createKey(::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("/") ) + SmDocument_getImplementationName() +
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) );
+
+ rServices = SmDocument_getSupportedServiceNames();
+ for(i = 0; i < rServices.getLength(); i++ )
+ xNewKey->createKey( rServices.getConstArray()[i]);
+
return sal_True;
}
@@ -274,6 +291,15 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplementationName
SmXMLExportContent_createInstance,
SmXMLExportContent_getSupportedServiceNames() );
}
+ else if( SmDocument_getImplementationName().equalsAsciiL(
+ pImplementationName, strlen(pImplementationName)) )
+ {
+ xFactory = ::cppu::createSingleFactory( xServiceManager,
+ SmDocument_getImplementationName(),
+ SmDocument_createInstance,
+ SmDocument_getSupportedServiceNames() );
+ }
+
// Factory is valid - service was found.
if ( xFactory.is() )