diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-28 15:59:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-29 09:03:06 +0200 |
commit | a1f31211920bfae1a21ea375fa5280c9c6595e15 (patch) | |
tree | bf6d48d211beee038b99511c36116ecf72de94b2 /svx/source | |
parent | 6dbae37b8d2d2d1ecad85c772fd684803b5a52cb (diff) |
remove 1 pixel white band in XRectPreview
Change-Id: I3089f9305b8142e2c78405a4f9ae6a2066e90cfa
Reviewed-on: https://gerrit.libreoffice.org/59725
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index b7a3e6c5f92e..dce8c6d4b4b0 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -2270,27 +2270,36 @@ XRectPreview::XRectPreview() { } +// expand to avoid 1 pixel band to the right and bottom of previews +// in color/gradient/bitmap/pattern/hatch subpages of area tab +// in e.g. page dialog +tools::Rectangle XRectPreview::GetPreviewSize() const +{ + tools::Rectangle aObjectSize(Point(), GetOutputSizePixel()); + aObjectSize.AdjustRight(1); + aObjectSize.AdjustBottom(1); + return aObjectSize; +} + void XRectPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea) { PreviewBase::SetDrawingArea(pDrawingArea); InitSettings(); // create RectangleObject - const tools::Rectangle aObjectSize(Point(), GetOutputSizePixel()); mpRectangleObject = new SdrRectObj( getModel(), - aObjectSize); + GetPreviewSize()); } void XRectPreview::Resize() { - const tools::Rectangle aObjectSize(Point(), GetOutputSizePixel()); SdrObject *pOrigObject = mpRectangleObject; if (pOrigObject) { mpRectangleObject = new SdrRectObj( getModel(), - aObjectSize); + GetPreviewSize()); SetAttributes(pOrigObject->GetMergedItemSet()); SdrObject::Free(pOrigObject); } |