diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-27 12:25:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-27 13:04:18 +0200 |
commit | 5944eba64a8679cb6db7b54709169175d82224de (patch) | |
tree | 78cc764c3b6eab1c9faff940ca3a717ba7f83bba /writerfilter | |
parent | use textframes for importing RTF_DPTXBX (diff) | |
download | core-5944eba64a8679cb6db7b54709169175d82224de.tar.gz core-5944eba64a8679cb6db7b54709169175d82224de.zip |
writerfilter: make it easy to debug the old RTF filter
Change-Id: Ifc1d6b78f55e7f202f5cc391f1401de5b65ed395
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/filter/RtfFilter.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index f80d1b064069..27373a44de79 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -103,6 +103,18 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescri uno::Reference<frame::XFrame> xFrame = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_FRAME(), uno::Reference<frame::XFrame>()); +#ifdef DBG_OLDFILTER + uno::Reference< lang::XMultiServiceFactory > xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW); + uno::Reference< uno::XInterface > xIfc( xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.RtfImport" ))), uno::UNO_QUERY_THROW); + if (!xIfc.is()) + return sal_False; + uno::Reference< document::XImporter > xImprtr(xIfc, uno::UNO_QUERY_THROW); + uno::Reference< document::XFilter > xFltr(xIfc, uno::UNO_QUERY_THROW); + if (!xImprtr.is() || !xFltr.is()) + return sal_False; + xImprtr->setTargetDocument(m_xDstDoc); + bResult = xFltr->filter(aDescriptor); +#else xStatusIndicator = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_STATUSINDICATOR(), uno::Reference<task::XStatusIndicator>()); @@ -115,6 +127,7 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescri #ifdef DEBUG_IMPORT dmapperLogger->endDocument(); #endif +#endif sal_uInt32 nEndTime = osl_getGlobalTimer(); SAL_INFO("writerfilter.profile", OSL_THIS_FUNC << " finished in " << nEndTime - nStartTime << " ms"); } |