[Libreoffice-commits] core.git: sw/inc sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed May 24 06:47:10 UTC 2017
sw/inc/tblenum.hxx | 2 +-
sw/source/core/frmedt/fetab.cxx | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit bfafda5829f75091c9db798f953d617cde688a1f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue May 23 16:58:18 2017 +0200
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 <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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<TableChgWidthHeightType> : is_typed_flags<TableChgWidthHeightType, 0xc00f> {};
}
constexpr TableChgWidthHeightType extractPosition(TableChgWidthHeightType e) {
- return static_cast<TableChgWidthHeightType>(static_cast<int>(e) & 0xf);
+ return static_cast<TableChgWidthHeightType>(static_cast<sal_uInt16>(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()));
More information about the Libreoffice-commits
mailing list