[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - basctl/source
Ivan Timofeev
timofeev.i.s at gmail.com
Fri Nov 8 15:44:44 CET 2013
basctl/source/basicide/baside2.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 028b550cce4b08b33c9970baf785b6e1bedb4da2
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
(cherry picked from commit 560b27613679d2a3b3ddb89c2afe481bcf2996e3)
Reviewed-on: https://gerrit.libreoffice.org/6615
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 4eb1a924..95ae6e1 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -903,7 +903,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