summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-04-19 11:02:31 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-04-19 11:03:18 +0200
commit858c8620d910055dcf37f1d82599e768da641e56 (patch)
tree86e1c1ce503f39438145aea0e3b95870e77c96c0 /writerperfect
parentc39d96a8e986c85259d01884762bd135fa0d0f5b (diff)
Stub CMX importer
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/Library_cdrimport.mk1
-rw-r--r--writerperfect/source/cdrimp/CDRImportFilter.cxx1
-rw-r--r--writerperfect/source/cdrimp/CDRImportFilter.hxx13
-rw-r--r--writerperfect/source/cdrimp/CMXImportFilter.cxx276
-rw-r--r--writerperfect/source/cdrimp/CMXImportFilter.hxx110
-rw-r--r--writerperfect/source/cdrimp/cdrimport_genericfilter.cxx14
-rw-r--r--writerperfect/source/vsdimp/VisioImportFilter.cxx1
-rw-r--r--writerperfect/source/vsdimp/VisioImportFilter.hxx4
-rw-r--r--writerperfect/source/wpdimp/WordPerfectImportFilter.cxx1
-rw-r--r--writerperfect/source/wpdimp/WordPerfectImportFilter.hxx4
-rw-r--r--writerperfect/source/wpgimp/WPGImportFilter.cxx1
-rw-r--r--writerperfect/source/wpgimp/WPGImportFilter.hxx4
-rw-r--r--writerperfect/source/wpsimp/MSWorksImportFilter.cxx1
-rw-r--r--writerperfect/source/wpsimp/MSWorksImportFilter.hxx8
14 files changed, 407 insertions, 32 deletions
diff --git a/writerperfect/Library_cdrimport.mk b/writerperfect/Library_cdrimport.mk
index a6b05b03d557..257757c32888 100644
--- a/writerperfect/Library_cdrimport.mk
+++ b/writerperfect/Library_cdrimport.mk
@@ -65,6 +65,7 @@ $(eval $(call gb_Library_use_externals,cdrimport,\
$(eval $(call gb_Library_add_exception_objects,cdrimport,\
writerperfect/source/cdrimp/CDRImportFilter \
+ writerperfect/source/cdrimp/CMXImportFilter \
writerperfect/source/cdrimp/cdrimport_genericfilter \
))
diff --git a/writerperfect/source/cdrimp/CDRImportFilter.cxx b/writerperfect/source/cdrimp/CDRImportFilter.cxx
index 91876898b974..2476a5567476 100644
--- a/writerperfect/source/cdrimp/CDRImportFilter.cxx
+++ b/writerperfect/source/cdrimp/CDRImportFilter.cxx
@@ -139,7 +139,6 @@ throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
#ifdef DEBUG
std::cerr << "CDRImportFilter::setTargetDocument" << std::endl;
#endif
- meType = FILTER_IMPORT;
mxDoc = xDoc;
}
diff --git a/writerperfect/source/cdrimp/CDRImportFilter.hxx b/writerperfect/source/cdrimp/CDRImportFilter.hxx
index 8f52805d4138..56f124ea8ebe 100644
--- a/writerperfect/source/cdrimp/CDRImportFilter.hxx
+++ b/writerperfect/source/cdrimp/CDRImportFilter.hxx
@@ -27,8 +27,8 @@
/* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited."
*/
-#ifndef _VISIOIMPORTFILTER_HXX
-#define _VISIOIMPORTFILTER_HXX
+#ifndef _CDRIMPORTFILTER_HXX
+#define _CDRIMPORTFILTER_HXX
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
@@ -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 */
@@ -64,11 +59,9 @@ protected:
::rtl::OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
- FilterType meType;
-
public:
CDRImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ), meType((FilterType)0) {}
+ : mxMSF( rxMSF ) {}
virtual ~CDRImportFilter() {}
// XFilter
diff --git a/writerperfect/source/cdrimp/CMXImportFilter.cxx b/writerperfect/source/cdrimp/CMXImportFilter.cxx
new file mode 100644
index 000000000000..76a9d06431a6
--- /dev/null
+++ b/writerperfect/source/cdrimp/CMXImportFilter.cxx
@@ -0,0 +1,276 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* CMXImportFilter: Sets up the filter, and calls OdgExporter
+ * to do the actual filtering
+ *
+ * Copyright (C) 2000 by Sun Microsystems, Inc.
+ * Copyright (C) 2002-2004 William Lachance (wlach@interlog.com)
+ * Copyright (C) 2004 Net Integration Technologies (http://www.net-itech.com)
+ * Copyright (C) 2004-2006 Fridrich Strba <fridrich.strba@bluewin.ch>
+ *
+ * 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.
+ *
+ * Contributor(s): Martin Gallwey (gallwey@sun.com)
+ *
+ */
+
+/* "This product is not manufactured, approved, or supported by
+ * Corel Corporation or Corel Corporation Limited."
+ */
+
+#include <osl/diagnose.h>
+#include <rtl/tencinfo.h>
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/InputSource.hpp>
+#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/uno/Reference.h>
+
+#include <xmloff/attrlist.hxx>
+
+#include <libcdr/libcdr.h>
+#include "filter/DocumentHandler.hxx"
+#include "filter/OdgGenerator.hxx"
+#include "CMXImportFilter.hxx"
+#include "stream/WPXSvStream.h"
+
+#include <iostream>
+
+using namespace ::com::sun::star::uno;
+using com::sun::star::uno::Reference;
+using com::sun::star::io::XInputStream;
+using com::sun::star::io::XSeekable;
+using com::sun::star::uno::Sequence;
+using namespace ::rtl;
+using rtl::OString;
+using rtl::OUString;
+using com::sun::star::uno::Sequence;
+using com::sun::star::uno::Reference;
+using com::sun::star::uno::Any;
+using com::sun::star::uno::UNO_QUERY;
+using com::sun::star::uno::XInterface;
+using com::sun::star::uno::Exception;
+using com::sun::star::uno::RuntimeException;
+using com::sun::star::lang::XMultiServiceFactory;
+using com::sun::star::beans::PropertyValue;
+using com::sun::star::document::XFilter;
+using com::sun::star::document::XExtendedFilterDetection;
+
+using com::sun::star::io::XInputStream;
+using com::sun::star::document::XImporter;
+using com::sun::star::xml::sax::InputSource;
+using com::sun::star::xml::sax::XAttributeList;
+using com::sun::star::xml::sax::XDocumentHandler;
+using com::sun::star::xml::sax::XParser;
+
+
+sal_Bool SAL_CALL CMXImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::filter" << std::endl;
+#endif
+ sal_Int32 nLength = aDescriptor.getLength();
+ const PropertyValue *pValue = aDescriptor.getConstArray();
+ OUString sURL;
+ Reference < XInputStream > xInputStream;
+ for ( sal_Int32 i = 0 ; i < nLength; i++)
+ {
+ if ( pValue[i].Name == "InputStream" )
+ pValue[i].Value >>= xInputStream;
+ else if ( pValue[i].Name == "URL" )
+ pValue[i].Value >>= sURL;
+ }
+ if ( !xInputStream.is() )
+ {
+ OSL_ASSERT( 0 );
+ return sal_False;
+ }
+ OString sFileName;
+ sFileName = OUStringToOString(sURL, RTL_TEXTENCODING_INFO_ASCII);
+
+ // An XML import service: what we push sax messages to..
+ OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Draw.XMLOasisImporter" ) );
+ Reference < XDocumentHandler > xInternalHandler( mxMSF->createInstance( sXMLImportService ), UNO_QUERY );
+
+ // The XImporter sets up an empty target document for XDocumentHandler to write to..
+ Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
+ xImporter->setTargetDocument( mxDoc );
+
+ // OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
+ // writes to in-memory target doc
+ DocumentHandler xHandler(xInternalHandler);
+
+ WPXSvInputStream input( xInputStream );
+
+ OdgGenerator exporter(&xHandler, ODF_FLAT_XML);
+ bool tmpParseResult = libcdr::CMXDocument::parse(&input, &exporter);
+ return tmpParseResult;
+}
+
+void SAL_CALL CMXImportFilter::cancel( )
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::cancel" << std::endl;
+#endif
+}
+
+// XImporter
+void SAL_CALL CMXImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
+throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::setTargetDocument" << std::endl;
+#endif
+ mxDoc = xDoc;
+}
+
+// XExtendedFilterDetection
+OUString SAL_CALL CMXImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
+throw( com::sun::star::uno::RuntimeException )
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::detect" << std::endl;
+#endif
+ OUString sTypeName;
+ sal_Int32 nLength = Descriptor.getLength();
+ sal_Int32 location = nLength;
+ const PropertyValue *pValue = Descriptor.getConstArray();
+ Reference < XInputStream > xInputStream;
+ for ( sal_Int32 i = 0 ; i < nLength; i++)
+ {
+ if ( pValue[i].Name == "TypeName" )
+ location=i;
+ else if ( pValue[i].Name == "InputStream" )
+ pValue[i].Value >>= xInputStream;
+ }
+
+ WPXSvInputStream input( xInputStream );
+
+ if (libcdr::CMXDocument::isSupported(&input))
+ sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "draw_CorelDraw_Document" ) );
+
+ if (sTypeName.getLength())
+ {
+ if ( location == Descriptor.getLength() )
+ {
+ Descriptor.realloc(nLength+1);
+ Descriptor[location].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName"));
+ }
+
+ Descriptor[location].Value <<=sTypeName;
+ }
+ return sTypeName;
+}
+
+
+// XInitialization
+void SAL_CALL CMXImportFilter::initialize( const Sequence< Any >& aArguments )
+throw (Exception, RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::initialize" << std::endl;
+#endif
+ Sequence < PropertyValue > aAnySeq;
+ sal_Int32 nLength = aArguments.getLength();
+ if ( nLength && ( aArguments[0] >>= aAnySeq ) )
+ {
+ const PropertyValue *pValue = aAnySeq.getConstArray();
+ nLength = aAnySeq.getLength();
+ for ( sal_Int32 i = 0 ; i < nLength; i++)
+ {
+ if ( pValue[i].Name == "Type" )
+ {
+ pValue[i].Value >>= msFilterName;
+ break;
+ }
+ }
+ }
+}
+OUString CMXImportFilter_getImplementationName ()
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter_getImplementationName" << std::endl;
+#endif
+ return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Draw.CMXImportFilter" ) );
+}
+
+#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
+#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
+sal_Bool SAL_CALL CMXImportFilter_supportsService( const OUString &ServiceName )
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter_supportsService" << std::endl;
+#endif
+ return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
+}
+Sequence< OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames( )
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter_getSupportedServiceNames" << std::endl;
+#endif
+ Sequence < OUString > aRet(2);
+ OUString *pArray = aRet.getArray();
+ pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
+ pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
+ return aRet;
+}
+#undef SERVICE_NAME2
+#undef SERVICE_NAME1
+
+Reference< XInterface > SAL_CALL CMXImportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
+throw( Exception )
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter_createInstance" << std::endl;
+#endif
+ return (cppu::OWeakObject *) new CMXImportFilter( rSMgr );
+}
+
+// XServiceInfo
+OUString SAL_CALL CMXImportFilter::getImplementationName( )
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::getImplementationName" << std::endl;
+#endif
+ return CMXImportFilter_getImplementationName();
+}
+sal_Bool SAL_CALL CMXImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::supportsService" << std::endl;
+#endif
+ return CMXImportFilter_supportsService( rServiceName );
+}
+Sequence< OUString > SAL_CALL CMXImportFilter::getSupportedServiceNames( )
+throw (RuntimeException)
+{
+#ifdef DEBUG
+ std::cerr << "CMXImportFilter::getSupportedServiceNames" << std::endl;
+#endif
+ return CMXImportFilter_getSupportedServiceNames();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/cdrimp/CMXImportFilter.hxx b/writerperfect/source/cdrimp/CMXImportFilter.hxx
new file mode 100644
index 000000000000..a9ec8f430ec5
--- /dev/null
+++ b/writerperfect/source/cdrimp/CMXImportFilter.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Copyright (C) 2000 by Sun Microsystems, Inc.
+ * Copyright (C) 2002-2004 William Lachance (wlach@interlog.com)
+ * Copyright (C) 2004 Net Integration Technologies (http://www.net-itech.com)
+ * Copyright (C) 2004 Fridrich Strba <fridrich.strba@bluewin.ch>
+ *
+ * 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.
+ *
+ * Contributor(s): Martin Gallwey (gallwey@sun.com)
+ *
+ */
+
+/* "This product is not manufactured, approved, or supported by
+ * Corel Corporation or Corel Corporation Limited."
+ */
+#ifndef _CMXIMPORTFILTER_HXX
+#define _CMXIMPORTFILTER_HXX
+
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/document/XImporter.hpp>
+#include <com/sun/star/document/XExtendedFilterDetection.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <cppuhelper/implbase5.hxx>
+
+#include <stdio.h>
+
+/* This component will be instantiated for both import or export. Whether it calls
+ * setSourceDocument or setTargetDocument determines which Impl function the filter
+ * member calls */
+class CMXImportFilter : public cppu::WeakImplHelper5
+ <
+ com::sun::star::document::XFilter,
+ com::sun::star::document::XImporter,
+ com::sun::star::document::XExtendedFilterDetection,
+ com::sun::star::lang::XInitialization,
+ com::sun::star::lang::XServiceInfo
+ >
+{
+protected:
+ // oo.org declares
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
+ ::rtl::OUString msFilterName;
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
+
+public:
+ CMXImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
+ : mxMSF( rxMSF ) {}
+ virtual ~CMXImportFilter() {}
+
+ // XFilter
+ virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancel( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XImporter
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //XExtendedFilterDetection
+ virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
+ throw( com::sun::star::uno::RuntimeException );
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+::rtl::OUString CMXImportFilter_getImplementationName()
+throw ( ::com::sun::star::uno::RuntimeException );
+
+sal_Bool SAL_CALL CMXImportFilter_supportsService( const ::rtl::OUString &ServiceName )
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL CMXImportFilter_getSupportedServiceNames( )
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+SAL_CALL CMXImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
+throw ( ::com::sun::star::uno::Exception );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/cdrimp/cdrimport_genericfilter.cxx b/writerperfect/source/cdrimp/cdrimport_genericfilter.cxx
index dd13f38bbf0b..ced5137738dd 100644
--- a/writerperfect/source/cdrimp/cdrimport_genericfilter.cxx
+++ b/writerperfect/source/cdrimp/cdrimport_genericfilter.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include "CDRImportFilter.hxx"
+#include "CMXImportFilter.hxx"
using namespace ::rtl;
using namespace ::cppu;
@@ -60,6 +61,19 @@ extern "C"
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();
+ }
+ }
return pRet;
}
diff --git a/writerperfect/source/vsdimp/VisioImportFilter.cxx b/writerperfect/source/vsdimp/VisioImportFilter.cxx
index c06076c0ea16..13bf08922fa7 100644
--- a/writerperfect/source/vsdimp/VisioImportFilter.cxx
+++ b/writerperfect/source/vsdimp/VisioImportFilter.cxx
@@ -139,7 +139,6 @@ throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
#ifdef DEBUG
std::cerr << "VisioImportFilter::setTargetDocument" << std::endl;
#endif
- meType = FILTER_IMPORT;
mxDoc = xDoc;
}
diff --git a/writerperfect/source/vsdimp/VisioImportFilter.hxx b/writerperfect/source/vsdimp/VisioImportFilter.hxx
index aaeac49df69a..a4e7d7fbbd72 100644
--- a/writerperfect/source/vsdimp/VisioImportFilter.hxx
+++ b/writerperfect/source/vsdimp/VisioImportFilter.hxx
@@ -64,11 +64,9 @@ protected:
::rtl::OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
- FilterType meType;
-
public:
VisioImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ), meType((FilterType)0) {}
+ : mxMSF( rxMSF ) {}
virtual ~VisioImportFilter() {}
// XFilter
diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
index 2dab43a0e82d..f98d65e4b520 100644
--- a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
@@ -199,7 +199,6 @@ void SAL_CALL WordPerfectImportFilter::setTargetDocument( const uno::Reference<
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::getTargetDocument: Got here!\n"));
- meType = FILTER_IMPORT;
mxDoc = xDoc;
}
diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx
index 7ad56934f017..777be1d21577 100644
--- a/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx
+++ b/writerperfect/source/wpdimp/WordPerfectImportFilter.hxx
@@ -66,14 +66,12 @@ protected:
::rtl::OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
- FilterType meType;
-
sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (::com::sun::star::uno::RuntimeException);
public:
WordPerfectImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ), meType((FilterType)0) {}
+ : mxMSF( rxMSF ) {}
virtual ~WordPerfectImportFilter() {}
// XFilter
diff --git a/writerperfect/source/wpgimp/WPGImportFilter.cxx b/writerperfect/source/wpgimp/WPGImportFilter.cxx
index 5ce55996141f..ff7612b1e433 100644
--- a/writerperfect/source/wpgimp/WPGImportFilter.cxx
+++ b/writerperfect/source/wpgimp/WPGImportFilter.cxx
@@ -138,7 +138,6 @@ throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
#ifdef DEBUG
std::cerr << "WPGImportFilter::setTargetDocument" << std::endl;
#endif
- meType = FILTER_IMPORT;
mxDoc = xDoc;
}
diff --git a/writerperfect/source/wpgimp/WPGImportFilter.hxx b/writerperfect/source/wpgimp/WPGImportFilter.hxx
index 43731324748c..03fb1231d29f 100644
--- a/writerperfect/source/wpgimp/WPGImportFilter.hxx
+++ b/writerperfect/source/wpgimp/WPGImportFilter.hxx
@@ -64,11 +64,9 @@ protected:
::rtl::OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
- FilterType meType;
-
public:
WPGImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ), meType((FilterType)0) {}
+ : mxMSF( rxMSF ) {}
virtual ~WPGImportFilter() {}
// XFilter
diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx b/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
index cb9b0561e05c..2cca078c7561 100644
--- a/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
+++ b/writerperfect/source/wpsimp/MSWorksImportFilter.cxx
@@ -137,7 +137,6 @@ void SAL_CALL MSWorksImportFilter::setTargetDocument( const Reference< ::com::su
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::getTargetDocument: Got here!\n"));
- meType = FILTER_IMPORT;
mxDoc = xDoc;
}
diff --git a/writerperfect/source/wpsimp/MSWorksImportFilter.hxx b/writerperfect/source/wpsimp/MSWorksImportFilter.hxx
index b75f6695ee4a..6ef54858dac4 100644
--- a/writerperfect/source/wpsimp/MSWorksImportFilter.hxx
+++ b/writerperfect/source/wpsimp/MSWorksImportFilter.hxx
@@ -38,11 +38,6 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <cppuhelper/implbase5.hxx>
-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 */
@@ -62,15 +57,12 @@ protected:
::rtl::OUString msFilterName;
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
- FilterType meType;
-
sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (::com::sun::star::uno::RuntimeException);
public:
MSWorksImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
: mxMSF( rxMSF )
- , meType( FILTER_IMPORT )
{}
virtual ~MSWorksImportFilter() {}