writerfilter/inc/resourcemodel/TableManager.hxx | 14 ++++++++++++++ writerfilter/source/dmapper/DomainMapper.cxx | 3 +-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 +++- 3 files changed, 18 insertions(+), 3 deletions(-)
New commits: commit fbe103ee6ca81fb4e2e8eec3875311d350908722 Author: Cédric Bosdonnat <cedric.bosdon...@free.fr> Date: Mon Feb 18 17:34:06 2013 +0100 n#779642: ignore framePr inside table or the table import won't work Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index 72b575a..1c24be5 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -530,6 +530,11 @@ public: virtual void endLevel(); /** + Tells whether a table has been started or not + */ + bool isInTable(); + + /** Handle the start of a paragraph group. */ virtual void startParagraphGroup(); @@ -702,6 +707,15 @@ void TableManager<T, PropertiesPointer>::handle(const T & rHandle) } template <typename T, typename PropertiesPointer> +bool TableManager<T, PropertiesPointer>::isInTable() +{ + bool bInTable = false; + if ( !mTableDataStack.empty() ) + bInTable = mTableDataStack.top()->getDepth() > 0; + return bInTable; +} + +template <typename T, typename PropertiesPointer> void TableManager<T, PropertiesPointer>::startLevel() { #ifdef DEBUG_TABLE diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index df6317b..0969f8a 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2968,7 +2968,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType } break; case NS_ooxml::LN_CT_PPrBase_framePr: - // Avoid frames if we're inside a structured document tag, would just cause outher tables fail to create. + // Avoid frames if we're inside a structured document tag, would just cause outer tables fail to create. if (!m_pImpl->GetSdt()) { PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH); @@ -2976,7 +2976,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { ParagraphPropertyMap* pParaContext = dynamic_cast< ParagraphPropertyMap* >( pContext.get() ); pParaContext->SetFrameMode(); - } else { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 00f5f2f..80d128f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -738,7 +738,9 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) { PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); TextAppendContext& rAppendContext = m_aTextAppendStack.top(); - if( rAppendContext.pLastParagraphProperties.get() && rAppendContext.pLastParagraphProperties->IsFrameMode() ) + // n#779642: ignore fly frame inside table as it could lead to messy situations + if( rAppendContext.pLastParagraphProperties.get() && rAppendContext.pLastParagraphProperties->IsFrameMode() + && !getTableManager().isInTable() ) { try {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits