diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpfilter.cxx | 34 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfilter.hxx | 37 |
2 files changed, 0 insertions, 71 deletions
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx index 010ac9fa73fc..30ca558c1671 100644 --- a/lotuswordpro/source/filter/lwpfilter.cxx +++ b/lotuswordpro/source/filter/lwpfilter.cxx @@ -59,12 +59,9 @@ ************************************************************************/ #include "lwpfilter.hxx" #include "lwpresource.hxx" -//for sax stream #include "xfilter/xfsaxstream.hxx" -//for file parser #include "lwp9reader.hxx" #include "lwpsvstream.hxx" -//for container reset #include "xfilter/xffontfactory.hxx" #include "xfilter/xfstylemanager.hxx" @@ -80,7 +77,6 @@ #include <cppuhelper/supportsservice.hxx> -#include <tools/stream.hxx> #include <sfx2/docfile.hxx> #include <boost/scoped_ptr.hpp> @@ -97,36 +93,6 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star; using ::com::sun::star::uno::Sequence; -LWPFilterReader::LWPFilterReader() -{ -} - -LWPFilterReader::~LWPFilterReader() -{ -} - -sal_Bool LWPFilterReader::filter( const Sequence< PropertyValue >& aDescriptor ) - throw( RuntimeException, std::exception ) -{ - OUString sURL; - for( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ ) - { - //Note we should attempt to use "InputStream" if it exists first! - if ( aDescriptor[i].Name == "URL" ) - aDescriptor[i].Value >>= sURL; - } - - SvFileStream inputStream( sURL, STREAM_READ ); - if ( inputStream.IsEof() || ( inputStream.GetError() != SVSTREAM_OK ) ) - return sal_False; - - return (ReadWordproFile(inputStream, m_DocumentHandler) == 0); -} - -void LWPFilterReader::cancel() throw (com::sun::star::uno::RuntimeException, std::exception) -{ -} - /** * @descr decompressed small file * @param pCompressed - real file stream diff --git a/lotuswordpro/source/filter/lwpfilter.hxx b/lotuswordpro/source/filter/lwpfilter.hxx index 6f82a1d57455..54ca0cfcd700 100644 --- a/lotuswordpro/source/filter/lwpfilter.hxx +++ b/lotuswordpro/source/filter/lwpfilter.hxx @@ -86,43 +86,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; using namespace ::com::sun::star; -/** - * @brief - * Implements the XFilter interface. - * This is not the entry for the filter, but a proto of LwpFilterImportFilter. - */ -class LWPFilterReader : public WeakImplHelper1< XFilter > -{ -public: - LWPFilterReader(); - virtual ~LWPFilterReader(); - -public: - /** - * @descr loading the file. It's call be SfxObejctShell::ImportFrom. - * @param aDescriptor the parameters include file URL or XInputStream object, from which the filter can - * get which file to import. - */ - virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& aDescriptor ) - throw( RuntimeException, std::exception ) SAL_OVERRIDE; - - /** - * @descr stop loading the file. - */ - virtual void SAL_CALL cancel() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - /** - * @descr get the XDocumentHandler interface. - */ - void setDocumentHandler( uno::Reference< XDocumentHandler >& xHandler ) - { - m_DocumentHandler = xHandler; - } - -private: - uno::Reference< XDocumentHandler > m_DocumentHandler; -}; - //test code int ReadWordproFile(SvStream &rStream, uno::Reference<XDocumentHandler>& XDoc); |