summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-06-15 15:24:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-30 20:56:39 +0200
commit8ed2142789b3db66c5ab28087040dee7c0ca6341 (patch)
tree42bd3e07401088650bcb37b97c5c40cf16b66653
parent94678a7b9c6b7e577c15adacc885e03551bcf17b (diff)
fix a size warning
d7855213ae60d79f converted this incorrectly, the code right above may set the size as (0,0), and before the commit the invalid size was only negative. Change-Id: I198d025f5c02780ae509f97782bc41ac77fa3407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117376 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--svx/source/sidebar/nbdtmg.cxx2
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 76d1004e61dc..3c744fbf97b4 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -852,7 +852,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1
const Graphic* pGrf = pLevelSettings->pBrushItem->GetGraphic();
Size aSize = pLevelSettings->aSize;
sal_Int16 eOrient = text::VertOrientation::LINE_CENTER;
- if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0))\
+ if (!isResetSize && aFmt.GetGraphicSize()!=Size(0,0))
aSize = aFmt.GetGraphicSize();
else if (aSize.IsEmpty() && pGrf)
aSize = SvxNumberFormat::GetGraphicSizeMM100( pGrf );
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 472f406c28c6..bc065a7d64c0 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -685,7 +685,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
(nPercentHeight ? 0
: pFSItem->GetHeight()-aTwipSpc.Height()) );
- OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing < 0!!!???" );
+ OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, "Frame size minus spacing < 0!!!???" );
if( aTwipSz.Width() < 0 )
aTwipSz.setWidth( 0 );
if( aTwipSz.Height() < 0 )
@@ -964,7 +964,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
(nPercentHeight ? 0
: pFSItem->GetHeight()-aTwipSpc.Height()) );
- OSL_ENSURE( !aTwipSz.IsEmpty(), "Frame size minus spacing < 0!!!???" );
+ OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, "Frame size minus spacing < 0!!!???" );
if( aTwipSz.Width() < 0 )
aTwipSz.setWidth( 0 );
if( aTwipSz.Height() < 0 )