[Libreoffice-commits] core.git: include/svx sd/sdi sd/source svx/sdi
Jan Holesovsky
kendy at collabora.com
Wed May 25 13:30:08 UTC 2016
include/svx/svxids.hrc | 6 ++
sd/sdi/tables.sdi | 20 ++++++++
sd/source/ui/table/tableobjectbar.cxx | 44 ++++++++++++++-----
svx/sdi/svx.sdi | 78 ++++++++++++++++++++++++++++++++++
4 files changed, 137 insertions(+), 11 deletions(-)
New commits:
commit 99b8598495ba76e8fd32af2ace17e0b29b3beffd
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed May 25 13:05:42 2016 +0200
sd bccu#1840: .uno: commands for inserting rows / columns in Impress.
Change-Id: Ic07722c3e1f75d909ec8f123919a1898dfde05b0
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 39ef138..340fc61 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -529,6 +529,12 @@
#define SID_RULER_PROTECT ( SID_SVX_START + 415 )
#define SID_COLOR_CONTROL ( SID_SVX_START + 417 )
+
+#define SID_TABLE_INSERT_COL_BEFORE ( SID_SVX_START + 418 )
+#define SID_TABLE_INSERT_COL_AFTER ( SID_SVX_START + 419 )
+#define SID_TABLE_INSERT_ROW_BEFORE ( SID_SVX_START + 420 )
+#define SID_TABLE_INSERT_ROW_AFTER ( SID_SVX_START + 421 )
+
#define SID_ATTR_3D_INTERN ( SID_SVX_START + 422 )
#define SID_PSZ_FUNCTION ( SID_SVX_START + 423 )
diff --git a/sd/sdi/tables.sdi b/sd/sdi/tables.sdi
index 0d3eb62..4e234a7 100644
--- a/sd/sdi/tables.sdi
+++ b/sd/sdi/tables.sdi
@@ -83,11 +83,31 @@ shell TableObjectBar
ExecMethod = Execute;
StateMethod = GetState;
]
+ SID_TABLE_INSERT_ROW_BEFORE
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+ SID_TABLE_INSERT_ROW_AFTER
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
SID_TABLE_INSERT_COL_DLG
[
ExecMethod = Execute;
StateMethod = GetState;
]
+ SID_TABLE_INSERT_COL_BEFORE
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+ SID_TABLE_INSERT_COL_AFTER
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
SID_TABLE_DELETE_ROW
[
ExecMethod = Execute;
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index c31ba01..ded39a1 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -134,23 +134,45 @@ void TableObjectBar::Execute( SfxRequest& rReq )
switch( nSlotId )
{
case SID_TABLE_INSERT_ROW_DLG:
+ case SID_TABLE_INSERT_ROW_BEFORE:
+ case SID_TABLE_INSERT_ROW_AFTER:
case SID_TABLE_INSERT_COL_DLG:
+ case SID_TABLE_INSERT_COL_BEFORE:
+ case SID_TABLE_INSERT_COL_AFTER:
{
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : nullptr);
-
- if( pDlg.get() && (pDlg->Execute() == 1) )
+ std::unique_ptr<SvxAbstractInsRowColDlg> pDlg;
+ if (nSlotId == SID_TABLE_INSERT_ROW_DLG || nSlotId == SID_TABLE_INSERT_COL_DLG)
{
- if( nSlotId == SID_TABLE_INSERT_ROW_DLG )
- nSlotId = SID_TABLE_INSERT_ROW;
- else
- nSlotId = SID_TABLE_INSERT_COL;
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ pDlg.reset(pFact ? pFact->CreateSvxInsRowColDlg(mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : nullptr);
+
+ if (!pDlg.get() || (pDlg->Execute() != 1))
+ break;
+ }
- rReq.AppendItem( SfxInt16Item( (sal_uInt16)nSlotId, (sal_uInt16)pDlg->getInsertCount() ) );
- rReq.AppendItem( SfxBoolItem( SID_TABLE_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() ) );
+ sal_uInt16 nCount = 1;
+ bool bInsertAfter = (nSlotId == SID_TABLE_INSERT_ROW_AFTER) || (nSlotId == SID_TABLE_INSERT_COL_AFTER);
- rReq.SetSlot( (sal_uInt16)nSlotId );
+ if (nSlotId == SID_TABLE_INSERT_ROW_DLG)
+ {
+ nCount = pDlg->getInsertCount();
+ bInsertAfter = !pDlg->isInsertBefore();
}
+ else if (nSlotId == SID_TABLE_INSERT_COL_DLG)
+ {
+ nCount = pDlg->getInsertCount();
+ bInsertAfter = !pDlg->isInsertBefore();
+ }
+
+ if (nSlotId == SID_TABLE_INSERT_ROW_DLG || nSlotId == SID_TABLE_INSERT_ROW_BEFORE || nSlotId == SID_TABLE_INSERT_ROW_AFTER)
+ nSlotId = SID_TABLE_INSERT_ROW;
+ else
+ nSlotId = SID_TABLE_INSERT_COL;
+
+ rReq.AppendItem(SfxInt16Item((sal_uInt16)nSlotId, nCount));
+ rReq.AppendItem(SfxBoolItem(SID_TABLE_PARAM_INSERT_AFTER, bInsertAfter));
+
+ rReq.SetSlot( (sal_uInt16)nSlotId );
}
}
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 5590a464..f9667eb 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -11312,7 +11312,45 @@ SfxVoidItem InsertColumnDialog SID_TABLE_INSERT_COL_DLG
GroupId = GID_TABLE;
]
+SfxVoidItem InsertColumnsBefore SID_TABLE_INSERT_COL_BEFORE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+SfxVoidItem InsertColumnsAfter SID_TABLE_INSERT_COL_AFTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG
()
@@ -11332,6 +11370,46 @@ SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG
GroupId = GID_TABLE;
]
+SfxVoidItem InsertRowsBefore SID_TABLE_INSERT_ROW_BEFORE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+SfxVoidItem InsertRowsAfter SID_TABLE_INSERT_ROW_AFTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
SfxVoidItem PrepareMailExport SID_MAIL_PREPAREEXPORT
()
[
More information about the Libreoffice-commits
mailing list