summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Vecsernyes <kurtaazz@gmail.com>2017-11-15 14:59:14 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-11-16 22:36:12 +0100
commit3e1b9212ad4f8d82b6110a525811482a99f6e112 (patch)
tree9922a1463453f51386114929bc19c9c93a1e31b9
parentd0c4cee7e5ad00363d264aec0011a4b07983b19d (diff)
tdf#111740 Wrong preview of graphic bullet symbol in Impress
Change-Id: I9e713163395852478e233227440a802c255b3070 Reviewed-on: https://gerrit.libreoffice.org/44762 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r--cui/source/tabpages/numpages.cxx10
1 files changed, 6 insertions, 4 deletions
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;
}
}