summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtw8sty.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-03-15 20:48:53 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-03-16 04:54:47 +0100
commit8805e10f5887df66edfd0a2fa4b70e87f0c74700 (patch)
tree6754af5d8450787a2aab415a864377f704a84af1 /sw/source/filter/ww8/wrtw8sty.cxx
parent2537d6897ae516d3b4d50f0e2885dc24949841bf (diff)
tdf#112118: DOC: properly import/export border distance
DOCX part was done in fb959e581c900b392efd0bb329b7cf30c8ed56a5. This commit fixes DOC part. Line width wasn't taken into account on import; and export was done only with "from text" distance, which gave poor interoperability with Word, where the borders were close to page edge. The common code is moved to editeng/source/items/frmitems.cxx and include/editeng/boxitem.hxx. Change-Id: I3d1d1312cb9dc9a9e00d9847ec11234cd787df60 Reviewed-on: https://gerrit.libreoffice.org/51366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/filter/ww8/wrtw8sty.cxx')
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 5cc7bc335008..3505d8f641e3 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1392,6 +1392,10 @@ void WW8AttributeOutput::SectionPageBorders( const SwFrameFormat* pPdFormat, con
nPgBorder = 2;
}
+ // [MS-DOC] 2.9.255 SPgbPropOperand; 2.9.185 PgbOffsetFrom
+ if (m_bFromEdge)
+ nPgBorder |= (1<<5);
+
if ( USHRT_MAX != nPgBorder )
{
// write the Flag and Border Attribute