[Libreoffice-commits] core.git: sdext/source
Stephan Bergmann
sbergman at redhat.com
Mon Sep 7 07:48:49 PDT 2015
sdext/source/presenter/PresenterTextView.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 419abc4ffda367eb772f506e7c9df80d01a26eb8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Sep 7 16:46:03 2015 +0200
clang-analyzer-deadcode.DeadStores
...the computation of nTop, nBottom was done in this curious way ever since its
inception with 108632dc97a720639df495de3b5d966ee286be95 "CWS-TOOLING: integrate
CWS impressaccessibility3"
Change-Id: Ib516e944d96dc10ff12d0a82c0d8c921b57b0466
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index 310427e..8c426aa 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -961,11 +961,10 @@ awt::Rectangle PresenterTextParagraph::GetCharacterBounds (
nRight = rLine.mnWidth - nLeft;
nLeft = rLine.mnWidth - nOldRight;
}
- double nTop (nY + rCellBox.Y1);
- double nBottom (nY + rCellBox.Y2);
+ double nTop = nY - mnAscent;
+ double nBottom;
if (bCaretBox)
{
- nTop = nTop - rCellBox.Y1 - mnAscent;
nBottom = nTop + mnLineHeight;
if (nCellIndex >= rLine.maCellBoxes.getLength())
nLeft = nRight-2;
@@ -975,7 +974,6 @@ awt::Rectangle PresenterTextParagraph::GetCharacterBounds (
}
else
{
- nTop = nTop - rCellBox.Y1 - mnAscent;
nBottom = nTop + mnAscent + mnDescent;
}
const sal_Int32 nX1 = sal_Int32(floor(nLeft));
More information about the Libreoffice-commits
mailing list