diff options
author | Abdulaziz A Alayed <aalayed@kacst.edu.sa> | 2013-09-18 13:18:32 +0300 |
---|---|---|
committer | Abdulaziz A Alayed <aalayed@kacst.edu.sa> | 2013-09-18 13:37:54 +0300 |
commit | d86a72b64f208fe55f302d9fd8a7f578a4275bb8 (patch) | |
tree | 94068463ef70a71006b3d055391c74c5ad7af5c6 /sw | |
parent | 8312c88dd59baf5e7fa88f15abf7f91e8d33defc (diff) |
fdo#69280 fixing comments toggle button position when local
set to RTL language
Change-Id: I0c133e3bbb6801f56e9ac0f508961bfa07a19523
Conflicts:
svtools/source/control/ruler.cxx
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/misc/swruler.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx index 76fb8befc491..f0838f37ac2e 100644 --- a/sw/source/ui/misc/swruler.cxx +++ b/sw/source/ui/misc/swruler.cxx @@ -246,6 +246,7 @@ void SwCommentRuler::UpdateCommentHelpText() // TODO Make Ruler return its central rectangle instead of margins. Rectangle SwCommentRuler::GetCommentControlRegion() { + long nLeft = 0; SwPostItMgr *pPostItMgr = mpViewShell->GetPostItMgr(); //rhbz#1006850 When the SwPostItMgr ctor is called from SwView::SwView it @@ -255,7 +256,10 @@ Rectangle SwCommentRuler::GetCommentControlRegion() return Rectangle(); //FIXME When the page width is larger then screen, the ruler is misplaced by one pixel - long nLeft = GetWinOffset() + GetPageOffset() + mpSwWin->LogicToPixel(Size(GetPageWidth(), 0)).Width(); + if (GetTextRTL()) + nLeft = GetPageOffset() - pPostItMgr->GetSidebarWidth(true) + 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); |