diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-05-14 14:59:31 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-15 08:43:50 +0000 |
commit | df73fa5feb10df10c4ba036be5fac1ddb9b6915f (patch) | |
tree | 5950a91e1f8c3bfec964b5cb0c47714ba8daa8f5 | |
parent | 2904e4d618a57771662ef435df0f478423714e41 (diff) |
fdo#64249: make sure we have matching start/end level for table in shapes
Change-Id: I4928f6a54e6cca9b26c0d2391fc1545688be2375
(cherry picked from commit 9ceda3013a6b7e60e0e56ba540e217fd36a34a0f)
Reviewed-on: https://gerrit.libreoffice.org/3907
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index deda4f16ebb4..48e40dea23f9 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1627,6 +1627,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape if (m_aTextAppendStack.empty()) return; uno::Reference<text::XTextAppend> xTextAppend = m_aTextAppendStack.top().xTextAppend; + + appendTableManager( ); + appendTableHandler( ); + getTableManager().startLevel(); try { uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW ); @@ -1685,10 +1689,6 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic ? uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) ); } } - - appendTableManager( ); - appendTableHandler( ); - getTableManager().startLevel(); } catch ( const uno::Exception& e ) { @@ -1700,11 +1700,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape void DomainMapper_Impl::PopShapeContext() { + getTableManager().endLevel(); + popTableManager(); if ( m_aAnchoredStack.size() > 0 ) { - getTableManager().endLevel(); - popTableManager(); - // For OLE object replacement shape, the text append context was already removed // or the OLE object couldn't be inserted. if ( !m_aAnchoredStack.top().bToRemove ) |