summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/tabsh.cxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-10-28 17:11:21 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-11-02 13:25:53 +0100
commitac48a33060304a62372b00bfef08b067cec6ceb6 (patch)
tree2b4612411dcc39b9c766c35a5e7298ed78c7476f /sw/source/uibase/shells/tabsh.cxx
parent5e113259f8382c2d045193abd79267529a6a5f6b (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>
Diffstat (limited to 'sw/source/uibase/shells/tabsh.cxx')
-rw-r--r--sw/source/uibase/shells/tabsh.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 8dd1fbf65297..57e6f99b59ec 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -1129,6 +1129,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;
}
@@ -1416,6 +1428,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();
}