[Libreoffice-commits] core.git: basctl/source
Ivan Timofeev
timofeev.i.s at gmail.com
Fri Nov 8 01:03:48 PST 2013
basctl/source/basicide/baside2.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 560b27613679d2a3b3ddb89c2afe481bcf2996e3
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Fri Nov 8 12:52:51 2013 +0400
fdo#71306: fix printing from basic ide
regression from e13a3d566ecc34a46e037aca1b2d70e58501e422
Change-Id: I0d734e112038746aa48df669d4b82b644a95c220
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 7080371..0acfe05 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -910,7 +910,9 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
sal_uInt16 nLines = aLine.getLength()/nCharspLine+1;
for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
- OUString aTmpLine = aLine.copy(nLine*nCharspLine, nCharspLine );
+ sal_Int32 nBeginIndex = nLine*nCharspLine;
+ sal_Int32 nCopyCount = std::min<sal_Int32>(nCharspLine, aLine.getLength()-nBeginIndex);
+ OUString aTmpLine = aLine.copy(nBeginIndex, nCopyCount);
aPos.Y() += nLineHeight;
if ( aPos.Y() > ( aPaperSz.Height() + Print::nTopMargin ) )
{
More information about the Libreoffice-commits
mailing list