sc/source/ui/view/output.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit bd88a9ec95bf2eba157bbdd6ccfd72cc468399bf Author: Rafael Lima <rafael.palma.l...@gmail.com> AuthorDate: Tue Jan 9 19:19:38 2024 +0100 Commit: Rafael Lima <rafael.palma.l...@gmail.com> CommitDate: Wed Jan 10 20:29:19 2024 +0100 tdf#159075 Fix drawing comment triangle in Calc Change-Id: I82779ecd3ca4cf7ad95ab8f927c1a5e371613bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161768 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 23f3cecb539f..edad3a96f0b6 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -2519,7 +2519,9 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext) } // DPI/ZOOM 100/100 => 10, 100/50 => 7, 100/150 => 13 // DPI/ZOOM 150/100 => 13, 150/50 => 8.5, 150/150 => 17.5 - const double nSize( rRenderContext.GetDPIScaleFactor() * aZoomX * 6 + 4); + const double fSize(rRenderContext.GetDPIScaleFactor() * aZoomX * 6 + 4); + // Make sure we have an integer size to draw a proper triangle + sal_Int16 nSize = static_cast<sal_Int16>(fSize); Point aPoints[3]; aPoints[0] = Point(nMarkX, nPosY); aPoints[0].setX( bLayoutRTL ? aPoints[0].X() + nSize : aPoints[0].X() - nSize );