From bfafda5829f75091c9db798f953d617cde688a1f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 May 2017 16:58:18 +0200 Subject: tdf#107866 - Changing table column width with Alt+arrow key strokes is broken regression from commit 890d6790715c4c3f3565b476d538643f04dc6936 "convert TableChgWidthHeightType to o3tl::typed_flags" Change-Id: Ia1c3ec09d23ffe502dd8cb0ab673e45935bd4909 Reviewed-on: https://gerrit.libreoffice.org/37956 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/inc/tblenum.hxx | 2 +- sw/source/core/frmedt/fetab.cxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx index 327d0ea52e37..bf9570f17fec 100644 --- a/sw/inc/tblenum.hxx +++ b/sw/inc/tblenum.hxx @@ -45,7 +45,7 @@ namespace o3tl { template<> struct typed_flags : is_typed_flags {}; } constexpr TableChgWidthHeightType extractPosition(TableChgWidthHeightType e) { - return static_cast(static_cast(e) & 0xf); + return static_cast(static_cast(e) & 0xf); } enum class TableChgMode diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 62e84aaeef01..3162adff5e6d 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -2190,7 +2190,8 @@ bool SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 pTab->GetFormat()->SetFormatAttr( aSz ); } - if( eType & (TableChgWidthHeightType::BiggerMode | TableChgWidthHeightType::InsertDeleteMode) ) + if( extractPosition(eType) == TableChgWidthHeightType::ColLeft && + (eType & (TableChgWidthHeightType::BiggerMode | TableChgWidthHeightType::InsertDeleteMode)) ) { nDiff = sal_uInt16(aRectFnSet.GetWidth(pFrame->Frame())); -- cgit