[Libreoffice-commits] core.git: sw/inc sw/source

Mike Kaganski mike.kaganski at collabora.com
Mon Jan 18 00:58:28 PST 2016


 sw/inc/fesh.hxx                     |    1 +
 sw/source/core/frmedt/fews.cxx      |   14 ++++++++++++++
 sw/source/uibase/uiview/viewtab.cxx |    4 ++--
 3 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit b53d426b6faad82f98a26f8a4860218f03691b66
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Sun Dec 20 03:04:54 2015 +1000

    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 at libreoffice.org>
    Reviewed-by: Oliver Specht <oliver.specht at cib.de>

diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 0c3f2ab..e17cab3 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 7c5043f..52de116 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 281a2b5..d751200 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--;


More information about the Libreoffice-commits mailing list