diff options
author | Szabolcs Toth <toth.szabolcs@nisz.hu> | 2020-10-09 13:00:30 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-10-20 09:17:32 +0200 |
commit | 1c593e1916c9164c7db71da2017cfc26972f8e9f (patch) | |
tree | 97db236a78c7b9c62b0ea1a0e1794bacfb259947 /writerfilter | |
parent | c719db99166a7b4770855a9599ec65c70cd256c5 (diff) |
tdf#133045 sw: add shape alignment to the top page border
Allow relative alignment to the top page border (the area
over PAGE_PRINT_AREA) by adding constant PAGE_PRINT_AREA_TOP
to com::sun::star::text::RelOrientation.
Fix DOCX shape import of <wp:positionV relativeFrom="topMargin">.
Follow-up of commit 6788133b3bdf02097d66a99047aa7bcba3a99a66
(tdf#135720 sw: fix PAGE_PRINT_AREA_BOTTOM alignment with footer)
and commit 79107d3f8d10aa0f38641775c5eb47dcfd4fd37e
(sw from-bottom relative orientation: add UNO API).
Co-authored-by: Balázs Regényi
Change-Id: I3a3f7324c0ef8d448526982d3e2f09b67f5fd4d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104113
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.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 54933b284e06..0bd7354fd962 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -68,8 +68,11 @@ void PositionHandler::lcl_attribute( Id aName, Value& rVal ) break; case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_page: - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_topMargin: // fallthrough intended - m_nRelation = text::RelOrientation::PAGE_FRAME; + m_nRelation = text::RelOrientation::PAGE_FRAME; + break; + + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_topMargin: + m_nRelation = text::RelOrientation::PAGE_PRINT_AREA_TOP; break; case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_bottomMargin: |