diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-12 13:54:26 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-12 19:08:23 +0200 |
commit | 21f73d47e949ef2732b778bd1ebe123473edf231 (patch) | |
tree | 2a3b7ed91f9c72c89cf9348fa707e2c6767bf894 /writerfilter/source | |
parent | 5ffa11a77369637f4f8698bbe0402fe1395e46b7 (diff) |
tdf#112346: take Word no-wrap limit into account also for ww8
This also makes ww8 floating-table conversion decision heuristics
somewhat closer to OOXML code.
Change-Id: I29ca2ebabd1758ad98e02aaf560cf2f44daec3a8
Reviewed-on: https://gerrit.libreoffice.org/42196
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/42216
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 8b84e318bc67..6ff4d05c1476 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -1054,6 +1054,13 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(bool bFirstPage, DomainMapper bool SectionPropertyMap::FloatingTableConversion(DomainMapper_Impl& rDM_Impl, FloatingTableInfo& rInfo) { + // This is OOXML version of the code deciding if the table needs to be + // in a floating frame. + // For ww8 code, see SwWW8ImplReader::FloatingTableConversion in + // sw/source/filter/ww8/ww8par.cxx + // The two should do the same, so if you make changes here, please check + // that the other is in sync. + // Note that this is just a list of heuristics till sw core can have a // table that is floating and can span over multiple pages at the same // time. @@ -1107,9 +1114,9 @@ bool SectionPropertyMap::FloatingTableConversion(DomainMapper_Impl& rDM_Impl, Fl // If the position is relative to the edge of the page, then we need to check the whole // page width to see whether text can fit next to the table. - if ( rInfo.getPropertyValue( "HoriOrientRelation" ) == text::RelOrientation::PAGE_FRAME ) + if ( nHoriOrientRelation == text::RelOrientation::PAGE_FRAME ) { - // If the table is wide enough to that no text fits next to it, then don't create a fly + // If the table is wide enough so that no text fits next to it, then don't create a fly // for the table: no wrapping will be performed anyway, but multi-page // tables will be broken. if ((nTableWidth + nMagicNumber) < (nPageWidth - std::min(GetLeftMargin(), GetRightMargin()))) |