sw/source/ui/misc/swruler.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 0b4b02d9b6cf5b939dc1522d8348e3f4d6f955d4 Author: Rodolfo Ribeiro Gomes <rodolf...@gmail.com> Date: Tue Nov 19 00:29:06 2013 -0200 Remove now useless RTL code-comment on SwCommentRuler RTL work was done by someone else. Change-Id: I8b8b923ff3e336427a2dadeccab7c7176d51b2fe Signed-off-by: Rodolfo Ribeiro Gomes <rodolf...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/6716 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx index 914231b..0697639 100644 --- a/sw/source/ui/misc/swruler.cxx +++ b/sw/source/ui/misc/swruler.cxx @@ -241,8 +241,6 @@ void SwCommentRuler::UpdateCommentHelpText() SetQuickHelpText( OUString( SW_RESSTR( nTooltipResId ) ) ); } -// NOTE: If sometime ahead SwSidebar moves from page right side due RTL layout, -// change how this rectangle is used by callers // TODO Make Ruler return its central rectangle instead of margins. Rectangle SwCommentRuler::GetCommentControlRegion() { @@ -255,14 +253,15 @@ Rectangle SwCommentRuler::GetCommentControlRegion() if (!pPostItMgr) return Rectangle(); + unsigned long nSidebarWidth = pPostItMgr->GetSidebarWidth(true); //FIXME When the page width is larger then screen, the ruler is misplaced by one pixel if (GetTextRTL()) - nLeft = GetPageOffset() - pPostItMgr->GetSidebarWidth(true) + GetBorderOffset(); + nLeft = GetPageOffset() - nSidebarWidth + GetBorderOffset(); else nLeft = GetWinOffset() + GetPageOffset() + mpSwWin->LogicToPixel(Size(GetPageWidth(), 0)).Width(); long nTop = 0 + 4; // Ruler::ImplDraw uses RULER_OFF (value: 3px) as offset, and Ruler::ImplFormat adds one extra pixel // Somehow pPostItMgr->GetSidebarBorderWidth() returns border width already doubled - long nRight = nLeft+ pPostItMgr->GetSidebarWidth(true) + pPostItMgr->GetSidebarBorderWidth(true); + long nRight = nLeft + nSidebarWidth + pPostItMgr->GetSidebarBorderWidth(true); long nBottom = nTop + GetRulerVirHeight() - 3; Rectangle aRect(nLeft, nTop, nRight, nBottom);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits