summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdview.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-04-02 08:26:42 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-07 09:18:11 +0200
commit51576ad26a9a9a53383ab0c17fb7e46f586b3a26 (patch)
tree681f9f141093dbd128b4d4dbb1add2ae457d50a6 /svx/source/svdraw/svdview.cxx
parentcf405bb14c45e4c4fe1be9716f19d40b27605c43 (diff)
Anz -> Count, and some reformatting.
Change-Id: I6d1b34f12e505a6119394a60f6ce6352c35a7fa0
Diffstat (limited to 'svx/source/svdraw/svdview.cxx')
-rw-r--r--svx/source/svdraw/svdview.cxx26
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));