cui/source/tabpages/numpages.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 3e1b9212ad4f8d82b6110a525811482a99f6e112 Author: Mark Vecsernyes <kurta...@gmail.com> Date: Wed Nov 15 14:59:14 2017 +0100 tdf#111740 Wrong preview of graphic bullet symbol in Impress Change-Id: I9e713163395852478e233227440a802c255b3070 Reviewed-on: https://gerrit.libreoffice.org/44762 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 5402b7ae1ba5..6a6d4e98b009 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2233,7 +2233,7 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl( Edit* pEdit ) } static sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sal_uInt16 nXStart, - sal_uInt16 nYStart, sal_uInt16 nDivision) + sal_uInt16 nYMiddle, sal_uInt16 nDivision) { const SvxBrushItem* pBrushItem = rFmt.GetBrush(); sal_uInt16 nRet = 0; @@ -2246,7 +2246,7 @@ static sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &r aGSize.Width() /= nDivision; nRet = (sal_uInt16)aGSize.Width(); aGSize.Height() /= nDivision; - pGrf->Draw( pVDev, Point(nXStart,nYStart), + pGrf->Draw( pVDev, Point(nXStart,nYMiddle - ( aGSize.Height() / 2) ), pVDev->PixelToLogic( aGSize ) ); } } @@ -2394,7 +2394,8 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool sal_uInt16 nBulletWidth = 0; if (SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN))) { - nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYStart, nWidthRelation) : 0; + sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 ); + nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation) : 0; } else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType()) { @@ -2513,7 +2514,8 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool { if (rFmt.IsShowSymbol()) { - nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYStart, nWidthRelation); + sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 ); + nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation); nTextOffset = nTextOffset + nXStep; } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits