summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-08-11 17:44:03 +0200
committerLászló Németh <nemeth@numbertext.org>2021-08-12 15:39:19 +0200
commit5af699be26fc959aa7d807e59d3873cc5b2fb230 (patch)
treeb6f4f8468df77c547bf22378c5c99a262f4e6c9f /writerfilter
parent9bbc9e75f20937913b5d6f4f09b1d5b54e26bf20 (diff)
tdf#143318 DOCX import: fix missing redlines in flying tables
makeRedline() exceptions (in the case of already existing redlines) skip the creation of the next (not existing yet) redlines in tables inside fly frames. Here: a tracked table moving revealed the problem, with the missing rejection of the new position, i.e. the "new" (second) table of the document. Note: fix also collecting redlines within tables: IsInTable() isn't true in the first cell of the table, losing the redline here, so it's replaced with m_nTableDepth > 0. Follow-up to commit 7f3c0bbc174b9b0316991c174ca3b407c0e3d141 "tdf#143510 DOCX import: fix tracked table drag & drop". Change-Id: Icf6dd62eb950e5af6a75353dffabb9e9433c1b44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120333 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit afc0c718ec9ca6a4fbe1324f68eb292d9a67b058) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120356
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx9
2 files changed, 9 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 56451b752221..b175e3752b70 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2930,7 +2930,7 @@ void DomainMapper_Impl::CreateRedline(uno::Reference<text::XTextRange> const& xR
}
// store frame and (possible floating) table redline data for restoring them after frame conversion
enum StoredRedlines eType;
- if (m_bIsActualParagraphFramed || (hasTableManager() && getTableManager().isInTable()))
+ if (m_bIsActualParagraphFramed || m_nTableDepth > 0)
eType = StoredRedlines::FRAME;
else if (IsInFootOrEndnote())
eType = IsInFootnote() ? StoredRedlines::FOOTNOTE : StoredRedlines::ENDNOTE;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index cacadef477d4..b4c58c0d8808 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1473,7 +1473,14 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
xCrsr->goRight(redPos[i/3], false);
xCrsr->goRight(redLen[i/3], true);
uno::Reference < text::XRedline > xRedline( xCrsr, uno::UNO_QUERY_THROW );
- xRedline->makeRedline( sType, aRedlineProperties );
+ try
+ {
+ xRedline->makeRedline( sType, aRedlineProperties );
+ }
+ catch (const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION("writerfilter", "makeRedline() failed");
+ }
}
}
catch (const uno::Exception&)