Kaydet (Commit) d86a72b6 authored tarafından Abdulaziz A Alayed's avatar Abdulaziz A Alayed

fdo#69280 fixing comments toggle button position when local

set to RTL language

Change-Id: I0c133e3bbb6801f56e9ac0f508961bfa07a19523

Conflicts:
	svtools/source/control/ruler.cxx
üst 8312c88d
......@@ -808,7 +808,7 @@ public:
const Link& GetExtraDownHdl() const { return maExtraDownHdl; }
void SetTextRTL(sal_Bool bRTL);
bool GetTextRTL();
void SetCharWidth( long nWidth ) { mnCharWidth = nWidth ; }
void SetLineHeight( long nHeight ) { mnLineHeight = nHeight ; }
......
......@@ -2728,7 +2728,6 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Color &rFillColor, const Point
ImplDrawRulerTab( pDevice, aPos, nTabStyle, nStyle );
pDevice->Pop();
}
void Ruler::SetTextRTL(sal_Bool bRTL)
{
if(mpData->bTextRTL != (bool) bRTL)
......@@ -2770,6 +2769,11 @@ long Ruler::GetRulerVirHeight() const
return mnVirHeight;
}
bool Ruler::GetTextRTL()
{
return mpData->bTextRTL;
}
RulerUnitData Ruler::GetCurrentRulerUnit() const
{
return aImplRulerUnitTab[mnUnitIndex];
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment