summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/PropertyMap.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-02-05 16:11:40 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-02-06 09:08:17 +0100
commit3d6a5de8f4579187e5949b212e4625773bb20e6f (patch)
tree8d0271a002bed16074089eeb0385ea74db7b3791 /writerfilter/source/dmapper/PropertyMap.cxx
parent07e5498fdeaefd72cd86f0413dfaea56724097b3 (diff)
DOCX import: don't give up on floating tables in headers completely
This reverts commit 213d6390a2cc59d174173f4359c161625a9c4bdc (tdf#108272 DOCX table-only header: fix SAX parser error, 2020-02-03), except its testcase and replaces it with a better fix that does not import all floating-table-in-header as non-floating tables. See the new testcase, which is 1 pages in Word, it was 3 pages in Writer, and with the better fix it's now 1 pages in Writer as well. Change-Id: Ica3500120f12222d7cf766d55c17d78164865026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88037 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter/source/dmapper/PropertyMap.cxx')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 4174dab5ef0a..69cc86a73153 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1320,7 +1320,17 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
{
rInfo.m_nBreakType = m_nBreakType;
if ( FloatingTableConversion( rDM_Impl, rInfo ) )
- xBodyText->convertToTextFrame( rInfo.m_xStart, rInfo.m_xEnd, rInfo.m_aFrameProperties );
+ {
+ try
+ {
+ xBodyText->convertToTextFrame(rInfo.m_xStart, rInfo.m_xEnd,
+ rInfo.m_aFrameProperties);
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("writerfilter", "convertToTextFrame() failed");
+ }
+ }
}
rPendingFloatingTables.clear();