[Libreoffice-commits] core.git: sw/qa sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 13:45:27 UTC 2018
sw/qa/extras/layout/layout.cxx | 2 +-
sw/source/core/layout/paintfrm.cxx | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit f006b6339e20af6a3fbd60d97d21590d4ebf5021
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Fri Nov 23 21:55:54 2018 +0100
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Tue Nov 27 14:44:59 2018 +0100
tdf#112195 Writer: page background covers whole page
as in ODT implementation of Google Docs, and as in DOCX
supporting basic requirements of creating digital and
professional print media. This patch fixes DOCX import
(tdf#121668) and it gives the required PDF export, too.
In the case of solid color, color gradient, hatching,
pattern and tiled bitmap (except stretched bitmap),
this patch removes the obsolete white border around
the text area, if the user modifies the page background.
Note: likely the white border was good for home printing
in former times, but now it forms only a serious
barrier for most users to create de facto design
standard whole page background formatting instead of
its unacceptable poor man's version.
Note 2: the OpenDocument standard refers XSL/CSS here,
and browsers adapt background settings to the body margin
area the same way, as Google Docs and fixed LibreOffice do.
More information:
tdf#112195 "(Whole-Page-Filling) - Allow page background to cover the
whole page (reloaded)"
tdf#33041 "Allow page background to cover the whole page, not only
within page borders/margins"
tdf#121668 "FILEOPEN DOCX Page Color created with Word disappears on the
margins"
ooo#9370 "Off-margin page background"
(https://bz.apache.org/ooo/show_bug.cgi?id=9370)
Change-Id: I7c6c96ceaf7102b38e3e5c1ed767db0ee63520ab
Reviewed-on: https://gerrit.libreoffice.org/63914
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 99bf4ba29c76..304f14b40398 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2370,7 +2370,7 @@ void SwLayoutWriter::testTableExtrusion1()
xmlDocPtr pXmlDoc = dumper.dumpAndParse(*xMetaFile);
CPPUNIT_ASSERT(pXmlDoc);
sal_Int32 nRight = getXPath(pXmlDoc, "//sectrectclipregion", "right").toInt32();
- sal_Int32 nLeft = (nRight + getXPath(pXmlDoc, "(//rect)[1]", "right").toInt32()) / 2;
+ sal_Int32 nLeft = static_cast<sal_Int32>(nRight * 0.95);
// Expect table borders in right page margin.
const OString sXPath = "//polyline/point[@x>" + OString::number(nLeft) + " and @x<"
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 1adf941b8e46..e920046b1016 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6179,7 +6179,15 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
}
else
{
- ::lcl_CalcBorderRect( aRect, this, rAttrs, false, gProp);
+ if ( bPageFrame )
+ {
+ aRect = getFrameArea();
+ }
+ else
+ {
+ ::lcl_CalcBorderRect( aRect, this, rAttrs, false, gProp);
+ }
+
if ( (IsTextFrame() || IsTabFrame()) && GetPrev() )
{
if ( GetPrev()->GetAttrSet()->GetBackground() == GetAttrSet()->GetBackground() &&
More information about the Libreoffice-commits
mailing list