summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx2
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx2
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx2
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 947cd4bf4862..efba924622ab 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1577,7 +1577,7 @@ Image AddonsOptions_Impl::ReadImageFromURL(const OUString& aImageURL)
BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
Size aBmpSize = aBitmapEx.GetSizePixel();
- if ( aBmpSize.Width() > 0 && aBmpSize.Height() > 0 )
+ if ( !aBmpSize.IsEmpty() )
{
// Support non-transparent bitmaps to be downward compatible with OOo 1.1.x addons
if( !aBitmapEx.IsTransparent() )
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 924e21c2b3c4..e63466746b44 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2350,7 +2350,7 @@ bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContainerSiz
sal_Int32 nDisplay = xContainerTopWindow->getDisplay();
tools::Rectangle aWorkArea = Application::GetScreenPosSizePixel( nDisplay );
- if (( aWorkArea.GetWidth() > 0 ) && ( aWorkArea.GetHeight() > 0 ))
+ if (!aWorkArea.IsEmpty())
{
if (( rContainerSize.Width > aWorkArea.GetWidth() ) || ( rContainerSize.Height > aWorkArea.GetHeight() ))
return false;
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9bb4c8e2a102..b5418af17d96 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -2479,7 +2479,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn(
aMinSize = static_cast<ToolBox *>(pWindow.get())->CalcMinimumWindowSizePixel();
}
- if (( aMinSize.Width() > 0 ) && ( aMinSize.Height() > 0 ))
+ if ( !aMinSize.IsEmpty() )
{
if ( isHorizontalDockingArea( nDockingArea ))
{
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index 3d9997aaaa57..340999620c68 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -130,7 +130,7 @@ bool ImageButtonToolbarController::ReadImageFromURL( bool bBigImage, const OUStr
const ::Size aSize = bBigImage ? aImageSizeBig : aImageSizeSmall; // Sizes used for toolbar images
::Size aBmpSize = aBitmapEx.GetSizePixel();
- if ( aBmpSize.Width() > 0 && aBmpSize.Height() > 0 )
+ if ( !aBmpSize.IsEmpty() )
{
::Size aNoScaleSize( aBmpSize.Width(), aSize.Height() );
if ( aBmpSize != aNoScaleSize )