summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2020-09-02 15:59:23 +0200
committerLászló Németh <nemeth@numbertext.org>2020-09-04 09:13:28 +0200
commitd362c0625fa92e0f4d4472f197bd1d68fba522f1 (patch)
tree0f7c82b083f7b3aa7becd1c88c2521bbb8089b8b /writerfilter
parent739ce73e9957fa1f553f3246e5ed67de0f3eb47f (diff)
tdf#136354 DOCX import: fix vertical mirrored alignment on bottom margin
The relative mirrored vertical alignment (INSIDE and OUTSIDE) of bottom page margin wasn't handled. Note: this fix doesn't check mirroring (if it's possible to mirror vertically either, for example, by mixing portrait and landscape mode in a document), only support INSIDE as OUTSIDE as alternative names of TOP and BOTTOM in case of alignment to bottom margins. Follow-up of commit d54264e34c1ccc0eaf4178ab165a843028500223 (tdf#133071 DOCX import: fix vertical alignment to bottom page margin) Co-authored-by: Attila Szűcs (NISZ) Change-Id: I6d844f57505bcda1faa7dd6112d1cda666c3ac07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101934 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index a2275d95be4a..7051f3c45b47 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -176,10 +176,10 @@ void PositionHandler::lcl_sprm(Sprm& rSprm)
m_nOrient = text::VertOrientation::BOTTOM;
else if (rAlign == "center")
m_nOrient = text::VertOrientation::CENTER;
- else if (rAlign == "inside")
- m_nOrient = text::VertOrientation::NONE;
- else if (rAlign == "outside")
- m_nOrient = text::VertOrientation::NONE;
+ else if (rAlign == "inside" && m_nRelation == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)
+ m_nOrient = text::VertOrientation::TOP;
+ else if (rAlign == "outside" && m_nRelation == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)
+ m_nOrient = text::VertOrientation::BOTTOM;
rAlign.clear();
break;
}