summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/svxids.hrc3
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu8
-rw-r--r--sd/sdi/tables.sdi5
-rw-r--r--sd/source/ui/table/tableobjectbar.cxx1
-rw-r--r--svx/sdi/svx.sdi17
-rw-r--r--svx/source/table/tablecontroller.cxx16
6 files changed, 47 insertions, 3 deletions
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 71fc1582981d..7ca9859f544f 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -988,7 +988,8 @@ class SvxSetItem;
#define SID_EDIT_SIGNATURELINE ( SID_SVX_START + 1174 )
#define SID_SIGN_SIGNATURELINE ( SID_SVX_START + 1175 )
#define SID_MEASURE_DLG ( SID_SVX_START + 1176 )
-
+// free slots - available for use
+#define SID_TABLE_DELETE_TABLE ( SID_SVX_START + 1184 )
#define SID_TABLE_MINIMAL_COLUMN_WIDTH ( SID_SVX_START + 1185 )
#define SID_TABLE_MINIMAL_ROW_HEIGHT ( SID_SVX_START + 1186 )
#define SID_TABLE_OPTIMAL_COLUMN_WIDTH ( SID_SVX_START + 1187 )
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 0a0803d950cb..542b1208f00e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -2042,6 +2042,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:DeleteTable" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Delete Table</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:SelectTable" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Select Table</value>
diff --git a/sd/sdi/tables.sdi b/sd/sdi/tables.sdi
index a5918af490db..9943ce719e29 100644
--- a/sd/sdi/tables.sdi
+++ b/sd/sdi/tables.sdi
@@ -113,6 +113,11 @@ shell TableObjectBar
ExecMethod = Execute;
StateMethod = GetState;
]
+ SID_TABLE_DELETE_TABLE
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
SID_TABLE_SELECT_ALL
[
ExecMethod = Execute;
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index 36397fa816e7..433b06522dab 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -180,6 +180,7 @@ void TableObjectBar::Execute( SfxRequest& rReq )
case SID_OPTIMIZE_TABLE:
case SID_TABLE_DELETE_ROW:
case SID_TABLE_DELETE_COL:
+ case SID_TABLE_DELETE_TABLE:
case SID_FORMAT_TABLE_DLG:
case SID_TABLE_INSERT_ROW:
case SID_TABLE_INSERT_COL:
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index e3cbeaa3adfc..8e43464f8b4a 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -11179,6 +11179,23 @@ SfxVoidItem DeleteColumns SID_TABLE_DELETE_COL
GroupId = SfxGroupId::Table;
]
+SfxVoidItem DeleteTable SID_TABLE_DELETE_TABLE
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::Table;
+]
+
SfxVoidItem SelectTable SID_TABLE_SELECT_ALL
()
[
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index d5d0468c530f..48a73e528143 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -471,6 +471,10 @@ void SvxTableController::GetState( SfxItemSet& rSet )
if( !mxTable.is() || !hasSelectedCells() || (!comphelper::LibreOfficeKit::isActive() && mxTable->getColumnCount() <= 1) )
rSet.DisableItem(SID_TABLE_DELETE_COL);
break;
+ case SID_TABLE_DELETE_TABLE:
+ if( !mxTable.is() )
+ rSet.DisableItem(SID_TABLE_DELETE_TABLE);
+ break;
case SID_TABLE_MERGE_CELLS:
if( !mxTable.is() || !hasSelectedCells() )
rSet.DisableItem(SID_TABLE_MERGE_CELLS);
@@ -784,10 +788,17 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
void SvxTableController::onDelete( sal_uInt16 nSId )
{
sdr::table::SdrTableObj* pTableObj = mxTableObj.get();
- if( !pTableObj )
+ if( !pTableObj || !mxTable.is() )
return;
- if( mxTable.is() && hasSelectedCells() )
+ if( nSId == SID_TABLE_DELETE_TABLE )
+ {
+ if( pTableObj->IsTextEditActive() )
+ mrView.SdrEndTextEdit(true);
+
+ mrView.DeleteMarkedObj();
+ }
+ else if( hasSelectedCells() )
{
CellPos aStart, aEnd;
getSelectedCells( aStart, aEnd );
@@ -969,6 +980,7 @@ void SvxTableController::Execute( SfxRequest& rReq )
break;
case SID_TABLE_DELETE_ROW:
case SID_TABLE_DELETE_COL:
+ case SID_TABLE_DELETE_TABLE:
onDelete( nSId );
break;
case SID_TABLE_SELECT_ALL: