summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/genericfilter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/genericfilter.cxx')
-rw-r--r--lotuswordpro/source/filter/genericfilter.cxx51
1 files changed, 51 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/genericfilter.cxx b/lotuswordpro/source/filter/genericfilter.cxx
new file mode 100644
index 000000000000..0594500771f2
--- /dev/null
+++ b/lotuswordpro/source/filter/genericfilter.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#include <stdio.h>
+
+#include <osl/mutex.hxx>
+#include <osl/thread.h>
+#include <cppuhelper/factory.hxx>
+
+#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#endif
+
+#include "LotusWordProImportFilter.hxx"
+
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+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;
+}
+void * SAL_CALL component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
+{
+ void * pRet = 0;
+
+ OUString implName = OUString::createFromAscii( pImplName );
+ if ( pServiceManager && implName.equals(LotusWordProImportFilter_getImplementationName()) )
+ {
+ Reference< XSingleServiceFactory > xFactory( createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ OUString::createFromAscii( pImplName ),
+ LotusWordProImportFilter_createInstance, LotusWordProImportFilter_getSupportedServiceNames() ) );
+
+ if (xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+ }
+
+ return pRet;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */