diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-03-08 08:02:55 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-03-09 09:17:53 +0100 |
commit | 4cec874df4958a8f21021e40b3f06c58734560fc (patch) | |
tree | 122a979b94d0ee072c9841d7fab3fd21109e2aec /writerfilter | |
parent | 256ccc1d4cb63838d264e04b5bd2e18a3fd4f4ba (diff) |
sw floattable: partially re-enable widow / orphan control in tables
Widow / orphan control in DOCX tables were disabled in commit
8b13da71aedd094de0d351a4bd5ad43fdb4bddde (tdf#128959 DOCX import: fix
missing text lines in tables, 2020-01-28).
That workaround helped with the particular bugdoc, but it also disabled
widow / orphan handling in general, and breaks e.g. orig-nocompat.docx
from tdf#61594, because the second page's last row is meant to contain 6
lines with widow control enabled, but the model has widow control
disabled, so the layout can't work properly.
Fix the problem by improving the layout's WidowsAndOrphans::FindWidows()
to handle conflicting widow / orphan control requirements in a fixed table
row height context, so the writerfilter/ change from the above commit
can be reverted without re-introducing tdf#128959.
An alternative would be to keep the layout unchanged and limit the
writerfilter/ change to fixed height rows, but that still feels like a
(more specific) workaround.
(cherry picked from commit 65dd1525e826006f78f86688032459dbd7ab4bb4)
Change-Id: I8378d356e116774275dff337d17b19bd79c84c1c
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 7550cc6ff0f7..8246e5eade06 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2639,15 +2639,6 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con } } } - - // fix table paragraph properties - if (xTextRange.is() && xParaProps && m_nTableDepth > 0 && !m_bIsInComments) - { - // tdf#128959 table paragraphs haven't got window and orphan controls - uno::Any aAny(static_cast<sal_Int8>(0)); - xParaProps->setPropertyValue("ParaOrphans", aAny); - xParaProps->setPropertyValue("ParaWidows", aAny); - } } if( !bKeepLastParagraphProperties ) rAppendContext.pLastParagraphProperties = pToBeSavedProperties; |