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/source | |
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/source')
-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 |
17 files changed, 50 insertions, 222 deletions
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()) { |