diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2015-12-20 03:04:54 +1000 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2016-01-18 08:57:59 +0000 |
commit | b53d426b6faad82f98a26f8a4860218f03691b66 (patch) | |
tree | 023d2c6cc1597cb07b624fb783a328928e0d58ff /sw | |
parent | d0054bfd21043a9f48dcb0bb7024edac9c60f453 (diff) |
tdf#96600: use frame RTL property for determining active ruler column
Text direction doesn't necessarily coincide with it
Change-Id: I768208d6c4109d2ccd4fc9e6824f8dbd8eabe76b
Reviewed-on: https://gerrit.libreoffice.org/20820
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/fesh.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 4 |
3 files changed, 17 insertions, 2 deletions
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 0c3f2ab1ae93..e17cab3c8a75 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -755,6 +755,7 @@ public: size_t GetCurMouseTabColNum( const Point &rPt ) const; sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = nullptr ) const; ///< Current outer column. + bool IsColRightToLeft() const; bool IsTableRightToLeft() const; bool IsMouseTableRightToLeft( const Point &rPt ) const; bool IsTableVertical() const; diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 7c5043fa0040..52de1168b99a 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -578,6 +578,20 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) return bRet; } +bool SwFEShell::IsColRightToLeft() const +{ + SwFrame* pFrame = GetCurrFrame(); + while (pFrame) + { + pFrame = pFrame->GetUpper(); + if (pFrame && pFrame->IsColumnFrame()) + { + return pFrame->IsRightToLeft(); + } + } + return false; +} + sal_uInt16 SwFEShell::_GetCurColNum( const SwFrame *pFrame, SwGetCurColNumPara* pPara ) const { diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 281a2b586a8b..d7512009a491 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -1563,7 +1563,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) { SwSectionFormat const *pFormat = pSect->GetFormat(); const SwFormatCol& rCol = pFormat->GetCol(); - if(rSh.IsInRightToLeftText()) + if (rSh.IsColRightToLeft()) nNum = rCol.GetColumns().size() - nNum; else --nNum; @@ -1601,7 +1601,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat() ; const SwFormatCol& rCol = pFormat->GetCol(); - if(rSh.IsInRightToLeftText()) + if (rSh.IsColRightToLeft()) nNum = rCol.GetColumns().size() - nNum; else nNum--; |