diff options
author | Rodolfo Ribeiro Gomes <rodolforg@gmail.com> | 2013-11-19 00:29:06 -0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-20 05:34:19 -0600 |
commit | 0b4b02d9b6cf5b939dc1522d8348e3f4d6f955d4 (patch) | |
tree | d4db017a5a4c9e5ed1538f133aee0a6d7dc57970 /sw | |
parent | 7936eddb68691af7bd44c4373b3b000a30847ccd (diff) |
Remove now useless RTL code-comment on SwCommentRuler
RTL work was done by someone else.
Change-Id: I8b8b923ff3e336427a2dadeccab7c7176d51b2fe
Signed-off-by: Rodolfo Ribeiro Gomes <rodolforg@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/6716
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/misc/swruler.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx index 914231b0aff2..06976395b92f 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); |