summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-03-30 23:11:41 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 16:02:43 +0000
commit64cc9de6665a5122b800bb478628d8aa76030dd6 (patch)
tree9aa612b7fc0f810338e64d1836f0642158cc9054
parentcbbe5c471cad37ab434a11b804c66e0b424af8a7 (diff)
writerfilter: DOCX import: fix handling of w:hideMark vs. w:vMerge
The problem is that Writer's layout can't handle the case where cells are vertically merged and the last row has a fixed height; the vertically merged cell will grow up to the height of the other cells in the non- fixed rows plus the fixed row height, but no larger. So for now, avoid setting fixed row heights in this case. (regression from d1278ef4849661b9ae0eb7aaf4d74fbf91ccaf11) Change-Id: Iac3689e0bb0d5b8a62115ca0fb1f2c553a6e6bbc (cherry picked from commit c382c998ffdaf80c10a3f078fb4f0a37224d1158) Reviewed-on: https://gerrit.libreoffice.org/35960 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 7d7d21cfa53c8e80fd4dd0938579d8377da5a840) Reviewed-on: https://gerrit.libreoffice.org/35971
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index a2e0495d97ff..12d22f321151 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -862,8 +862,12 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
bool lcl_hideMarks(PropertyMapVector1& rCellProperties)
{
for (PropertyMapPtr & p : rCellProperties)
- if (!p->isSet(PROP_CELL_HIDE_MARK))
+ {
+ // if anything is vertically merged, the row must not be set to fixed
+ // as Writer's layout doesn't handle that well
+ if (!p->isSet(PROP_CELL_HIDE_MARK) || p->isSet(PROP_VERTICAL_MERGE))
return false;
+ }
return true;
}