[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 5 07:08:58 UTC 2019
svx/source/sdr/contact/viewcontactofgroup.cxx | 6 ++----
svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 5 ++---
vcl/source/helper/canvastools.cxx | 6 +++---
3 files changed, 7 insertions(+), 10 deletions(-)
New commits:
commit b6d2d10b8b2de89b1a856b8e164c0defcb2119ff
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri May 3 16:19:51 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Sep 5 09:08:21 2019 +0200
tdf#81134 Chart size not retained
Change-Id: I39019e29a988b7b9e12505537fdb69d83223600d
Reviewed-on: https://gerrit.libreoffice.org/75329
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/78422
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx
index d6a0e98dfcfe..cc82432aaea6 100644
--- a/svx/source/sdr/contact/viewcontactofgroup.cxx
+++ b/svx/source/sdr/contact/viewcontactofgroup.cxx
@@ -27,6 +27,7 @@
#include <basegfx/color/bcolor.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr
@@ -76,10 +77,7 @@ namespace sdr
// to current zoom so as objects relative position to grid
// appears stable
aCurrentBoundRect += GetSdrObjGroup().GetGridOffset();
- const basegfx::B2DRange aCurrentRange(
- aCurrentBoundRect.Left(), aCurrentBoundRect.Top(),
- aCurrentBoundRect.Right(), aCurrentBoundRect.Bottom());
-
+ const basegfx::B2DRange aCurrentRange = vcl::unotools::b2DRectangleFromRectangle(aCurrentBoundRect);
const drawinglayer::primitive2d::Primitive2DReference xReference(
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, aCurrentRange));
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index f02ba917280c..0ada135b8766 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -25,6 +25,7 @@
#include <sdr/primitive2d/sdrprimitivetools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/svdmodel.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr { namespace contact {
@@ -52,9 +53,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV
// to current zoom so as objects relative position to grid
// appears stable
rRectangle += GetRectObj().GetGridOffset();
- const ::basegfx::B2DRange aObjectRange(
- rRectangle.Left(), rRectangle.Top(),
- rRectangle.Right(), rRectangle.Bottom() );
+ const ::basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(rRectangle);
const GeoStat& rGeoStat(GetRectObj().GetGeoStat());
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index b78625fb54ad..40502932864c 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -394,9 +394,9 @@ namespace vcl
basegfx::B2DRange b2DRectangleFromRectangle( const ::tools::Rectangle& rRect )
{
return basegfx::B2DRange( rRect.Left(),
- rRect.Top(),
- rRect.Right(),
- rRect.Bottom() );
+ rRect.Top(),
+ rRect.IsWidthEmpty() ? rRect.Left() :rRect.Right(),
+ rRect.IsHeightEmpty() ? rRect.Top() : rRect.Bottom() );
}
geometry::IntegerSize2D integerSize2DFromSize( const Size& rSize )
More information about the Libreoffice-commits
mailing list