libreoffice/bsc1160687-6.diff
Tomáš Chvátal 1732ddcc18 Accepting request 804990 from LibreOffice:6.4
- Fix Bug 1160687 - LO-L3: Elements on title page mixed up
  * bsc1160687-1.diff
  * bsc1160687-2.diff
  * bsc1160687-3.diff
  * bsc1160687-4.diff
  * bsc1160687-5.diff
  * bsc1160687-6.diff
  * bsc1160687-7.diff
  * bsc1160687-8.diff

OBS-URL: https://build.opensuse.org/request/show/804990
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=877
2020-05-13 08:11:28 +00:00

57 lines
2.6 KiB
Diff

From d29f4857da385db17fe9efd4157c0a021531d0c4 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.com>
Date: Wed, 29 Apr 2020 19:19:37 +0200
Subject: [PATCH] sw from-bottom relative orientation: add DOCX filter
The OOXML equivalent is <wp:positionV relativeFrom="bottomMargin">, and
the position is typically a negative number (i.e. the position is the
offset between the top of the shape and the top of the top or bottom
margin; not the distance and it's always the top of some margin).
(cherry picked from commit fc620901ddd134f644a56ed4ea4a9b5446cc5675)
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
Change-Id: Ia979bc8bfaa37d29b0947c4408335e0a80c05880
---
.../ooxmlexport/data/page-content-bottom.docx | Bin 0 -> 5007 bytes
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 11 +++++++++++
sw/source/filter/ww8/docxsdrexport.cxx | 3 +++
writerfilter/source/dmapper/GraphicHelpers.cxx | 4 ++++
4 files changed, 18 insertions(+)
create mode 100644 sw/qa/extras/ooxmlexport/data/page-content-bottom.docx
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 7cacc4eb3173..e9381ca77d0d 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -498,6 +498,9 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
case text::RelOrientation::PAGE_PRINT_AREA:
relativeFromV = "margin";
break;
+ case text::RelOrientation::PAGE_PRINT_AREA_BOTTOM:
+ relativeFromV = "bottomMargin";
+ break;
case text::RelOrientation::PAGE_FRAME:
relativeFromV = "page";
break;
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 9168ad51eebd..7e8564826758 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -75,6 +75,10 @@ void PositionHandler::lcl_attribute( Id aName, Value& rVal )
m_nRelation = text::RelOrientation::PAGE_FRAME;
break;
+ case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_bottomMargin:
+ m_nRelation = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
+ break;
+
case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_paragraph:
m_nRelation = text::RelOrientation::FRAME;
break;
--
2.26.1