svx/source/sidebar/nbdtmg.cxx | 2 +- sw/source/filter/html/htmlflywriter.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 8ed2142789b3db66c5ab28087040dee7c0ca6341 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Tue Jun 15 15:24:15 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Jun 30 20:56:39 2021 +0200 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.gran...@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lu...@collabora.com> 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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits