[Libreoffice-commits] core.git: 16 commits - cui/source
Stephan Bergmann
sbergman at redhat.com
Tue Jan 30 20:15:50 UTC 2018
cui/source/tabpages/numpages.cxx | 60 +++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 30 deletions(-)
New commits:
commit 572301284171ee0503cc7705556eb0286299f5ff
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:43:37 2018 +0100
No apparent reason to limit nTextXPos to sal_uInt16 instead of long
Change-Id: I7142252aa6c42c74c7f2d7407db1cb243090195e
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 7492392a8b45..42324f87b83c 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2428,7 +2428,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
nBulletWidth = nBulletWidth + pVDev->GetTextWidth(aText);
}
- sal_uInt16 nTextXPos( 0 );
+ long nTextXPos( 0 );
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{
nTextXPos = nXStart;
@@ -2443,7 +2443,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
case SvxNumberFormat::LISTTAB:
{
- nTextXPos = static_cast<sal_uInt16>(rFmt.GetListtabPos() / nWidthRelation);
+ nTextXPos = rFmt.GetListtabPos() / nWidthRelation;
if (nTextXPos < nNumberXPos + nBulletWidth)
{
nTextXPos = nNumberXPos + nBulletWidth;
commit ac2fb48f27dcb612c601ed7ac2754f89fd0bf1aa
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:42:33 2018 +0100
No apparent reason to limit nFirstLineOffset to sal_uInt16 instead of long
Change-Id: I988614d5fbdbb439516627aa93327a1d2198e52a
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 1ae07d522ed0..7492392a8b45 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2365,7 +2365,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart;
- sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
+ long nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
if (nFirstLineOffset <= nNumberXPos)
nNumberXPos = nNumberXPos - nFirstLineOffset;
commit 9dba6d07570984ad65652c614e992b1b7fa9fb74
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:41:02 2018 +0100
No apparent reason to limit nXStart to sal_uInt16 instead of long
Change-Id: I19e846905bda86bb00826d337ee681b121c67407
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index e563c60b22cd..1ae07d522ed0 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2357,7 +2357,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[nLevel] = rFmt.GetStart();
- sal_uInt16 nXStart( 0 );
+ long nXStart( 0 );
short nTextOffset( 0 );
long nNumberXPos( 0 );
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
@@ -2458,7 +2458,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
break;
}
- nXStart = static_cast<sal_uInt16>(rFmt.GetIndentAt() / nWidthRelation);
+ nXStart = rFmt.GetIndentAt() / nWidthRelation;
}
::tools::Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2));
commit 0b560a3ac7f66d8ba4140bcd6a8c73a455341eac
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:39:33 2018 +0100
No apparent reason to limit nLineHeight to sal_uInt16 instead of long
Change-Id: I6431da3ff753feadead8f59119f502b54669fdc3
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 4032b4db4016..e563c60b22cd 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2343,7 +2343,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (bPosition)
{
- sal_uInt16 nLineHeight = nFontHeight * 8 / 7;
+ long nLineHeight = nFontHeight * 8 / 7;
sal_uInt8 nStart = 0;
while (!(nActLevel & (1<<nStart)))
{
commit 3e23dc67cfc2d396cf3cbd843d21db40558f5ffa
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:36:41 2018 +0100
No apparent reason to limit nFontHeight to sal_uInt16 instead of long
Change-Id: Id2cf2c667871e551082e00424d36aef481f5819c
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 2441411bbaed..4032b4db4016 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2333,7 +2333,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
aStdFont.SetColor(aTextColor);
aStdFont.SetFillColor(aBackColor);
- sal_uInt16 nFontHeight = nYStep * 6 / 10;
+ long nFontHeight = nYStep * 6 / 10;
if (bPosition)
nFontHeight = nYStep * 15 / 10;
aStdFont.SetFontSize(Size( 0, nFontHeight ));
commit 941593917eda511b2ac39c7f62830d758e378151
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:35:05 2018 +0100
No apparent reason to limit nYStep to sal_uInt16 instead of long
Change-Id: I31ce86926d01e641f517beba3b3a784402ddaa1c
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index bf2c010525f7..2441411bbaed 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2327,7 +2327,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
nXStep /= 2;
long nYStart = 4;
// the whole height mustn't be used for a single level
- sal_uInt16 nYStep = sal::static_int_cast<sal_uInt16>((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5));
+ long nYStep = (aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5);
aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne);
aStdFont.SetColor(aTextColor);
commit 27030debeec1186ec7aa4d3bd16029fc612419aa
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:33:48 2018 +0100
No apparent reason to limit nXStep to sal_uInt16 instead of long
Change-Id: Iee74da2f6e58fa809b068675c250c0445d9adf58
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 8b03a1e23dda..bf2c010525f7 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2322,7 +2322,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
long nWidthRelation = 30; // chapter dialog
// height per level
- sal_uInt16 nXStep = sal::static_int_cast<sal_uInt16>(aSize.Width() / (3 * pActNum->GetLevelCount()));
+ long nXStep = aSize.Width() / (3 * pActNum->GetLevelCount());
if (pActNum->GetLevelCount() < 10)
nXStep /= 2;
long nYStart = 4;
commit 111c4c24becd1c3fe367593df9870e4071495fd1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:31:02 2018 +0100
No apparent reason to limit nYMiddle to sal_uInt16 instead of long
Change-Id: I58958b7c7eae9f764cd88d3c1e3ca175af9fc370
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index c7605255b7cf..8b03a1e23dda 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2511,7 +2511,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
if (rFmt.IsShowSymbol())
{
- sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 );
+ long nYMiddle = nYStart + ( nFontHeight / 2 );
nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation);
nTextOffset = nTextOffset + nXStep;
}
commit d9253918391fab227da4b8a4d5eaee29a3306878
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:30:13 2018 +0100
No apparent reason to limit nXStart to sal_uInt16 instead of long
Change-Id: I6775c36c9b0eb3b1e56968b4ca212fcd43a3be1b
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index f80cd5cc346c..c7605255b7cf 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2485,7 +2485,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart();
- sal_uInt16 nXStart( 0 );
+ long nXStart( 0 );
pVDev->SetFillColor( aBackColor );
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
@@ -2501,7 +2501,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
else
{
- nXStart = static_cast<sal_uInt16>(nTmpXStart);
+ nXStart = nTmpXStart;
}
}
nXStart /= 2;
commit a7a9919b538a5478cfbd2c137a0f80b02b67e136
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:28:47 2018 +0100
No apparent reason to limit nYStart to sal_uInt16 instead of long
Change-Id: I471eca407cb45daba62d679c8c43fb37d98dd762
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 3397b038d9bc..f80cd5cc346c 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2325,7 +2325,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
sal_uInt16 nXStep = sal::static_int_cast<sal_uInt16>(aSize.Width() / (3 * pActNum->GetLevelCount()));
if (pActNum->GetLevelCount() < 10)
nXStep /= 2;
- sal_uInt16 nYStart = 4;
+ long nYStart = 4;
// the whole height mustn't be used for a single level
sal_uInt16 nYStep = sal::static_int_cast<sal_uInt16>((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5));
commit 1ad38d06ea1f5d740851a5eb9497bf1fd8f86e32
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:26:49 2018 +0100
No apparent reason to limit nWidthRelation to sal_uInt16 instead of long
Change-Id: I946e2a74ac5f03132791132e8d5b07d573cb76c5
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 8abeee1c852f..3397b038d9bc 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2319,7 +2319,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (pActNum)
{
- sal_uInt16 nWidthRelation = 30; // chapter dialog
+ long nWidthRelation = 30; // chapter dialog
// height per level
sal_uInt16 nXStep = sal::static_int_cast<sal_uInt16>(aSize.Width() / (3 * pActNum->GetLevelCount()));
commit 97d31dfebc0a06614a8edd0e6123928c5b0fa72e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:23:41 2018 +0100
No apparent reason to limit nYMiddle to sal_uInt16 instead of long
Change-Id: I3c1d082c99af94078a0a1505d3e69368aa5070ab
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 780ba663c216..8abeee1c852f 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2391,7 +2391,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
long nBulletWidth = 0;
if (SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN)))
{
- sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 );
+ long nYMiddle = nYStart + ( nFontHeight / 2 );
nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation) : 0;
}
else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
commit 3426cb606cd22d04af3119cd0628a6f1fbf13cda
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:22:22 2018 +0100
No apparent reason to limit nNumberXPos to sal_uInt16 instead of long
Change-Id: Ic46fbb6ca905cc93943927117aa8c70beebee5a4
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index e1869757cd5e..780ba663c216 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2359,7 +2359,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
sal_uInt16 nXStart( 0 );
short nTextOffset( 0 );
- sal_uInt16 nNumberXPos( 0 );
+ long nNumberXPos( 0 );
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
@@ -2384,7 +2384,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
else
{
- nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos);
+ nNumberXPos = nTmpNumberXPos;
}
}
commit 4c82b221639688f79186487b304d6d9654096470
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:19:33 2018 +0100
No apparent reason to limit nTextOffset to sal_uInt16 instead of long
Change-Id: Idbd4e4aae63441537aff243d852272739b73f78e
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index efbdbb233499..e1869757cd5e 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2506,13 +2506,13 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
nXStart /= 2;
nXStart += 2;
- sal_uInt16 nTextOffset = 2 * nXStep;
+ long nTextOffset = 2 * nXStep;
if (SVX_NUM_BITMAP == (rFmt.GetNumberingType()&(~LINK_TOKEN)))
{
if (rFmt.IsShowSymbol())
{
sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 );
- nTextOffset = static_cast<sal_uInt16>(lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation));
+ nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation);
nTextOffset = nTextOffset + nXStep;
}
}
@@ -2520,7 +2520,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
if (rFmt.IsShowSymbol())
{
- nTextOffset = static_cast<sal_uInt16>(lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetFontSize()));
+ nTextOffset = lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetFontSize());
nTextOffset = nTextOffset + nXStep;
}
}
@@ -2540,7 +2540,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
OUString aText(pActNum->MakeNumString(aNum));
pVDev->DrawText(Point(nXStart, nYStart), aText);
pVDev->SetFont(aStdFont);
- nTextOffset = static_cast<sal_uInt16>(pVDev->GetTextWidth(aText));
+ nTextOffset = pVDev->GetTextWidth(aText);
nTextOffset = nTextOffset + nXStep;
nPreNum++;
}
commit 5925684856efcc16d7d8a284c236d43ae21599f8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:17:18 2018 +0100
No apparent reason to limit nBulletWidth to sal_uInt16 instead of long
Change-Id: I7ce0705e9edd5cff4e6c6977909d7e903f6e1765
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 8cff042ae4e5..efbdbb233499 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2388,15 +2388,15 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
}
- sal_uInt16 nBulletWidth = 0;
+ long nBulletWidth = 0;
if (SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN)))
{
sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 );
- nBulletWidth = rFmt.IsShowSymbol() ? static_cast<sal_uInt16>(lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation)) : 0;
+ nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation) : 0;
}
else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
{
- nBulletWidth = rFmt.IsShowSymbol() ? static_cast<sal_uInt16>(lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetFontSize())) : 0;
+ nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetFontSize()) : 0;
}
else
{
@@ -2416,7 +2416,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
pVDev->SetFont(aColorFont);
pVDev->DrawText(Point(nNumberXPos, nYStart), aText);
pVDev->SetFont(aSaveFont);
- nBulletWidth = sal_uInt16(pVDev->GetTextWidth(aText));
+ nBulletWidth = pVDev->GetTextWidth(aText);
nPreNum++;
}
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT &&
@@ -2425,7 +2425,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
pVDev->SetFont(aStdFont);
OUString aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = nBulletWidth + static_cast<sal_uInt16>(pVDev->GetTextWidth(aText));
+ nBulletWidth = nBulletWidth + pVDev->GetTextWidth(aText);
}
sal_uInt16 nTextXPos( 0 );
commit 26138fa6815b840462983a818ce4232b287142bb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 30 17:07:01 2018 +0100
Move long vs. sal_uInt16 mismatch out of lcl_Draw{Graphic,Bullet}
...in preparation of getting rid of the mismatch
Change-Id: I650a94ec043c4ce2763070a3441f08c0a77e7c73
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index bafe79ca8fd2..8cff042ae4e5 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2229,11 +2229,11 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl( Edit* pEdit )
SetModified();
}
-static sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sal_uInt16 nXStart,
- sal_uInt16 nYMiddle, sal_uInt16 nDivision)
+static long lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, long nXStart,
+ long nYMiddle, long nDivision)
{
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
- sal_uInt16 nRet = 0;
+ long nRet = 0;
if(pBrushItem)
{
const Graphic* pGrf = pBrushItem->GetGraphic();
@@ -2241,7 +2241,7 @@ static sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &r
{
Size aGSize( rFmt.GetGraphicSize() );
aGSize.Width() /= nDivision;
- nRet = static_cast<sal_uInt16>(aGSize.Width());
+ nRet = aGSize.Width();
aGSize.Height() /= nDivision;
pGrf->Draw( pVDev, Point(nXStart,nYMiddle - ( aGSize.Height() / 2) ),
pVDev->PixelToLogic( aGSize ) );
@@ -2251,9 +2251,9 @@ static sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &r
}
-static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
- const SvxNumberFormat& rFmt, sal_uInt16 nXStart,
- sal_uInt16 nYStart, const Size& rSize)
+static long lcl_DrawBullet(VirtualDevice* pVDev,
+ const SvxNumberFormat& rFmt, long nXStart,
+ long nYStart, const Size& rSize)
{
vcl::Font aTmpFont(pVDev->GetFont());
@@ -2280,7 +2280,7 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
long nY = nYStart;
nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
pVDev->DrawText( Point(nXStart, nY), aText );
- sal_uInt16 nRet = static_cast<sal_uInt16>(pVDev->GetTextWidth(aText));
+ long nRet = pVDev->GetTextWidth(aText);
pVDev->SetFont(aTmpFont);
return nRet;
@@ -2392,11 +2392,11 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN)))
{
sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 );
- nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation) : 0;
+ nBulletWidth = rFmt.IsShowSymbol() ? static_cast<sal_uInt16>(lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation)) : 0;
}
else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
{
- nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetFontSize()) : 0;
+ nBulletWidth = rFmt.IsShowSymbol() ? static_cast<sal_uInt16>(lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetFontSize())) : 0;
}
else
{
@@ -2512,7 +2512,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (rFmt.IsShowSymbol())
{
sal_uInt16 nYMiddle = nYStart + ( nFontHeight / 2 );
- nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation);
+ nTextOffset = static_cast<sal_uInt16>(lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation));
nTextOffset = nTextOffset + nXStep;
}
}
@@ -2520,7 +2520,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
if (rFmt.IsShowSymbol())
{
- nTextOffset = lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetFontSize());
+ nTextOffset = static_cast<sal_uInt16>(lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetFontSize()));
nTextOffset = nTextOffset + nXStep;
}
}
More information about the Libreoffice-commits
mailing list