diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-19 09:23:42 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-19 09:23:42 +0200 |
commit | 8396bffef734a543ee81a742d6d4ac8ed03d046a (patch) | |
tree | a05767e52f735befe97320ecded1fb92e482c04f | |
parent | 30cc03733bdac1a0057c521834de9226773e2ac9 (diff) |
writerfilter: dmapper ctor can read TextInsertModeRange directly
Change-Id: If17ae09266134b4bc410eab1a1b2f5139ba93a12
-rw-r--r-- | writerfilter/inc/dmapper/DomainMapperFactory.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/domainmapperfactory.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/filter/RtfFilter.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/filter/WriterFilter.cxx | 4 |
6 files changed, 5 insertions, 13 deletions
diff --git a/writerfilter/inc/dmapper/DomainMapperFactory.hxx b/writerfilter/inc/dmapper/DomainMapperFactory.hxx index 306870a5003c..afd798aec850 100644 --- a/writerfilter/inc/dmapper/DomainMapperFactory.hxx +++ b/writerfilter/inc/dmapper/DomainMapperFactory.hxx @@ -12,7 +12,6 @@ #include <dmapper/resourcemodel.hxx> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/uno/XComponentContext.hpp> namespace utl @@ -41,7 +40,6 @@ public: css::uno::Reference<css::lang::XComponent> const& xModel, bool bRepairStorage, SourceDocumentType eDocumentType, - css::uno::Reference<css::text::XTextRange> const& xInsertTextRange, utl::MediaDescriptor& rMediaDesc); }; } // namespace dmapper diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 4132d825d0bc..d75e3e4aa91c 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -95,12 +95,12 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon uno::Reference<lang::XComponent> const& xModel, bool bRepairStorage, SourceDocumentType eDocumentType, - uno::Reference<text::XTextRange> const& xInsertTextRange, utl::MediaDescriptor& rMediaDesc) : LoggedProperties("DomainMapper"), LoggedTable("DomainMapper"), LoggedStream("DomainMapper"), - m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType, xInsertTextRange, !rMediaDesc.getUnpackedValueOrDefault("InsertMode", false))), + m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType, rMediaDesc.getUnpackedValueOrDefault("TextInsertModeRange", uno::Reference<text::XTextRange>()), + !rMediaDesc.getUnpackedValueOrDefault("InsertMode", false))), mbIsSplitPara(false) { // #i24363# tab stops relative to indent diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index e0583691be94..c5a229984a4f 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -80,7 +80,6 @@ public: css::uno::Reference<css::lang::XComponent> const& xModel, bool bRepairStorage, SourceDocumentType eDocumentType, - css::uno::Reference<css::text::XTextRange> const& xInsertTextRange, utl::MediaDescriptor& rMediaDesc); virtual ~DomainMapper(); diff --git a/writerfilter/source/dmapper/domainmapperfactory.cxx b/writerfilter/source/dmapper/domainmapperfactory.cxx index 193ae20dfed8..52e568c42111 100644 --- a/writerfilter/source/dmapper/domainmapperfactory.cxx +++ b/writerfilter/source/dmapper/domainmapperfactory.cxx @@ -20,7 +20,6 @@ Stream::Pointer_t DomainMapperFactory::createMapper(css::uno::Reference<css::uno css::uno::Reference<css::lang::XComponent> const& xModel, bool bRepairStorage, SourceDocumentType eDocumentType, - css::uno::Reference<css::text::XTextRange> const& xInsertTextRange, utl::MediaDescriptor& rMediaDesc) { #ifdef DEBUG_WRITERFILTER @@ -32,7 +31,7 @@ Stream::Pointer_t DomainMapperFactory::createMapper(css::uno::Reference<css::uno TagLogger::getInstance().startDocument(); #endif - return Stream::Pointer_t(new DomainMapper(xContext, xInputStream, xModel, bRepairStorage, eDocumentType, xInsertTextRange, rMediaDesc)); + return Stream::Pointer_t(new DomainMapper(xContext, xInputStream, xModel, bRepairStorage, eDocumentType, rMediaDesc)); } } // namespace dmapper diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index 509c9b1b6896..1f5cc853db65 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -110,7 +110,6 @@ sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescrip utl::MediaDescriptor aMediaDesc(aDescriptor); bool bRepairStorage = aMediaDesc.getUnpackedValueOrDefault("RepairPackage", false); bool bIsNewDoc = !aMediaDesc.getUnpackedValueOrDefault("InsertMode", false); - uno::Reference<text::XTextRange> xInsertTextRange = aMediaDesc.getUnpackedValueOrDefault("TextInsertModeRange", uno::Reference<text::XTextRange>()); uno::Reference< io::XInputStream > xInputStream; aMediaDesc.addInputStream(); @@ -145,8 +144,7 @@ sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescrip uno::Reference<task::XStatusIndicator>()); writerfilter::dmapper::SourceDocumentType eType = writerfilter::dmapper::SourceDocumentType::RTF; - writerfilter::Stream::Pointer_t pStream( - writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, xInsertTextRange, aMediaDesc)); + writerfilter::Stream::Pointer_t pStream(writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, aMediaDesc)); writerfilter::rtftok::RTFDocument::Pointer_t pDocument( writerfilter::rtftok::RTFDocumentFactory::createDocument(m_xContext, xInputStream, m_xDstDoc, xFrame, xStatusIndicator, bIsNewDoc)); pDocument->resolve(*pStream); diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 354585b2f08c..2a96884e516e 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -170,9 +170,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDesc return sal_False; writerfilter::dmapper::SourceDocumentType eType = writerfilter::dmapper::SourceDocumentType::OOXML; - uno::Reference<text::XTextRange> xInsertTextRange = aMediaDesc.getUnpackedValueOrDefault("TextInsertModeRange", uno::Reference<text::XTextRange>()); - writerfilter::Stream::Pointer_t pStream( - writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, xInsertTextRange, aMediaDesc)); + writerfilter::Stream::Pointer_t pStream(writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, aMediaDesc)); //create the tokenizer and domain mapper writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream = writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, xInputStream, bRepairStorage); uno::Reference<task::XStatusIndicator> xStatusIndicator = aMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STATUSINDICATOR(), uno::Reference<task::XStatusIndicator>()); |