diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-10-28 17:11:21 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-04 17:52:25 +0100 |
commit | e300e4382b89e180dbb30cbf7d77c48a77a94af1 (patch) | |
tree | 30d518ba365b6e5c48f8949b6e508554b90a8ae9 /sw/source/uibase/shells | |
parent | 9a0982e06cb5a49af5057398b881d2e74dd10fc0 (diff) |
Table panel: Implement functionality of Column Width spinbutton
Change-Id: I809cfe4af82cebabe80c171cdd488ff43d749a86
Reviewed-on: https://gerrit.libreoffice.org/81895
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit ac48a33060304a62372b00bfef08b067cec6ceb6)
Reviewed-on: https://gerrit.libreoffice.org/82026
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r-- | sw/source/uibase/shells/tabsh.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index b719c989ff8f..8a380d6d325c 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -1120,6 +1120,18 @@ void SwTableShell::Execute(SfxRequest &rReq) } return; } + case SID_ATTR_TABLE_COLUMN_WIDTH: + { + const SfxUInt32Item* pItem2 = rReq.GetArg<SfxUInt32Item>(SID_ATTR_TABLE_COLUMN_WIDTH); + if (pItem2) + { + long nNewWidth = pItem2->GetValue(); + SwTableFUNC aFunc( &rSh ); + aFunc.InitTabCols(); + aFunc.SetColWidth(aFunc.GetCurColNum(), nNewWidth); + } + return; + } default: bMore = true; } @@ -1407,6 +1419,16 @@ void SwTableShell::GetState(SfxItemSet &rSet) } break; } + case SID_ATTR_TABLE_COLUMN_WIDTH: + { + SfxUInt32Item aColumnWidth(SID_ATTR_TABLE_COLUMN_WIDTH); + SwTableFUNC aFunc( &rSh ); + aFunc.InitTabCols(); + SwTwips nWidth = aFunc.GetColWidth(aFunc.GetCurColNum()); + aColumnWidth.SetValue(nWidth); + rSet.Put(aColumnWidth); + break; + } } nSlot = aIter.NextWhich(); } |