diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-15 17:15:29 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-08-16 09:10:21 +0200 |
commit | 6917ebc39fb1c4f412ae9fea4e2d858a1b351c47 (patch) | |
tree | a605ffb98909babaa89b8ac0bad0d22049bbb379 /basctl/source/basicide/linenumberwindow.cxx | |
parent | Use constants instead of (possibly wrong) magic numbers (diff) | |
download | core-6917ebc39fb1c4f412ae9fea4e2d858a1b351c47.tar.gz core-6917ebc39fb1c4f412ae9fea4e2d858a1b351c47.zip |
sal_uLong to sal_uInt32
Change-Id: Ifcde090747127680a9e4b810ff062d024663632c
Diffstat (limited to 'basctl/source/basicide/linenumberwindow.cxx')
-rw-r--r-- | basctl/source/basicide/linenumberwindow.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index 20689734e1b1..d1b96102adc2 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -59,10 +59,10 @@ void LineNumberWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangl } int startY = txtView->GetStartDocPos().Y(); - int nStartLine = startY / nLineHeight + 1; - int nEndLine = (startY + windowHeight) / nLineHeight + 1; + const sal_uInt32 nStartLine = startY / nLineHeight + 1; + sal_uInt32 nEndLine = (startY + windowHeight) / nLineHeight + 1; - if (txtEngine->GetParagraphCount() + 1 < (unsigned int)nEndLine) + if (txtEngine->GetParagraphCount() + 1 < nEndLine) nEndLine = txtEngine->GetParagraphCount() + 1; // FIXME: it would be best if we could get notified of a font change @@ -71,7 +71,7 @@ void LineNumberWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangl // reserve enough for 3 digit minimum, with a bit to spare for confort m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2; - int i = (nEndLine + 1) / 1000; + sal_uInt32 i = (nEndLine + 1) / 1000; while (i) { i /= 10; @@ -79,7 +79,7 @@ void LineNumberWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangl } sal_Int64 y = (nStartLine - 1) * (sal_Int64)nLineHeight; - for (sal_Int32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight) + for (sal_uInt32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight) rRenderContext.DrawText(Point(0, y - m_nCurYOffset), OUString::number(n)); } |