diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-02-24 15:38:55 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-02-24 15:43:24 +0100 |
commit | b538f6a0f4193531e1187874b4b35a4384d6fcd1 (patch) | |
tree | daf38a11a046e019f7abf13510e2a64fae746029 /writerfilter | |
parent | -Werror=unused-parameter (diff) | |
download | core-b538f6a0f4193531e1187874b4b35a4384d6fcd1.tar.gz core-b538f6a0f4193531e1187874b4b35a4384d6fcd1.zip |
fdo#45187 revert "writerfilter import, fixed the shapes import"
This reverts commit 0e26bd20978cbdd7c59368044c2a21b98ffba164. Sadly
without a test document for the original issue there is no better fix
for this one.
Acked-by: Luboš Luňák <l.lunak@suse.cz>
Acked-by: Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 15 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index d7756508a93d..8e5b9ea72eb5 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -192,7 +192,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsColumnBreakDeferred( false ), m_bIsPageBreakDeferred( false ), m_bIsInShape( false ), - m_bRemovedLastAnchored( false ), + m_bShapeContextAdded( false ), m_pLastSectionContext( ), m_nCurrentTabStopIndex( 0 ), m_sCurrentParaStyleId(), @@ -1062,8 +1062,6 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) // this is normal: the shape is already attached } m_aAnchoredStack.pop( ); - m_aTextAppendStack.pop( ); - m_bRemovedLastAnchored = true; } // Get the end of paragraph character inserted @@ -1204,10 +1202,10 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle // gives a better ( visually ) result xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ANCHOR_TYPE ), uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) ); // remove ( if valid ) associated shape ( used for graphic replacement ) - if ( m_aAnchoredStack.size() > 0 ) + if ( m_bShapeContextAdded ) { if ( lcl_removeShape( m_xTextDocument, pOLEHandler->getShape(), m_aAnchoredStack, m_aTextAppendStack ) ) - m_bRemovedLastAnchored = true; // ensure PopShapeContext processing doesn't pop the append stack + m_bShapeContextAdded = false; // ensure PopShapeContext processing doesn't pop the append stack } // @@ -1219,6 +1217,7 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle (void)rEx; OSL_FAIL( "Exception in creation of OLE object" ); } + } void DomainMapper_Impl::appendStarMath( const Value& val ) @@ -1549,7 +1548,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape { // Add the shape to the text append stack m_aTextAppendStack.push( uno::Reference< text::XTextAppend >( xShape, uno::UNO_QUERY_THROW ) ); - m_bRemovedLastAnchored = false; + m_bShapeContextAdded = true; // Add the shape to the anchored objects stack uno::Reference< text::XTextContent > xTxtContent( xShape, uno::UNO_QUERY_THROW ); @@ -1588,11 +1587,11 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape void DomainMapper_Impl::PopShapeContext() { - if ( !m_bRemovedLastAnchored && m_aAnchoredStack.size() > 0 ) + if ( m_bShapeContextAdded ) { RemoveLastParagraph(); m_aTextAppendStack.pop(); - m_aAnchoredStack.pop(); + m_bShapeContextAdded = false; } m_bIsInShape = false; } diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index c4899cb0c20e..924c8dd623f2 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -295,7 +295,7 @@ private: bool m_bIsColumnBreakDeferred; bool m_bIsPageBreakDeferred; bool m_bIsInShape; - bool m_bRemovedLastAnchored; + bool m_bShapeContextAdded; LineNumberSettings m_aLineNumberSettings; |