From 419abc4ffda367eb772f506e7c9df80d01a26eb8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 7 Sep 2015 16:46:03 +0200 Subject: 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 --- sdext/source/presenter/PresenterTextView.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index 310427e13ab9..8c426aa86ce5 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)); -- cgit