summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 13:52:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 16:08:51 +0200
commitd7855213ae60d79fc51d8b9bfe49f13200137c05 (patch)
treea9f852a6ddacffce339945e8667500d3531257a4 /vcl/win
parentb267650fd097f16d1b31c87a11a497294ad4ee42 (diff)
add an IsEmpty method to tools::Size and use it
Change-Id: I7f5201e2ea6c74329336e16bf219630e38ff92cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/salbmp.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index d891965e57ee..f2b21a6668e9 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -207,7 +207,7 @@ std::shared_ptr< Gdiplus::Bitmap > WinSalBitmap::ImplGetGdiPlusBitmap(const WinS
// use from buffer
aRetval = pSystemDependentData_GdiPlusBitmap->getGdiPlusBitmap();
}
- else if(maSize.Width() > 0 && maSize.Height() > 0)
+ else if(!maSize.IsEmpty())
{
// create and set data
const WinSalBitmap* pAssociatedAlpha(nullptr);
@@ -709,7 +709,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const
HGLOBAL hDIB = nullptr;
- if( rSize.Width() <= 0 || rSize.Height() <= 0 )
+ if( rSize.IsEmpty() )
return hDIB;
// calculate bitmap size in Bytes