hwpfilter/source/hwpreader.cxx | 20 ++++++++++---------- vcl/source/gdi/metaact.cxx | 3 +++ 2 files changed, 13 insertions(+), 10 deletions(-)
New commits: commit 560f0f10a137f98ed2204bf8e00f892333d2dae8 Author: Caolán McNamara <[email protected]> AuthorDate: Sun May 26 12:39:51 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun May 26 15:41:55 2024 +0200 ofz#69256 Integer-overflow Change-Id: I564635a52282ee632a0c028199ec86dd4bff99a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168044 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 19ab84ff6c23..944a1e114128 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -372,6 +372,9 @@ MetaArcAction::MetaArcAction( const tools::Rectangle& rRect, void MetaArcAction::Execute( OutputDevice* pOut ) { + if (!AllowRect(pOut->LogicToPixel(maRect))) + return; + pOut->DrawArc( maRect, maStartPt, maEndPt ); } commit fda349ab8e834578fbefe9e9407d006eec47c7cd Author: Caolán McNamara <[email protected]> AuthorDate: Sun May 26 12:35:19 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun May 26 15:41:47 2024 +0200 ofz#69246 Integer-overflow WTMM takes/returns a double anyway, so just promote earlier Change-Id: I055fa7e7b155abfd15ef51335b34c2e6cfa8a209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168043 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 63b5571b6fe2..2921ef5ff2f0 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -2013,19 +2013,19 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle) OUString::createFromAscii(ArrowShape[hdo->property.line_tstyle].name) ); if( hdo->property.line_width > 100 ) mxList->addAttribute(u"draw:marker-start-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 3)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 3.0)) + "mm"); else if( hdo->property.line_width > 80 ) mxList->addAttribute(u"draw:marker-start-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 4)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 4.0)) + "mm"); else if( hdo->property.line_width > 60 ) mxList->addAttribute(u"draw:marker-start-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 5)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 5.0)) + "mm"); else if( hdo->property.line_width > 40 ) mxList->addAttribute(u"draw:marker-start-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 6)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 6.0)) + "mm"); else mxList->addAttribute(u"draw:marker-start-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 7)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 7.0)) + "mm"); } if( hdo->property.line_hstyle > 0 && @@ -2035,19 +2035,19 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle) OUString::createFromAscii(ArrowShape[hdo->property.line_hstyle].name) ); if( hdo->property.line_width > 100 ) mxList->addAttribute(u"draw:marker-end-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 3)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 3.0)) + "mm"); else if( hdo->property.line_width > 80 ) mxList->addAttribute(u"draw:marker-end-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 4)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 4.0)) + "mm"); else if( hdo->property.line_width > 60 ) mxList->addAttribute(u"draw:marker-end-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 5)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 5.0)) + "mm"); else if( hdo->property.line_width > 40 ) mxList->addAttribute(u"draw:marker-end-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 6)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 6.0)) + "mm"); else mxList->addAttribute(u"draw:marker-end-width"_ustr, sXML_CDATA, - OUString::number( WTMM(hdo->property.line_width * 7)) + "mm"); + OUString::number( WTMM(hdo->property.line_width * 7.0)) + "mm"); } }
