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 11:54:11 +0200
commitafc0c718ec9ca6a4fbe1324f68eb292d9a67b058 (patch)
tree9bbb048ca2d933cdb77ecf6c10f3561df8b9b8bb /writerfilter
parent569cb54f1d82e993dcf1fd11d92d4cbd4f224a2d (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>
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 fc1fbee7440f..7e3b3740c276 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2987,7 +2987,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&)