diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-04-02 08:26:42 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-07 09:18:11 +0200 |
commit | 51576ad26a9a9a53383ab0c17fb7e46f586b3a26 (patch) | |
tree | 681f9f141093dbd128b4d4dbb1add2ae457d50a6 /svx/source/svdraw/svdview.cxx | |
parent | cf405bb14c45e4c4fe1be9716f19d40b27605c43 (diff) |
Anz -> Count, and some reformatting.
Change-Id: I6d1b34f12e505a6119394a60f6ce6352c35a7fa0
Diffstat (limited to 'svx/source/svdraw/svdview.cxx')
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index dbfab5ab2e88..89589ba4e1bc 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1246,18 +1246,24 @@ OUString SdrView::GetStatusText() // A little imperfection: // At the end of a line of any multi-line paragraph, we display the // position of the next line of the same paragraph, if there is one. - sal_uInt16 nParaLine=0; - sal_uIntPtr nParaLineAnz=pTextEditOutliner->GetLineCount(aSel.nEndPara); - bool bBrk=false; - while (!bBrk) { - sal_uInt16 nLen=pTextEditOutliner->GetLineLen(aSel.nEndPara,nParaLine); - bool bLastLine=(nParaLine==nParaLineAnz-1); - if (nCol>nLen || (!bLastLine && nCol==nLen)) { - nCol-=nLen; + sal_uInt16 nParaLine = 0; + sal_uIntPtr nParaLineCount = pTextEditOutliner->GetLineCount(aSel.nEndPara); + bool bBrk = false; + while (!bBrk) + { + sal_uInt16 nLen = pTextEditOutliner->GetLineLen(aSel.nEndPara, nParaLine); + bool bLastLine = (nParaLine == nParaLineCount - 1); + if (nCol>nLen || (!bLastLine && nCol == nLen)) + { + nCol -= nLen; nLin++; nParaLine++; - } else bBrk=true; - if (nLen==0) bBrk=true; // to be sure + } + else + bBrk = true; + + if (nLen == 0) + bBrk = true; // to be sure } aStr = aStr.replaceFirst("%1", OUString::number(nPar + 1)); |