[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - include/svx sd/sdi sd/source svx/sdi
Jan Holesovsky
kendy at collabora.com
Wed May 25 11:09:15 UTC 2016
include/svx/svxids.hrc | 6 ++
sd/sdi/tables.sdi | 20 +++++++
sd/source/ui/app/popup.src | 20 +++++++
sd/source/ui/app/popup2_tmpl.src | 20 +++++++
sd/source/ui/table/tableobjectbar.cxx | 44 +++++++++++----
svx/sdi/svx.sdi | 94 ++++++++++++++++++++++++++++++++++
6 files changed, 193 insertions(+), 11 deletions(-)
New commits:
commit 69f9e2a7c807e7e572919152c3db42083322734e
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 d210579..a9d78c4 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -526,6 +526,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/app/popup.src b/sd/source/ui/app/popup.src
index 0a0cbbc..a19c7db 100644
--- a/sd/source/ui/app/popup.src
+++ b/sd/source/ui/app/popup.src
@@ -148,6 +148,16 @@ Menu RID_DRAW_TABLEOBJ_INSIDE_POPUP
};
MenuItem
{
+ Identifier = SID_TABLE_INSERT_ROW_BEFORE ;
+ Text [ en-US ] = "Rows Above" ;
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLE_INSERT_ROW_AFTER ;
+ Text [ en-US ] = "Rows Below" ;
+ };
+ MenuItem
+ {
Identifier = SID_TABLE_INSERT_ROW_DLG;
HelpId = CMD_SID_TABLE_INSERT_ROW_DLG;
Text [ en-US ] = "~Insert...";
@@ -185,6 +195,16 @@ Menu RID_DRAW_TABLEOBJ_INSIDE_POPUP
};
MenuItem
{
+ Identifier = SID_TABLE_INSERT_COL_BEFORE ;
+ Text [ en-US ] = "Columns Left" ;
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLE_INSERT_COL_AFTER ;
+ Text [ en-US ] = "Columns Right" ;
+ };
+ MenuItem
+ {
Identifier = SID_TABLE_INSERT_COL_DLG;
HelpId = CMD_SID_TABLE_INSERT_COL_DLG;
Text [ en-US ] = "~Insert...";
diff --git a/sd/source/ui/app/popup2_tmpl.src b/sd/source/ui/app/popup2_tmpl.src
index 28c858f..b26a61c 100644
--- a/sd/source/ui/app/popup2_tmpl.src
+++ b/sd/source/ui/app/popup2_tmpl.src
@@ -699,6 +699,16 @@
};
MenuItem
{
+ Identifier = SID_TABLE_INSERT_ROW_BEFORE ;
+ Text [ en-US ] = "Rows Above" ;
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLE_INSERT_ROW_AFTER ;
+ Text [ en-US ] = "Rows Below" ;
+ };
+ MenuItem
+ {
Identifier = SID_TABLE_INSERT_ROW_DLG;
HelpId = CMD_SID_TABLE_INSERT_ROW_DLG;
Text [ en-US ] = "~Insert...";
@@ -736,6 +746,16 @@
};
MenuItem
{
+ Identifier = SID_TABLE_INSERT_COL_BEFORE ;
+ Text [ en-US ] = "Columns Left" ;
+ };
+ MenuItem
+ {
+ Identifier = SID_TABLE_INSERT_COL_AFTER ;
+ Text [ en-US ] = "Columns Right" ;
+ };
+ MenuItem
+ {
Identifier = SID_TABLE_INSERT_COL_DLG;
HelpId = CMD_SID_TABLE_INSERT_COL_DLG;
Text [ en-US ] = "~Insert...";
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index 71df3df..b432aa6 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -137,23 +137,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();
- boost::scoped_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : 0);
-
- if( pDlg.get() && (pDlg->Execute() == 1) )
+ boost::scoped_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 6e86950..c9a403a 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -15579,7 +15579,53 @@ SfxVoidItem InsertColumnDialog SID_TABLE_INSERT_COL_DLG
GroupId = GID_TABLE;
]
+SfxVoidItem InsertColumnsBefore SID_TABLE_INSERT_COL_BEFORE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+SfxVoidItem InsertColumnsAfter SID_TABLE_INSERT_COL_AFTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG
()
@@ -15605,6 +15651,54 @@ SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG
GroupId = GID_TABLE;
]
+SfxVoidItem InsertRowsBefore SID_TABLE_INSERT_ROW_BEFORE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+SfxVoidItem InsertRowsAfter SID_TABLE_INSERT_ROW_AFTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
SfxVoidItem PrepareMailExport SID_MAIL_PREPAREEXPORT
()
[
More information about the Libreoffice-commits
mailing list