From 9284c50f975ce91fcb50e3849bbe38af50dbcb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= Date: Thu, 19 Apr 2012 14:33:09 +0200 Subject: [PATCH] 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. --- Repository.mk | 7 +- postprocess/packcomponents/makefile.mk | 7 +- .../graphicfilter/file_graphicfilter.scp | 6 +- .../graphicfilter/module_graphicfilter.scp | 3 +- scp2/source/ooo/file_library_ooo.scp | 4 +- scp2/source/writer/module_writer.scp | 3 +- writerperfect/Library_msworks.mk | 69 ------------------- writerperfect/Library_visioimport.mk | 69 ------------------- ...brary_cdrimport.mk => Library_wpftdraw.mk} | 25 ++++--- ...{Library_wpft.mk => Library_wpftwriter.mk} | 22 +++--- writerperfect/Library_wpgimport.mk | 68 ------------------ writerperfect/Module_writerperfect.mk | 28 +++----- .../{cdrimp => draw}/CDRImportFilter.cxx | 0 .../{cdrimp => draw}/CDRImportFilter.hxx | 0 .../{cdrimp => draw}/CMXImportFilter.cxx | 0 .../{cdrimp => draw}/CMXImportFilter.hxx | 0 .../{vsdimp => draw}/VisioImportFilter.cxx | 0 .../{vsdimp => draw}/VisioImportFilter.hxx | 5 -- .../{wpgimp => draw}/WPGImportFilter.cxx | 0 .../{wpgimp => draw}/WPGImportFilter.hxx | 5 -- .../wpftdraw_genericfilter.cxx} | 44 +++++++++++- .../source/wpdimp/wpft_genericfilter.cxx | 67 ------------------ .../source/wpgimp/wpgimport_genericfilter.cxx | 68 ------------------ .../source/wpsimp/msworks_genericfilter.cxx | 68 ------------------ .../MSWorksImportFilter.cxx | 0 .../MSWorksImportFilter.hxx | 0 .../WordPerfectImportFilter.cxx | 0 .../WordPerfectImportFilter.hxx | 0 .../wpftwriter_genericfilter.cxx} | 15 ++-- writerperfect/util/msworksfilter.component | 8 --- writerperfect/util/visiofilter.component | 8 --- ...cdrfilter.component => wpftdraw.component} | 10 ++- .../{wpft.component => wpftwriter.component} | 6 +- writerperfect/util/wpgfilter.component | 8 --- 34 files changed, 107 insertions(+), 516 deletions(-) delete mode 100644 writerperfect/Library_msworks.mk delete mode 100644 writerperfect/Library_visioimport.mk rename writerperfect/{Library_cdrimport.mk => Library_wpftdraw.mk} (68%) rename writerperfect/{Library_wpft.mk => Library_wpftwriter.mk} (70%) delete mode 100644 writerperfect/Library_wpgimport.mk rename writerperfect/source/{cdrimp => draw}/CDRImportFilter.cxx (100%) rename writerperfect/source/{cdrimp => draw}/CDRImportFilter.hxx (100%) rename writerperfect/source/{cdrimp => draw}/CMXImportFilter.cxx (100%) rename writerperfect/source/{cdrimp => draw}/CMXImportFilter.hxx (100%) rename writerperfect/source/{vsdimp => draw}/VisioImportFilter.cxx (100%) rename writerperfect/source/{vsdimp => draw}/VisioImportFilter.hxx (98%) rename writerperfect/source/{wpgimp => draw}/WPGImportFilter.cxx (100%) rename writerperfect/source/{wpgimp => draw}/WPGImportFilter.hxx (98%) rename writerperfect/source/{vsdimp/visioimport_genericfilter.cxx => draw/wpftdraw_genericfilter.cxx} (55%) delete mode 100644 writerperfect/source/wpdimp/wpft_genericfilter.cxx delete mode 100644 writerperfect/source/wpgimp/wpgimport_genericfilter.cxx delete mode 100644 writerperfect/source/wpsimp/msworks_genericfilter.cxx rename writerperfect/source/{wpsimp => writer}/MSWorksImportFilter.cxx (100%) rename writerperfect/source/{wpsimp => writer}/MSWorksImportFilter.hxx (100%) rename writerperfect/source/{wpdimp => writer}/WordPerfectImportFilter.cxx (100%) rename writerperfect/source/{wpdimp => writer}/WordPerfectImportFilter.hxx (100%) rename writerperfect/source/{cdrimp/cdrimport_genericfilter.cxx => writer/wpftwriter_genericfilter.cxx} (81%) delete mode 100644 writerperfect/util/msworksfilter.component delete mode 100644 writerperfect/util/visiofilter.component rename writerperfect/util/{cdrfilter.component => wpftdraw.component} (51%) rename writerperfect/util/{wpft.component => wpftwriter.component} (87%) delete mode 100644 writerperfect/util/wpgfilter.component diff --git a/Repository.mk b/Repository.mk index 37a872cc34fb..fa759864070b 100644 --- a/Repository.mk +++ b/Repository.mk @@ -277,7 +277,6 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ merged \ msfilter \ msword \ - msworks \ odfflatxml \ offacc \ pcr \ @@ -338,10 +337,8 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ vclplug_kde \ vclplug_kde4 \ vclplug_svp \ - cdrimport \ - visioimport \ - wpft \ - wpgimport \ + wpftdraw \ + wpftwriter \ writerfilter \ xcr \ xmlfa \ diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index c8067e22ffae..b921281b5920 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -205,11 +205,8 @@ my_components += \ my_components += \ component/writerfilter/util/writerfilter \ - component/writerperfect/util/msworksfilter \ - component/writerperfect/util/visiofilter \ - component/writerperfect/util/wpft \ - component/writerperfect/util/wpgfilter \ - component/writerperfect/util/cdrfilter \ + component/writerperfect/util/wpftwriter \ + component/writerperfect/util/wpftdraw \ .ENDIF diff --git a/scp2/source/graphicfilter/file_graphicfilter.scp b/scp2/source/graphicfilter/file_graphicfilter.scp index 17761ded9054..ee58421a3d0f 100644 --- a/scp2/source/graphicfilter/file_graphicfilter.scp +++ b/scp2/source/graphicfilter/file_graphicfilter.scp @@ -38,8 +38,4 @@ STD_LIB_FILE( gid_File_Lib_Flash, flash ) STD_LIB_FILE( gid_File_Lib_Svg, svgfilter ) -STD_FILTER_FILE( gid_File_Lib_WPGImport, wpgimport ) - -STD_FILTER_FILE( gid_File_Lib_VisioImport, visioimport ) - -STD_FILTER_FILE( gid_File_Lib_CDRImport, cdrimport ) +STD_FILTER_FILE( gid_File_Lib_WpftDraw, wpftdraw ) diff --git a/scp2/source/graphicfilter/module_graphicfilter.scp b/scp2/source/graphicfilter/module_graphicfilter.scp index dd66724517a8..f428c0cf038e 100644 --- a/scp2/source/graphicfilter/module_graphicfilter.scp +++ b/scp2/source/graphicfilter/module_graphicfilter.scp @@ -33,7 +33,6 @@ Module gid_Module_Optional_Grfflt Sortkey = "600"; ParentID = gid_Module_Optional; Default = YES; - Files = (gid_File_Lib_Svg, gid_File_Lib_Flash, gid_File_Lib_WPGImport, - gid_File_Lib_VisioImport, gid_File_Lib_CDRImport, + Files = (gid_File_Lib_Svg, gid_File_Lib_Flash, gid_File_Lib_WpftDraw, gid_File_Share_Registry_Graphicfilter_Xcd); End diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 1f3b6056cee4..63b2f8f350d8 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -888,9 +888,7 @@ End #endif -STD_LIB_FILE(gid_File_Lib_Wpft,wpft) - -STD_LIB_FILE(gid_File_Lib_Msworks,msworks) +STD_LIB_FILE(gid_File_Lib_WpftWriter,wpftwriter) STD_LIB_FILE(gid_File_Lib_T602Filter,t602filter) diff --git a/scp2/source/writer/module_writer.scp b/scp2/source/writer/module_writer.scp index e66214bbc71c..33b9e449e072 100644 --- a/scp2/source/writer/module_writer.scp +++ b/scp2/source/writer/module_writer.scp @@ -48,8 +48,7 @@ Module gid_Module_Prg_Wrt_Bin gid_File_Lib_Swd, gid_File_Lib_Swui, gid_File_Lib_Msword, - gid_File_Lib_Wpft, - gid_File_Lib_Msworks, + gid_File_Lib_WpftWriter, gid_File_Lib_T602Filter, gid_File_Lib_Writerfilter, gid_File_Lib_Wlwp, 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 -# -# 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 -# -# 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 similarity index 68% rename from writerperfect/Library_cdrimport.mk rename to 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 similarity index 70% rename from writerperfect/Library_wpft.mk rename to 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 -# -# 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_LIBVISIO))$(filter LIBVISIO,$(BUILD_TYPE))) -$(eval $(call gb_Module_add_targets,writerperfect,\ - Library_visioimport \ -)) -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))) +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_wpgimport \ + Library_wpftdraw \ )) endif +endif +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 similarity index 100% rename from writerperfect/source/cdrimp/CDRImportFilter.cxx rename to writerperfect/source/draw/CDRImportFilter.cxx diff --git a/writerperfect/source/cdrimp/CDRImportFilter.hxx b/writerperfect/source/draw/CDRImportFilter.hxx similarity index 100% rename from writerperfect/source/cdrimp/CDRImportFilter.hxx rename to writerperfect/source/draw/CDRImportFilter.hxx diff --git a/writerperfect/source/cdrimp/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx similarity index 100% rename from writerperfect/source/cdrimp/CMXImportFilter.cxx rename to writerperfect/source/draw/CMXImportFilter.cxx diff --git a/writerperfect/source/cdrimp/CMXImportFilter.hxx b/writerperfect/source/draw/CMXImportFilter.hxx similarity index 100% rename from writerperfect/source/cdrimp/CMXImportFilter.hxx rename to writerperfect/source/draw/CMXImportFilter.hxx diff --git a/writerperfect/source/vsdimp/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx similarity index 100% rename from writerperfect/source/vsdimp/VisioImportFilter.cxx rename to writerperfect/source/draw/VisioImportFilter.cxx diff --git a/writerperfect/source/vsdimp/VisioImportFilter.hxx b/writerperfect/source/draw/VisioImportFilter.hxx similarity index 98% rename from writerperfect/source/vsdimp/VisioImportFilter.hxx rename to 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 -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 similarity index 100% rename from writerperfect/source/wpgimp/WPGImportFilter.cxx rename to writerperfect/source/draw/WPGImportFilter.cxx diff --git a/writerperfect/source/wpgimp/WPGImportFilter.hxx b/writerperfect/source/draw/WPGImportFilter.hxx similarity index 98% rename from writerperfect/source/wpgimp/WPGImportFilter.hxx rename to 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 -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 similarity index 55% rename from writerperfect/source/vsdimp/visioimport_genericfilter.cxx rename to 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 +#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 - -#include -#include -#include -#include - -#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 - -#include -#include -#include - -#include - -#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 - -#include -#include -#include - -#include - -#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 similarity index 100% rename from writerperfect/source/wpsimp/MSWorksImportFilter.cxx rename to writerperfect/source/writer/MSWorksImportFilter.cxx diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx similarity index 100% rename from writerperfect/source/wpsimp/MSWorksImportFilter.hxx rename to writerperfect/source/writer/MSWorksImportFilter.hxx diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx similarity index 100% rename from writerperfect/source/wpdimp/WordPerfectImportFilter.cxx rename to writerperfect/source/writer/WordPerfectImportFilter.cxx diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx similarity index 100% rename from writerperfect/source/wpdimp/WordPerfectImportFilter.hxx rename to writerperfect/source/writer/WordPerfectImportFilter.hxx diff --git a/writerperfect/source/cdrimp/cdrimport_genericfilter.cxx b/writerperfect/source/writer/wpftwriter_genericfilter.cxx similarity index 81% rename from writerperfect/source/cdrimp/cdrimport_genericfilter.cxx rename to 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 #include #include - #include -#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 @@ - - - - - - - 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 @@ - - - - - - - diff --git a/writerperfect/util/cdrfilter.component b/writerperfect/util/wpftdraw.component similarity index 51% rename from writerperfect/util/cdrfilter.component rename to writerperfect/util/wpftdraw.component index 902bf9a87123..a8a262467231 100644 --- a/writerperfect/util/cdrfilter.component +++ b/writerperfect/util/wpftdraw.component @@ -1,5 +1,5 @@ - @@ -9,4 +9,12 @@ + + + + + + + + diff --git a/writerperfect/util/wpft.component b/writerperfect/util/wpftwriter.component similarity index 87% rename from writerperfect/util/wpft.component rename to writerperfect/util/wpftwriter.component index 57cb3a429ff0..d6a0f042dd48 100644 --- a/writerperfect/util/wpft.component +++ b/writerperfect/util/wpftwriter.component @@ -26,8 +26,12 @@ * **********************************************************************--> - + + + + 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 @@ - - - - - - -