summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-06-08 09:08:27 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-06-08 12:07:48 +0200
commit51942eafdb4439559b6d59f3becd4afab45277f0 (patch)
treefbf70bbd31358db2af6c68abec8518244c626e18 /include/editeng
parente216988657e20a1e52986f742ab60464697bcb41 (diff)
DOC import: allow negative page border distances
In case the margin (distance between body frame and page frame) is smaller than the border spacing (distance between border and page frame), then we can map that to a negative border distance during the import of DOCX files since commit 1f127a2b9e1c1daab0972f98fc8708ecb7afa299 (sw layout: allow negative page border distances, 2022-06-07), but DOC import had the same problem. The above commit intentionally kept the default behavior of BorderDistanceFromWord() unchanged to avoid side effects in other clients of that function (not DOCX import), but means that DOC import was still broken. Given that it turns out there are only 2 callers of BorderDistanceFromWord(), fix the problem by allowing negative border distances unconditionally: this simplifies code & SetBorderDistance() in the DOC import will now get the correct border distance out of the box. DOC export works out of the box without any additional work. Change-Id: I6bf15b3c73823c9265218b7b3a7b869e131818db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135484 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/boxitem.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index 750993c91f7d..786821c02ff0 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -241,7 +241,7 @@ namespace editeng
{
void EDITENG_DLLPUBLIC BorderDistanceFromWord(bool bFromEdge, sal_Int32& nMargin,
- sal_Int32& nBorderDistance, sal_Int32 nBorderWidth, bool bAllowNegativeBorderDistance = false);
+ sal_Int32& nBorderDistance, sal_Int32 nBorderWidth);
struct EDITENG_DLLPUBLIC WordPageMargins final
{