summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-04-01 22:32:09 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-04-01 22:32:09 +0100
commit134dd9adb2240be1c8c7b14327790e50f302f563 (patch)
tree36a9a562bfa969eeb264b5255e8f9b3db0282cf7 /writerperfect
parenta6411b0e71ef45c365a4751d1a3b60565735d076 (diff)
register msworks and wpg filter components
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/prj/d.lst2
-rw-r--r--writerperfect/source/wpgimp/wpgimport_genericfilter.cxx29
-rw-r--r--writerperfect/source/wpsimp/makefile.mk1
-rw-r--r--writerperfect/source/wpsimp/msworks_genericfilter.cxx29
-rw-r--r--writerperfect/util/makefile.mk14
-rw-r--r--writerperfect/util/msworksfilter.component8
-rw-r--r--writerperfect/util/wpgfilter.component8
7 files changed, 31 insertions, 60 deletions
diff --git a/writerperfect/prj/d.lst b/writerperfect/prj/d.lst
index 8b281c57aea3..c414fc661343 100644
--- a/writerperfect/prj/d.lst
+++ b/writerperfect/prj/d.lst
@@ -2,4 +2,4 @@
..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%
..\%__SRC%\bin\wpftgo.dll %_DEST%\bin%_EXT%\wpftgo.dll
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-..\%__SRC%\misc\wpft.component %_DEST%\xml%_EXT%\wpft.component
+..\%__SRC%\misc\*.component %_DEST%\xml%_EXT%\*.component
diff --git a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx b/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
index 210d5ef2a51b..2ab4fae56327 100644
--- a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
+++ b/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx
@@ -41,40 +41,11 @@ using namespace ::com::sun::star::registry;
extern "C"
{
-//==================================================================================================
void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * /* pServiceManager */, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- sal_Int32 nPos = 0;
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( WPGImportFilter_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
-
- const Sequence< OUString > & rSNL = WPGImportFilter_getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_FAIL( "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
diff --git a/writerperfect/source/wpsimp/makefile.mk b/writerperfect/source/wpsimp/makefile.mk
index da17e806f9b0..c3dfe20bdd6b 100644
--- a/writerperfect/source/wpsimp/makefile.mk
+++ b/writerperfect/source/wpsimp/makefile.mk
@@ -27,3 +27,4 @@ SLOFILES= \
$(SLO)$/msworks_genericfilter.obj
.INCLUDE : target.mk
+
diff --git a/writerperfect/source/wpsimp/msworks_genericfilter.cxx b/writerperfect/source/wpsimp/msworks_genericfilter.cxx
index a736bff9edb3..8b37d45970c6 100644
--- a/writerperfect/source/wpsimp/msworks_genericfilter.cxx
+++ b/writerperfect/source/wpsimp/msworks_genericfilter.cxx
@@ -41,40 +41,11 @@ using namespace ::com::sun::star::registry;
extern "C"
{
-//==================================================================================================
void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * /* pServiceManager */, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- sal_Int32 nPos = 0;
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( MSWorksImportFilter_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
-
- const Sequence< OUString > & rSNL = MSWorksImportFilter_getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_FAIL( "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
diff --git a/writerperfect/util/makefile.mk b/writerperfect/util/makefile.mk
index c202bf3caa54..d5d296d22a1b 100644
--- a/writerperfect/util/makefile.mk
+++ b/writerperfect/util/makefile.mk
@@ -120,10 +120,22 @@ DEF3NAME = $(SHL3TARGET)
.INCLUDE : target.mk
-ALLTAR : $(MISC)/wpft.component
+ALLTAR : $(MISC)/wpft.component $(MISC)/wpgfilter.component $(MISC)/msworksfilter.component
$(MISC)/wpft.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
wpft.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt wpft.component
+
+$(MISC)/wpgfilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ wpgfilter.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt wpgfilter.component
+
+$(MISC)/msworksfilter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ msworksfilter.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt msworksfilter.component
diff --git a/writerperfect/util/msworksfilter.component b/writerperfect/util/msworksfilter.component
new file mode 100644
index 000000000000..769eaf388f16
--- /dev/null
+++ b/writerperfect/util/msworksfilter.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Writer.MSWorksImportFilter">
+ <service name="com.sun.star.document.ImportFilter"/>
+ <service name="com.sun.star.document.ExtendedTypeDetection"/>
+ </implementation>
+</component>
diff --git a/writerperfect/util/wpgfilter.component b/writerperfect/util/wpgfilter.component
new file mode 100644
index 000000000000..f571959c0521
--- /dev/null
+++ b/writerperfect/util/wpgfilter.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Draw.WPGImportFilter">
+ <service name="com.sun.star.document.ImportFilter"/>
+ <service name="com.sun.star.document.ExtendedTypeDetection"/>
+ </implementation>
+</component>