summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-25 14:56:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-28 07:31:50 +0100
commit5ab1b4f97032e4b1f1f0c080311f3a393ce89585 (patch)
treed9b434e582edd604ea75672f05738e1fd91bce93 /svx
parent6e641f93e837a33c8d4364fdbd88b3d4c52de20c (diff)
make RECT_EMPTY purely an implementation detail
and make outside code use the IsEmpty/SetEmpty methods Change-Id: I4821d1bdceb99bb6a837a85ff2131003f9a160a5 Reviewed-on: https://gerrit.libreoffice.org/48584 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdopath.cxx8
-rw-r--r--svx/source/unodraw/unoshape.cxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 8a14da00bfdd..b71e20f92a94 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2425,13 +2425,13 @@ void SdrPathObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
tools::Rectangle aOld(GetSnapRect());
- // Take RECT_EMPTY into account when calculating scale factors
- long nMulX = (RECT_EMPTY == rRect.Right()) ? 0 : rRect.Right() - rRect.Left();
+ // Take empty into account when calculating scale factors
+ long nMulX = rRect.IsWidthEmpty() ? 0 : rRect.Right() - rRect.Left();
long nDivX = aOld.Right() - aOld.Left();
- // Take RECT_EMPTY into account when calculating scale factors
- long nMulY = (RECT_EMPTY == rRect.Bottom()) ? 0 : rRect.Bottom() - rRect.Top();
+ // Take empty into account when calculating scale factors
+ long nMulY = rRect.IsHeightEmpty() ? 0 : rRect.Bottom() - rRect.Top();
long nDivY = aOld.Bottom() - aOld.Top();
if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 14cc1a0f108f..0f33c8287e87 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1220,13 +1220,13 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize )
//aRect.SetSize(aLocalSize); // this call subtract 1 // http://www.openoffice.org/issues/show_bug.cgi?id=83193
if ( !aLocalSize.Width() )
{
- aRect.Right() = RECT_EMPTY;
+ aRect.SetWidthEmpty();
}
else
aRect.setWidth(aLocalSize.Width());
if ( !aLocalSize.Height() )
{
- aRect.Bottom() = RECT_EMPTY;
+ aRect.SetHeightEmpty();
}
else
aRect.setHeight(aLocalSize.Height());