summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/control/thumbnailview.cxx4
-rw-r--r--sfx2/source/doc/new.cxx2
-rw-r--r--sfx2/source/doc/objcont.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index fda8a28dc7ad..f3488e417f84 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -207,7 +207,7 @@ void ThumbnailView::DrawItem(ThumbnailViewItem const *pItem)
{
::tools::Rectangle aRect = pItem->getDrawArea();
- if ((aRect.GetHeight() > 0) && (aRect.GetWidth() > 0))
+ if (!aRect.IsEmpty())
Invalidate(aRect);
}
}
@@ -1382,7 +1382,7 @@ void SfxThumbnailView::DrawItem(ThumbnailViewItem const *pItem)
{
::tools::Rectangle aRect = pItem->getDrawArea();
- if ((aRect.GetHeight() > 0) && (aRect.GetWidth() > 0))
+ if (!aRect.IsEmpty())
Invalidate(aRect);
}
}
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index ff892863dd0d..8af946eeab82 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -58,7 +58,7 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFil
rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize()));
Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1, 1);
- DBG_ASSERT(aTmpSize.Height() != 0 && aTmpSize.Width() != 0, "size of first page is 0, override GetFirstPageSize or set visible-area!");
+ DBG_ASSERT(!aTmpSize.IsEmpty(), "size of first page is 0, override GetFirstPageSize or set visible-area!");
#define FRAME 4
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 17f3f1263404..8bdafbc3a5c8 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -131,7 +131,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( bool bFullContent ) const
}
xFile->SetPrefSize( aTmpSize );
- DBG_ASSERT( aTmpSize.Height() != 0 && aTmpSize.Width() != 0,
+ DBG_ASSERT( !aTmpSize.IsEmpty(),
"size of first page is 0, override GetFirstPageSize or set visible-area!" );
xFile->Record( pDevice );