From f0cc8071aa5e9c058f6bf1a1144d84c5252987a7 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Mon, 18 Feb 2013 17:34:06 +0100 Subject: n#779642: ignore framePr inside table or the table import won't work (cherry picked from commit 874f0a1be443b8027d5aba2285866f31cf4169e5) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I72996da79ca22a09fb490d06bcd34f741d7093ac Reviewed-on: https://gerrit.libreoffice.org/2306 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna --- writerfilter/source/dmapper/DomainMapper.cxx | 3 +-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'writerfilter/source/dmapper') diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 5ae8e1389589..8e74201c19ed 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2905,7 +2905,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); @@ -2913,7 +2913,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 88b4e4224ac8..a3cc27cbe412 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -727,7 +727,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 { -- cgit v1.2.3