include/tools/gen.hxx | 2 ++ svx/source/sdr/contact/viewcontactofgroup.cxx | 6 ++---- svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 5 ++--- vcl/source/helper/canvastools.cxx | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-)
New commits: commit 1d49600541d941681bfd600c3e360a027b2024e4 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri May 3 16:19:51 2019 +0200 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Wed Jul 10 18:30:50 2019 +0200 tdf#81134 Chart size not retained Change-Id: I39019e29a988b7b9e12505537fdb69d83223600d Reviewed-on: https://gerrit.libreoffice.org/75329 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index 77e90a266245..c733c40e6e49 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -409,6 +409,8 @@ public: void SetEmpty() { nRight = nBottom = RECT_EMPTY; } inline bool IsEmpty() const; + bool IsWidthEmpty() const { return nRight == RECT_EMPTY; } + bool IsHeightEmpty() const { return nBottom == RECT_EMPTY; } inline bool operator == ( const tools::Rectangle& rRect ) const; inline bool operator != ( const tools::Rectangle& rRect ) const; diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx index 19224da02d7b..9676fe8e45e7 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 c0ab639395de..343df7fc57e2 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 8920265af010..1bd7426d7071 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -390,9 +390,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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits