summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-18 09:34:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-18 09:47:57 +0100
commit8773d9695845913bea8c969309d95e6cb585328e (patch)
tree6734d32fd7037b0414b889b4ce061031834455da /lotuswordpro
parent1de199cdcb17cba7e39dd5411c6e5048a0571600 (diff)
callcatcher: update unused code
Change-Id: Ia88d83a209113fa4c351c0300d407da0c71baeac
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpfilter.cxx151
-rw-r--r--lotuswordpro/source/filter/lwpfilter.hxx45
2 files changed, 0 insertions, 196 deletions
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index c316cc750c8d..edf53d5aec92 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -130,157 +130,6 @@ void LWPFilterReader::cancel() throw (com::sun::star::uno::RuntimeException, std
{
}
-LWPFilterImportFilter::LWPFilterImportFilter( const uno::Reference< XMultiServiceFactory >& xFact )
-{
- try
- {
- uno::Reference< XDocumentHandler > xDoc( xFact->createInstance( OUString( STR_WRITER_IMPORTER_NAME ) ), UNO_QUERY );
-
- LWPFilterReader *p = new LWPFilterReader;
- p->setDocumentHandler( xDoc );
-
- uno::Reference< XImporter > xImporter = uno::Reference< XImporter >( xDoc, UNO_QUERY );
- rImporter = xImporter;
- uno::Reference< XFilter > xFilter = uno::Reference< XFilter >( p );
- rFilter = xFilter;
- }
- catch( Exception & )
- {
- exit( 1 );
- }
-}
-
-LWPFilterImportFilter::~LWPFilterImportFilter()
-{
-}
-
-sal_Bool LWPFilterImportFilter::filter( const Sequence< PropertyValue >& aDescriptor )
- throw( RuntimeException, std::exception )
-{
- sal_Bool ret = rFilter->filter( aDescriptor );
-
- return ret;
-}
-
-void LWPFilterImportFilter::cancel() throw (::com::sun::star::uno::RuntimeException, std::exception)
-{
- rFilter->cancel();
-}
-
-void LWPFilterImportFilter::setTargetDocument( const uno::Reference< XComponent >& xDoc )
- throw( IllegalArgumentException, RuntimeException, std::exception )
-{
- rImporter->setTargetDocument( xDoc );
-}
-
-OUString LWPFilterImportFilter::getImplementationName() throw(std::exception)
-{
- return OUString( STR_IMPLEMENTATION_NAME );
-}
-
-sal_Bool LWPFilterImportFilter::supportsService( const OUString& ServiceName ) throw(std::exception)
-{
- return cppu::supportsService(this, ServiceName);
-}
-
-Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) throw(std::exception)
-{
- Sequence< OUString > seq(1);
- seq[0] = STR_SERVICE_NAME;
- return seq;
-}
-
-OUString SAL_CALL LWPFilterImportFilter::detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException, std::exception)
-{
- OUString ret;
- OUString aTypeName; // a name describing the type (from MediaDescriptor, usually from flat detection)
- // opening as template is done when a parameter tells to do so and a template filter can be detected
- // (otherwise no valid filter would be found) or if the detected filter is a template filter and
- // there is no parameter that forbids to open as template
- sal_Bool bOpenAsTemplate = sal_False;
- sal_Int32 nPropertyCount = aDescriptor.getLength();
- for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
- {
- if ( aDescriptor[nProperty].Name == "TypeName" )
- {
- aDescriptor[nProperty].Value >>= aTypeName;
- }
- else if ( aDescriptor[nProperty].Name == "AsTemplate" )
- {
- bOpenAsTemplate = sal_True;
- }
- }
-
- for( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ )
- {
- OUString strTemp;
- aDescriptor[i].Value >>= strTemp;
- if ( aDescriptor[i].Name == "InputStream" )
- {
- uno::Reference< XInputStream> rInputStream;
- aDescriptor[i].Value >>= rInputStream;
-
- // TODO TRANSFORM IMPLEMENTATION HERE!!!!!!
- // and call m_DocumentHandler's SAX mDochods
-
- if( IsWordproFile(rInputStream) )
- {
- if ( aTypeName == "wordpro_template" )
- {
- if(!bOpenAsTemplate)
- {
- aDescriptor.realloc( nPropertyCount + 1 );
- aDescriptor[nPropertyCount].Name = "AsTemplate";
- aDescriptor[nPropertyCount].Value <<= sal_True;
- }
- return OUString("wordpro_template");
- }
- else
- {
- return OUString("wordpro");
- }
- }
- return ret;
- }
- else if ( aDescriptor[i].Name == "URL" )
- {
- OUString sURL;
-
- aDescriptor[i].Value >>= sURL;
- /*
- osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL( sURL, sFileName );
- if(rc != osl::FileBase::E_None)
- {
- SAXException except;
- except.Message = "GDocting system path from URL failed!";
- throw except;
- }
- */
- //end with .lwp:
- if( IsWordproFile(sURL) )
- {
- if ( aTypeName == "wordpro_template" )
- {
- if(!bOpenAsTemplate)
- {
- aDescriptor.realloc( nPropertyCount + 1 );
- aDescriptor[nPropertyCount].Name = "AsTemplate";
- aDescriptor[nPropertyCount].Value <<= sal_True;
- }
- return OUString("wordpro_template");
- }
- else
- {
- return OUString("wordpro");
- }
- }
- return ret;
- }
- }
- return ret;
-}
-
/**
* @descr decompressed small file
* @param pCompressed - real file stream
diff --git a/lotuswordpro/source/filter/lwpfilter.hxx b/lotuswordpro/source/filter/lwpfilter.hxx
index 06b73574dd99..b41fdc671657 100644
--- a/lotuswordpro/source/filter/lwpfilter.hxx
+++ b/lotuswordpro/source/filter/lwpfilter.hxx
@@ -123,51 +123,6 @@ private:
uno::Reference< XDocumentHandler > m_DocumentHandler;
};
-/**
- * @brief
- * Main entry for the xml filter framework.
- * It's called by SfxObjectShell::ImportFrom.
- */
-class LWPFilterImportFilter : public WeakImplHelper4< XFilter, XImporter, XServiceInfo, XExtendedFilterDetection >
-{
-public:
- LWPFilterImportFilter( const uno::Reference< XMultiServiceFactory >& xFact );
- virtual ~LWPFilterImportFilter();
-
-public:
- /**
- * @descr see LWPFilterReader::filter.
- */
- virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& aDescriptor )
- throw( RuntimeException, std::exception ) SAL_OVERRIDE;
-
- /**
- * @descr see LWPFilterReader::cancel.
- */
- virtual void SAL_CALL cancel() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
- // XImporter
- virtual void SAL_CALL setTargetDocument( const uno::Reference< XComponent >& xDoc)
- throw( IllegalArgumentException, RuntimeException, std::exception ) SAL_OVERRIDE;
-
- // XServiceInfo
- OUString SAL_CALL getImplementationName() throw (std::exception) SAL_OVERRIDE;
-
- Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw (std::exception) SAL_OVERRIDE;
-
- sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (std::exception) SAL_OVERRIDE;
-
- /**
- * @descr function of interface XExtendedFilterDetection. If this interface is registered, it will be called whenever
- * a file is to be loaded.
- */
- virtual OUString SAL_CALL detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Descriptor ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-public:
- uno::Reference< XFilter > rFilter;
- uno::Reference< XImporter > rImporter;
-};
-
//test code
int ReadWordproFile(SvStream &rStream, uno::Reference<XDocumentHandler>& XDoc);