summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-06-07 08:03:34 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-06-07 08:45:46 +0200
commit1f127a2b9e1c1daab0972f98fc8708ecb7afa299 (patch)
treeb81fbf9af5bb65d09dc9538f1daa467f90d5e167 /sw/source/uibase/shells
parentf4b6cee77e1725837f9a6044fec0b561c7049c3b (diff)
sw layout: allow negative page border distances
Writer follows the CSS box model when it comes to page borders: there can be a positive distance between the edge of the page and the border, and again a positive distance between the border and the body frame. This ensures that the page border never intersect with the body frame, which is usually what users expect. Word, however, can work with 2 distances for border and text, both measured from the edge of the page, leading to a page border, which is inside the body text. This is described at great detail at <https://wiki.openoffice.org/wiki/Writer/MSInteroperability/PageBorder#Importing_case_3:>. Fix the problem by allowing negative border distances: this doesn't influence the position or the size of the body frame, but it gives us a way to position the border more towards the center of the page, leading the matching layout between Writer and Word. The doc model (to allow negative border distances), UNO API and DOCX filter is updated in this commit. The ODT filter works without explicit effort. Other filters are not yet updated in this commit. Change-Id: I723e1bdb8dc6391129f1686f88826cc089f6fd67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135462 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 9dbb1b689e8e..3cbea6b77389 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -512,7 +512,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( pBoxItem )
{
aBox.reset(pBoxItem->Clone());
- sal_uInt16 nDefValue = MIN_BORDER_DIST;
+ sal_Int16 nDefValue = MIN_BORDER_DIST;
if ( !rReq.IsAPI() )
nDefValue = 55;
if (!rReq.IsAPI() || aBox->GetSmallestDistance() < MIN_BORDER_DIST)