summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
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 /sw/source/filter/html
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 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 424b902a644c..580a07363439 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -685,8 +685,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
(nPercentHeight ? 0
: pFSItem->GetHeight()-aTwipSpc.Height()) );
- OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0,
- "Frame size minus spacing < 0!!!???" );
+ OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing < 0!!!???" );
if( aTwipSz.Width() < 0 )
aTwipSz.setWidth( 0 );
if( aTwipSz.Height() < 0 )
@@ -951,8 +950,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
(nPercentHeight ? 0
: pFSItem->GetHeight()-aTwipSpc.Height()) );
- OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0,
- "Frame size minus spacing < 0!!!???" );
+ OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing < 0!!!???" );
if( aTwipSz.Width() < 0 )
aTwipSz.setWidth( 0 );
if( aTwipSz.Height() < 0 )