[Libreoffice-commits] core.git: include/svx svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 29 07:03:29 UTC 2018
include/svx/dlgctrl.hxx | 1 +
svx/source/dialog/dlgctrl.cxx | 17 +++++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
New commits:
commit a1f31211920bfae1a21ea375fa5280c9c6595e15
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 28 15:59:34 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 29 09:03:06 2018 +0200
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index eb587a299378..a355c50e2907 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -478,6 +478,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC XRectPreview : public PreviewBase
private:
SdrObject* mpRectangleObject;
+ tools::Rectangle GetPreviewSize() const;
public:
XRectPreview();
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
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);
}
More information about the Libreoffice-commits
mailing list