diff options
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 02b954e0922c..b9ff4c2946e8 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2730,15 +2730,17 @@ void DomainMapper_Impl::PushFieldContext() TagLogger::getInstance().element("pushFieldContext"); #endif - uno::Reference< text::XTextAppend > xTextAppend; + uno::Reference<text::XTextCursor> xCrsr; if (!m_aTextAppendStack.empty()) - xTextAppend = m_aTextAppendStack.top().xTextAppend; - uno::Reference< text::XTextRange > xStart; - if (xTextAppend.is()) { - uno::Reference< text::XTextCursor > xCrsr = xTextAppend->createTextCursorByRange( xTextAppend->getEnd() ); - xStart = xCrsr->getStart(); + uno::Reference<text::XTextAppend> xTextAppend = m_aTextAppendStack.top().xTextAppend; + if (xTextAppend.is()) + xCrsr = xTextAppend->createTextCursorByRange(xTextAppend->getEnd()); } + + uno::Reference< text::XTextRange > xStart; + if (xCrsr.is()) + xStart = xCrsr->getStart(); m_aFieldStack.push( std::make_shared<FieldContext>( xStart ) ); } /*------------------------------------------------------------------------- |