summaryrefslogtreecommitdiff
path: root/sw/inc/fmtornt.hxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-08-04 18:56:08 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-08-06 11:25:19 +0200
commit12645900dece0a9aa0661fee796c27f672217977 (patch)
treee739d79b5c6a8afc45a80f52aab62ff199d5751a /sw/inc/fmtornt.hxx
parent818511e32f41bdf873bb660ec67bc82e4a27e847 (diff)
tdf#135464 sw: ODT->DOCX: fix positioning of at-page shapes and frames
Exporting at-page anchored flys to DOCX can result in wrong positions, because DocxSdrExport::startDMLAnchorInline() converts text::RelOrientation::FRAME to relativeFrom="column", i.e. the margin, but sw displays it as relative to the page. In fact at-page and FRAME is an invalid combination according to the table in ODF 1.3, 20.298 style:horizontal-pos, the paragraph and character relations are not valid for page-anchored flys. Since there are lots of ODT files with this invalid combination, try to fix it on import, in SwXFrame and SwXShape. Funnily, SwXShape is attached before the properties are set, while SwXFrame is attached after the properties are set. The anchor frame for at-page is always a SwPageFrame. Unfortunately there is a case where PRINT_AREA and PAGE_PRINT_AREA differ, namely the CalcClipRect() only handles PRINT_AREA so it will crop to the right margin with that but not with PAGE_PRINT_AREA, so don't map this value. Change-Id: I4d5f7f87d045ac4539b9170e55c34d4afe801f4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100130 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/inc/fmtornt.hxx')
-rw-r--r--sw/inc/fmtornt.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 0a8ab6f1a619..59afdb46f26a 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -108,6 +108,12 @@ inline const SwFormatVertOrient &SwFormat::GetVertOrient(bool bInP) const
inline const SwFormatHoriOrient &SwFormat::GetHoriOrient(bool bInP) const
{ return m_aSet.GetHoriOrient(bInP); }
+namespace sw {
+
+ bool GetAtPageRelOrientation(sal_Int16 & rOrientation, bool const isIgnorePrintArea);
+
+}
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */