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

Noel Grandin noel.grandin at collabora.co.uk
Wed Mar 21 11:33:27 UTC 2018


 sw/source/core/frmedt/fetab.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c6202b2cdacbed5821c8eeec026e9c7d8f69c00e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Mar 20 15:38:21 2018 +0200

    fix bug in SwFEShell::SetColRowWidthHeight
    
    which has been there ever since
    
        commit 84a3db80b4fd66c6854b3135b5f69b61fd828e62
        Date:   Mon Sep 18 23:08:29 2000 +0000
        initial import
    
    since ColLeft==0, the expression "eType & ColLeft" would always evaluate
    to false.
    
    Change-Id: Iab9e96e29b37242ff814f9cd3a7dcf38ac77a223
    Reviewed-on: https://gerrit.libreoffice.org/51644
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 645c353d3fef..4f4f64453f93 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2192,8 +2192,9 @@ void SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16
     const SwFormatFrameSize& rTableFrameSz = pTab->GetFormat()->GetFrameSize();
     SwRectFnSet aRectFnSet(pTab);
     long nPrtWidth = aRectFnSet.GetWidth(pTab->getFramePrintArea());
+    TableChgWidthHeightType eTypePos = extractPosition(eType);
     if( TableChgMode::VarWidthChangeAbs == pTab->GetTable()->GetTableChgMode() &&
-        ( eType & TableChgWidthHeightType::ColLeft || eType & TableChgWidthHeightType::ColRight ) &&
+        ( eTypePos == TableChgWidthHeightType::ColLeft || eTypePos == TableChgWidthHeightType::ColRight ) &&
         text::HoriOrientation::NONE == pTab->GetFormat()->GetHoriOrient().GetHoriOrient() &&
         nPrtWidth != rTableFrameSz.GetWidth() )
     {
@@ -2209,7 +2210,7 @@ void SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16
 
         // we must move the cursor outside the current cell before
         // deleting the cells.
-        switch( extractPosition(eType) )
+        switch( eTypePos )
         {
         case TableChgWidthHeightType::RowTop:
             lcl_GoTableRow( this, true );


More information about the Libreoffice-commits mailing list