diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-04-19 14:33:09 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-04-19 14:38:00 +0200 |
commit | 9284c50f975ce91fcb50e3849bbe38af50dbcb6c (patch) | |
tree | 511f012db23292e7952cfa3a494d6a6771239656 /writerperfect | |
parent | b98c960e9707d8222dd7c8fad22e84bbfb725822 (diff) |
Diminish the number of writerperfect libraries
Instead of a pleiade of libraries, one for graphic filters (wpftdraw)
and one for text document filters (wpftwriter) to diminish duplicate
static linking.
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/Library_msworks.mk | 69 | ||||
-rw-r--r-- | writerperfect/Library_visioimport.mk | 69 | ||||
-rw-r--r-- | writerperfect/Library_wpftdraw.mk (renamed from writerperfect/Library_cdrimport.mk) | 25 | ||||
-rw-r--r-- | writerperfect/Library_wpftwriter.mk (renamed from writerperfect/Library_wpft.mk) | 22 | ||||
-rw-r--r-- | writerperfect/Library_wpgimport.mk | 68 | ||||
-rw-r--r-- | writerperfect/Module_writerperfect.mk | 26 | ||||
-rw-r--r-- | writerperfect/source/draw/CDRImportFilter.cxx (renamed from writerperfect/source/cdrimp/CDRImportFilter.cxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/draw/CDRImportFilter.hxx (renamed from writerperfect/source/cdrimp/CDRImportFilter.hxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/draw/CMXImportFilter.cxx (renamed from writerperfect/source/cdrimp/CMXImportFilter.cxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/draw/CMXImportFilter.hxx (renamed from writerperfect/source/cdrimp/CMXImportFilter.hxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/draw/VisioImportFilter.cxx (renamed from writerperfect/source/vsdimp/VisioImportFilter.cxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/draw/VisioImportFilter.hxx (renamed from writerperfect/source/vsdimp/VisioImportFilter.hxx) | 5 | ||||
-rw-r--r-- | writerperfect/source/draw/WPGImportFilter.cxx (renamed from writerperfect/source/wpgimp/WPGImportFilter.cxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/draw/WPGImportFilter.hxx (renamed from writerperfect/source/wpgimp/WPGImportFilter.hxx) | 5 | ||||
-rw-r--r-- | writerperfect/source/draw/wpftdraw_genericfilter.cxx (renamed from writerperfect/source/vsdimp/visioimport_genericfilter.cxx) | 44 | ||||
-rw-r--r-- | writerperfect/source/wpdimp/wpft_genericfilter.cxx | 67 | ||||
-rw-r--r-- | writerperfect/source/wpgimp/wpgimport_genericfilter.cxx | 68 | ||||
-rw-r--r-- | writerperfect/source/wpsimp/msworks_genericfilter.cxx | 68 | ||||
-rw-r--r-- | writerperfect/source/writer/MSWorksImportFilter.cxx (renamed from writerperfect/source/wpsimp/MSWorksImportFilter.cxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/writer/MSWorksImportFilter.hxx (renamed from writerperfect/source/wpsimp/MSWorksImportFilter.hxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/writer/WordPerfectImportFilter.cxx (renamed from writerperfect/source/wpdimp/WordPerfectImportFilter.cxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/writer/WordPerfectImportFilter.hxx (renamed from writerperfect/source/wpdimp/WordPerfectImportFilter.hxx) | 0 | ||||
-rw-r--r-- | writerperfect/source/writer/wpftwriter_genericfilter.cxx (renamed from writerperfect/source/cdrimp/cdrimport_genericfilter.cxx) | 15 | ||||
-rw-r--r-- | writerperfect/util/msworksfilter.component | 8 | ||||
-rw-r--r-- | writerperfect/util/visiofilter.component | 8 | ||||
-rw-r--r-- | writerperfect/util/wpftdraw.component (renamed from writerperfect/util/cdrfilter.component) | 10 | ||||
-rw-r--r-- | writerperfect/util/wpftwriter.component (renamed from writerperfect/util/wpft.component) | 6 | ||||
-rw-r--r-- | writerperfect/util/wpgfilter.component | 8 |
28 files changed, 98 insertions, 493 deletions
diff --git a/writerperfect/Library_msworks.mk b/writerperfect/Library_msworks.mk deleted file mode 100644 index 7efb9944a24d..000000000000 --- a/writerperfect/Library_msworks.mk +++ /dev/null @@ -1,69 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2011 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -$(eval $(call gb_Library_Library,msworks)) - -$(eval $(call gb_Library_set_componentfile,msworks,writerperfect/util/msworksfilter)) - -$(eval $(call gb_Library_set_include,msworks,\ - $$(INCLUDE) \ - -I$(SRCDIR)/writerperfect/source \ -)) - -$(eval $(call gb_Library_use_api,msworks,\ - offapi \ - udkapi \ -)) - -$(eval $(call gb_Library_use_libraries,msworks,\ - cppu \ - cppuhelper \ - sal \ - sot \ - ucbhelper \ - tl \ - utl \ - xo \ - $(gb_STDLIBS) \ -)) - -$(eval $(call gb_Library_use_static_libraries,msworks,\ - writerperfect \ -)) - -$(eval $(call gb_Library_use_externals,msworks,\ - wpd \ - wps \ -)) - -$(eval $(call gb_Library_add_exception_objects,msworks,\ - writerperfect/source/wpsimp/MSWorksImportFilter \ - writerperfect/source/wpsimp/msworks_genericfilter \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/writerperfect/Library_visioimport.mk b/writerperfect/Library_visioimport.mk deleted file mode 100644 index 7db2b04bbd9e..000000000000 --- a/writerperfect/Library_visioimport.mk +++ /dev/null @@ -1,69 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2011 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -$(eval $(call gb_Library_Library,visioimport)) - -$(eval $(call gb_Library_set_componentfile,visioimport,writerperfect/util/visiofilter)) - -$(eval $(call gb_Library_set_include,visioimport,\ - $$(INCLUDE) \ - -I$(SRCDIR)/writerperfect/source \ -)) - -$(eval $(call gb_Library_use_api,visioimport,\ - offapi \ - udkapi \ -)) - -$(eval $(call gb_Library_use_libraries,visioimport,\ - cppu \ - cppuhelper \ - sal \ - sot \ - tl \ - utl \ - xo \ - $(gb_STDLIBS) \ -)) - -$(eval $(call gb_Library_use_static_libraries,visioimport,\ - writerperfect \ -)) - -$(eval $(call gb_Library_use_externals,visioimport,\ - wpd \ - wpg \ - visio \ -)) - -$(eval $(call gb_Library_add_exception_objects,visioimport,\ - writerperfect/source/vsdimp/VisioImportFilter \ - writerperfect/source/vsdimp/visioimport_genericfilter \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/writerperfect/Library_cdrimport.mk b/writerperfect/Library_wpftdraw.mk index 257757c32888..e4c3b51de2db 100644 --- a/writerperfect/Library_cdrimport.mk +++ b/writerperfect/Library_wpftdraw.mk @@ -26,21 +26,21 @@ # #************************************************************************* -$(eval $(call gb_Library_Library,cdrimport)) +$(eval $(call gb_Library_Library,wpftdraw)) -$(eval $(call gb_Library_set_componentfile,cdrimport,writerperfect/util/cdrfilter)) +$(eval $(call gb_Library_set_componentfile,wpftdraw,writerperfect/util/wpftdraw)) -$(eval $(call gb_Library_set_include,cdrimport,\ +$(eval $(call gb_Library_set_include,wpftdraw,\ $$(INCLUDE) \ -I$(SRCDIR)/writerperfect/source \ )) -$(eval $(call gb_Library_use_api,cdrimport,\ +$(eval $(call gb_Library_use_api,wpftdraw,\ offapi \ udkapi \ )) -$(eval $(call gb_Library_use_libraries,cdrimport,\ +$(eval $(call gb_Library_use_libraries,wpftdraw,\ cppu \ cppuhelper \ sal \ @@ -51,22 +51,25 @@ $(eval $(call gb_Library_use_libraries,cdrimport,\ $(gb_STDLIBS) \ )) -$(eval $(call gb_Library_use_static_libraries,cdrimport,\ +$(eval $(call gb_Library_use_static_libraries,wpftdraw,\ writerperfect \ )) -$(eval $(call gb_Library_use_externals,cdrimport,\ +$(eval $(call gb_Library_use_externals,wpftdraw,\ wpd \ wpg \ + visio \ cdr \ lcms2 \ zlib \ )) -$(eval $(call gb_Library_add_exception_objects,cdrimport,\ - writerperfect/source/cdrimp/CDRImportFilter \ - writerperfect/source/cdrimp/CMXImportFilter \ - writerperfect/source/cdrimp/cdrimport_genericfilter \ +$(eval $(call gb_Library_add_exception_objects,wpftdraw,\ + writerperfect/source/draw/CDRImportFilter \ + writerperfect/source/draw/CMXImportFilter \ + writerperfect/source/draw/VisioImportFilter \ + writerperfect/source/draw/WPGImportFilter \ + writerperfect/source/draw/wpftdraw_genericfilter \ )) # vim: set noet sw=4 ts=4: diff --git a/writerperfect/Library_wpft.mk b/writerperfect/Library_wpftwriter.mk index 113cb17fad60..611003524dd5 100644 --- a/writerperfect/Library_wpft.mk +++ b/writerperfect/Library_wpftwriter.mk @@ -26,21 +26,21 @@ # #************************************************************************* -$(eval $(call gb_Library_Library,wpft)) +$(eval $(call gb_Library_Library,wpftwriter)) -$(eval $(call gb_Library_set_componentfile,wpft,writerperfect/util/wpft)) +$(eval $(call gb_Library_set_componentfile,wpftwriter,writerperfect/util/wpftwriter)) -$(eval $(call gb_Library_set_include,wpft,\ +$(eval $(call gb_Library_set_include,wpftwriter,\ $$(INCLUDE) \ -I$(SRCDIR)/writerperfect/source \ )) -$(eval $(call gb_Library_use_api,wpft,\ +$(eval $(call gb_Library_use_api,wpftwriter,\ offapi \ udkapi \ )) -$(eval $(call gb_Library_use_libraries,wpft,\ +$(eval $(call gb_Library_use_libraries,wpftwriter,\ cppu \ cppuhelper \ vcl \ @@ -54,18 +54,20 @@ $(eval $(call gb_Library_use_libraries,wpft,\ $(gb_STDLIBS) \ )) -$(eval $(call gb_Library_use_static_libraries,wpft,\ +$(eval $(call gb_Library_use_static_libraries,wpftwriter,\ writerperfect \ )) -$(eval $(call gb_Library_use_externals,wpft,\ +$(eval $(call gb_Library_use_externals,wpftwriter,\ wpd \ wpg \ + wps \ )) -$(eval $(call gb_Library_add_exception_objects,wpft,\ - writerperfect/source/wpdimp/WordPerfectImportFilter \ - writerperfect/source/wpdimp/wpft_genericfilter \ +$(eval $(call gb_Library_add_exception_objects,wpftwriter,\ + writerperfect/source/writer/MSWorksImportFilter \ + writerperfect/source/writer/WordPerfectImportFilter \ + writerperfect/source/writer/wpftwriter_genericfilter \ )) # vim: set noet sw=4 ts=4: diff --git a/writerperfect/Library_wpgimport.mk b/writerperfect/Library_wpgimport.mk deleted file mode 100644 index b2cbd66e238a..000000000000 --- a/writerperfect/Library_wpgimport.mk +++ /dev/null @@ -1,68 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2011 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -$(eval $(call gb_Library_Library,wpgimport)) - -$(eval $(call gb_Library_set_componentfile,wpgimport,writerperfect/util/wpgfilter)) - -$(eval $(call gb_Library_set_include,wpgimport,\ - $$(INCLUDE) \ - -I$(SRCDIR)/writerperfect/source \ -)) - -$(eval $(call gb_Library_use_api,wpgimport,\ - offapi \ - udkapi \ -)) - -$(eval $(call gb_Library_use_libraries,wpgimport,\ - cppu \ - cppuhelper \ - sal \ - sot \ - tl \ - utl \ - xo \ - $(gb_STDLIBS) \ -)) - -$(eval $(call gb_Library_use_static_libraries,wpgimport,\ - writerperfect \ -)) - -$(eval $(call gb_Library_use_externals,wpgimport,\ - wpd \ - wpg \ -)) - -$(eval $(call gb_Library_add_exception_objects,wpgimport,\ - writerperfect/source/wpgimp/WPGImportFilter \ - writerperfect/source/wpgimp/wpgimport_genericfilter \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk index dc2039c8f604..0e1bee0f2188 100644 --- a/writerperfect/Module_writerperfect.mk +++ b/writerperfect/Module_writerperfect.mk @@ -28,42 +28,32 @@ $(eval $(call gb_Module_Module,writerperfect)) -ifneq (,$(filter YES,$(SYSTEM_LIBCDR))$(filter LIBCDR,$(BUILD_TYPE))) -$(eval $(call gb_Module_add_targets,writerperfect,\ - Library_cdrimport \ -)) -endif - ifneq (,$(filter YES,$(SYSTEM_LIBWPD))$(filter LIBWPD,$(BUILD_TYPE))) ifneq (,$(filter YES,$(SYSTEM_LIBWPS))$(filter LIBWPS,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,writerperfect,\ - Library_msworks \ + Library_wpftwriter \ )) endif endif +ifneq (,$(filter YES,$(SYSTEM_LIBWPD))$(filter LIBWPD,$(BUILD_TYPE))) +ifneq (,$(filter YES,$(SYSTEM_LIBWPG))$(filter LIBWPG,$(BUILD_TYPE))) ifneq (,$(filter YES,$(SYSTEM_LIBVISIO))$(filter LIBVISIO,$(BUILD_TYPE))) +ifneq (,$(filter YES,$(SYSTEM_LIBCDR))$(filter LIBCDR,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,writerperfect,\ - Library_visioimport \ + Library_wpftdraw \ )) endif - -ifneq (,$(filter YES,$(SYSTEM_LIBWPD))$(filter LIBWPD,$(BUILD_TYPE))) -$(eval $(call gb_Module_add_targets,writerperfect,\ - Library_wpft \ -)) endif - -ifneq (,$(filter YES,$(SYSTEM_LIBWPG))$(filter LIBWPG,$(BUILD_TYPE))) -$(eval $(call gb_Module_add_targets,writerperfect,\ - Library_wpgimport \ -)) +endif endif ifneq (,$(filter YES,$(SYSTEM_LIBWPD))$(filter LIBWPD,$(BUILD_TYPE))) +ifneq (,$(filter YES,$(SYSTEM_LIBWPG))$(filter LIBWPG,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,writerperfect,\ StaticLibrary_writerperfect \ )) endif +endif # vim: set noet sw=4 ts=4: diff --git a/writerperfect/source/cdrimp/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx index 2476a5567476..2476a5567476 100644 --- a/writerperfect/source/cdrimp/CDRImportFilter.cxx +++ b/writerperfect/source/draw/CDRImportFilter.cxx diff --git a/writerperfect/source/cdrimp/CDRImportFilter.hxx b/writerperfect/source/draw/CDRImportFilter.hxx index 56f124ea8ebe..56f124ea8ebe 100644 --- a/writerperfect/source/cdrimp/CDRImportFilter.hxx +++ b/writerperfect/source/draw/CDRImportFilter.hxx diff --git a/writerperfect/source/cdrimp/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx index 76a9d06431a6..76a9d06431a6 100644 --- a/writerperfect/source/cdrimp/CMXImportFilter.cxx +++ b/writerperfect/source/draw/CMXImportFilter.cxx diff --git a/writerperfect/source/cdrimp/CMXImportFilter.hxx b/writerperfect/source/draw/CMXImportFilter.hxx index a9ec8f430ec5..a9ec8f430ec5 100644 --- a/writerperfect/source/cdrimp/CMXImportFilter.hxx +++ b/writerperfect/source/draw/CMXImportFilter.hxx diff --git a/writerperfect/source/vsdimp/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx index 13bf08922fa7..13bf08922fa7 100644 --- a/writerperfect/source/vsdimp/VisioImportFilter.cxx +++ b/writerperfect/source/draw/VisioImportFilter.cxx diff --git a/writerperfect/source/vsdimp/VisioImportFilter.hxx b/writerperfect/source/draw/VisioImportFilter.hxx index a4e7d7fbbd72..377c007c1053 100644 --- a/writerperfect/source/vsdimp/VisioImportFilter.hxx +++ b/writerperfect/source/draw/VisioImportFilter.hxx @@ -40,11 +40,6 @@ #include <stdio.h> -enum FilterType -{ - FILTER_IMPORT, - FILTER_EXPORT -}; /* This component will be instantiated for both import or export. Whether it calls * setSourceDocument or setTargetDocument determines which Impl function the filter * member calls */ diff --git a/writerperfect/source/wpgimp/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx index ff7612b1e433..ff7612b1e433 100644 --- a/writerperfect/source/wpgimp/WPGImportFilter.cxx +++ b/writerperfect/source/draw/WPGImportFilter.cxx diff --git a/writerperfect/source/wpgimp/WPGImportFilter.hxx b/writerperfect/source/draw/WPGImportFilter.hxx index 03fb1231d29f..091c821a552b 100644 --- a/writerperfect/source/wpgimp/WPGImportFilter.hxx +++ b/writerperfect/source/draw/WPGImportFilter.hxx @@ -40,11 +40,6 @@ #include <stdio.h> -enum FilterType -{ - FILTER_IMPORT, - FILTER_EXPORT -}; /* This component will be instantiated for both import or export. Whether it calls * setSourceDocument or setTargetDocument determines which Impl function the filter * member calls */ diff --git a/writerperfect/source/vsdimp/visioimport_genericfilter.cxx b/writerperfect/source/draw/wpftdraw_genericfilter.cxx index 04172b0d3060..cbecb4faeb2d 100644 --- a/writerperfect/source/vsdimp/visioimport_genericfilter.cxx +++ b/writerperfect/source/draw/wpftdraw_genericfilter.cxx @@ -31,7 +31,10 @@ #include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include "CDRImportFilter.hxx" +#include "CMXImportFilter.hxx" #include "VisioImportFilter.hxx" +#include "WPGImportFilter.hxx" using namespace ::rtl; using namespace ::cppu; @@ -41,12 +44,51 @@ using namespace ::com::sun::star::registry; extern "C" { - SAL_DLLPUBLIC_EXPORT void *SAL_CALL visiofilter_component_getFactory( + SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftdraw_component_getFactory( const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ ) { void *pRet = 0; OUString implName = OUString::createFromAscii( pImplName ); + if ( pServiceManager && implName.equals(CDRImportFilter_getImplementationName()) ) + { + Reference< XSingleServiceFactory > xFactory( createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + OUString::createFromAscii( pImplName ), + CDRImportFilter_createInstance, CDRImportFilter_getSupportedServiceNames() ) ); + + if (xFactory.is()) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } + if ( pServiceManager && implName.equals(CMXImportFilter_getImplementationName()) ) + { + Reference< XSingleServiceFactory > xFactory( createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + OUString::createFromAscii( pImplName ), + CMXImportFilter_createInstance, CMXImportFilter_getSupportedServiceNames() ) ); + + if (xFactory.is()) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } + if ( pServiceManager && implName.equals(WPGImportFilter_getImplementationName()) ) + { + Reference< XSingleServiceFactory > xFactory( createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + OUString::createFromAscii( pImplName ), + WPGImportFilter_createInstance, WPGImportFilter_getSupportedServiceNames() ) ); + + if (xFactory.is()) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } if ( pServiceManager && implName.equals(VisioImportFilter_getImplementationName()) ) { Reference< XSingleServiceFactory > xFactory( createSingleFactory( diff --git a/writerperfect/source/wpdimp/wpft_genericfilter.cxx b/writerperfect/source/wpdimp/wpft_genericfilter.cxx deleted file mode 100644 index 5e0f141efe64..000000000000 --- a/writerperfect/source/wpdimp/wpft_genericfilter.cxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* genericfilter: mostly generic code for registering the filter - * - * Portions of this code Copyright 2000 by Sun Microsystems, Inc. - * Rest is Copyright (C) 2002 William Lachance (wlach@interlog.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ -#include <stdio.h> - -#include <osl/mutex.hxx> -#include <osl/thread.h> -#include <cppuhelper/factory.hxx> -#include <com/sun/star/lang/XSingleServiceFactory.hpp> - -#include "WordPerfectImportFilter.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" -{ - SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpft_component_getFactory( - const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ ) - { - void *pRet = 0; - - OUString implName = OUString::createFromAscii( pImplName ); - if ( pServiceManager && implName.equals(WordPerfectImportFilter_getImplementationName()) ) - { - Reference< XSingleServiceFactory > xFactory( createSingleFactory( - reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), - OUString::createFromAscii( pImplName ), - WordPerfectImportFilter_createInstance, WordPerfectImportFilter_getSupportedServiceNames() ) ); - - if (xFactory.is()) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - - return pRet; - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx b/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx deleted file mode 100644 index 22e99d89f7f9..000000000000 --- a/writerperfect/source/wpgimp/wpgimport_genericfilter.cxx +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* genericfilter: mostly generic code for registering the filter - * - * Portions of this code Copyright 2000 by Sun Microsystems, Inc. - * Rest is Copyright (C) 2002 William Lachance (wlach@interlog.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ -#include <stdio.h> - -#include <osl/mutex.hxx> -#include <osl/thread.h> -#include <cppuhelper/factory.hxx> - -#include <com/sun/star/lang/XSingleServiceFactory.hpp> - -#include "WPGImportFilter.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" -{ - SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpgfilter_component_getFactory( - const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ ) - { - void *pRet = 0; - - OUString implName = OUString::createFromAscii( pImplName ); - if ( pServiceManager && implName.equals(WPGImportFilter_getImplementationName()) ) - { - Reference< XSingleServiceFactory > xFactory( createSingleFactory( - reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), - OUString::createFromAscii( pImplName ), - WPGImportFilter_createInstance, WPGImportFilter_getSupportedServiceNames() ) ); - - if (xFactory.is()) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - - return pRet; - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerperfect/source/wpsimp/msworks_genericfilter.cxx b/writerperfect/source/wpsimp/msworks_genericfilter.cxx deleted file mode 100644 index ae9c701548c0..000000000000 --- a/writerperfect/source/wpsimp/msworks_genericfilter.cxx +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* genericfilter: mostly generic code for registering the filter - * - * Portions of this code Copyright 2000 by Sun Microsystems, Inc. - * Rest is Copyright (C) 2002 William Lachance (wlach@interlog.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ -#include <stdio.h> - -#include <osl/mutex.hxx> -#include <osl/thread.h> -#include <cppuhelper/factory.hxx> - -#include <com/sun/star/lang/XSingleServiceFactory.hpp> - -#include "MSWorksImportFilter.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" -{ - SAL_DLLPUBLIC_EXPORT void *SAL_CALL msworksfilter_component_getFactory( - const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ ) - { - void *pRet = 0; - - OUString implName = OUString::createFromAscii( pImplName ); - if ( pServiceManager && implName.equals(MSWorksImportFilter_getImplementationName()) ) - { - Reference< XSingleServiceFactory > xFactory( createSingleFactory( - reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), - OUString::createFromAscii( pImplName ), - MSWorksImportFilter_createInstance, MSWorksImportFilter_getSupportedServiceNames() ) ); - - if (xFactory.is()) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - - return pRet; - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx index 2cca078c7561..2cca078c7561 100644 --- a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx +++ b/writerperfect/source/writer/MSWorksImportFilter.cxx diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx index 6ef54858dac4..6ef54858dac4 100644 --- a/writerperfect/source/wpsimp/MSWorksImportFilter.hxx +++ b/writerperfect/source/writer/MSWorksImportFilter.hxx diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx index f98d65e4b520..f98d65e4b520 100644 --- a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx index 777be1d21577..777be1d21577 100644 --- a/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.hxx diff --git a/writerperfect/source/cdrimp/cdrimport_genericfilter.cxx b/writerperfect/source/writer/wpftwriter_genericfilter.cxx index 56126105048f..75f53f3969b0 100644 --- a/writerperfect/source/cdrimp/cdrimport_genericfilter.cxx +++ b/writerperfect/source/writer/wpftwriter_genericfilter.cxx @@ -28,11 +28,10 @@ #include <osl/mutex.hxx> #include <osl/thread.h> #include <cppuhelper/factory.hxx> - #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include "CDRImportFilter.hxx" -#include "CMXImportFilter.hxx" +#include "WordPerfectImportFilter.hxx" +#include "MSWorksImportFilter.hxx" using namespace ::rtl; using namespace ::cppu; @@ -42,18 +41,18 @@ using namespace ::com::sun::star::registry; extern "C" { - SAL_DLLPUBLIC_EXPORT void *SAL_CALL cdrfilter_component_getFactory( + SAL_DLLPUBLIC_EXPORT void *SAL_CALL wpftwriter_component_getFactory( const sal_Char *pImplName, void *pServiceManager, void * /* pRegistryKey */ ) { void *pRet = 0; OUString implName = OUString::createFromAscii( pImplName ); - if ( pServiceManager && implName.equals(CDRImportFilter_getImplementationName()) ) + if ( pServiceManager && implName.equals(WordPerfectImportFilter_getImplementationName()) ) { Reference< XSingleServiceFactory > xFactory( createSingleFactory( reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), OUString::createFromAscii( pImplName ), - CDRImportFilter_createInstance, CDRImportFilter_getSupportedServiceNames() ) ); + WordPerfectImportFilter_createInstance, WordPerfectImportFilter_getSupportedServiceNames() ) ); if (xFactory.is()) { @@ -61,12 +60,12 @@ extern "C" pRet = xFactory.get(); } } - if ( pServiceManager && implName.equals(CMXImportFilter_getImplementationName()) ) + if ( pServiceManager && implName.equals(MSWorksImportFilter_getImplementationName()) ) { Reference< XSingleServiceFactory > xFactory( createSingleFactory( reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), OUString::createFromAscii( pImplName ), - CMXImportFilter_createInstance, CMXImportFilter_getSupportedServiceNames() ) ); + MSWorksImportFilter_createInstance, MSWorksImportFilter_getSupportedServiceNames() ) ); if (xFactory.is()) { diff --git a/writerperfect/util/msworksfilter.component b/writerperfect/util/msworksfilter.component deleted file mode 100644 index 8fc2120a7f02..000000000000 --- a/writerperfect/util/msworksfilter.component +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<component loader="com.sun.star.loader.SharedLibrary" prefix="msworksfilter" - 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/visiofilter.component b/writerperfect/util/visiofilter.component deleted file mode 100644 index a1842d992603..000000000000 --- a/writerperfect/util/visiofilter.component +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<component loader="com.sun.star.loader.SharedLibrary" prefix="visiofilter" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.Draw.VisioImportFilter"> - <service name="com.sun.star.document.ImportFilter"/> - <service name="com.sun.star.document.ExtendedTypeDetection"/> - </implementation> -</component> diff --git a/writerperfect/util/cdrfilter.component b/writerperfect/util/wpftdraw.component index 902bf9a87123..a8a262467231 100644 --- a/writerperfect/util/cdrfilter.component +++ b/writerperfect/util/wpftdraw.component @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<component loader="com.sun.star.loader.SharedLibrary" prefix="cdrfilter" +<component loader="com.sun.star.loader.SharedLibrary" prefix="wpftdraw" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.Draw.CDRImportFilter"> <service name="com.sun.star.document.ImportFilter"/> @@ -9,4 +9,12 @@ <service name="com.sun.star.document.ImportFilter"/> <service name="com.sun.star.document.ExtendedTypeDetection"/> </implementation> + <implementation name="com.sun.star.comp.Draw.VisioImportFilter"> + <service name="com.sun.star.document.ImportFilter"/> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> + <implementation name="com.sun.star.comp.Draw.WPGImportFilter"> + <service name="com.sun.star.document.ImportFilter"/> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> </component> diff --git a/writerperfect/util/wpft.component b/writerperfect/util/wpftwriter.component index 57cb3a429ff0..d6a0f042dd48 100644 --- a/writerperfect/util/wpft.component +++ b/writerperfect/util/wpftwriter.component @@ -26,8 +26,12 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" prefix="wpft" +<component loader="com.sun.star.loader.SharedLibrary" prefix="wpftwriter" 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> <implementation name="com.sun.star.comp.Writer.WordPerfectImportFilter"> <service name="com.sun.star.document.ExtendedTypeDetection"/> <service name="com.sun.star.document.ImportFilter"/> diff --git a/writerperfect/util/wpgfilter.component b/writerperfect/util/wpgfilter.component deleted file mode 100644 index 236d98ed683f..000000000000 --- a/writerperfect/util/wpgfilter.component +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<component loader="com.sun.star.loader.SharedLibrary" prefix="wpgfilter" - 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> |