Kaydet (Commit) 396f1f14 authored tarafından Philippe Jung's avatar Philippe Jung Kaydeden (comit) Jan Holesovsky

WRITER: readd InsertRows/InsertCols

Following ESC decision, uno commands InsertRows / InsertColumns
must be added to the current one InsertRowsBefore / InsertColumnsBefore
and InsertRowsAfter / InsertColumnsAfter.
This will guarantee ascending compatibility while making more explicit
the behaviour thanks to the new commands.

Change-Id: I31964e3bdfa63b9447edb794fe233e2665651142
Reviewed-on: https://gerrit.libreoffice.org/16098Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst 4b84c8a4
......@@ -1132,6 +1132,15 @@
<value>1</value>
</prop>
</node>
<!-- 2015/06 The next one is to be deprecated one day or another -->
<node oor:name=".uno:InsertRows" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Insert Row Below</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
<node oor:name=".uno:InsertRowsAfter" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Insert Rows Below</value>
......@@ -1162,6 +1171,15 @@
<value>1</value>
</prop>
</node>
<!-- 2015/06 The next one is to be deprecated one day or another -->
<node oor:name=".uno:InsertColumns" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Insert Column Right</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
<node oor:name=".uno:InsertColumnsAfter" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Insert Columns Right</value>
......
......@@ -334,20 +334,22 @@
#define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */
#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* convert text <-> table */
#define FN_TABLE_INSERT_ROW_AFTER (FN_FORMAT + 101) /* */
#define FN_TABLE_INSERT_COL_AFTER (FN_FORMAT + 102) /* */
#define FN_TABLE_INSERT_ROW (FN_FORMAT + 101) /* */
#define FN_TABLE_INSERT_COL (FN_FORMAT + 102) /* */
#define FN_TABLE_DELETE_ROW (FN_FORMAT + 103) /* */
#define FN_TABLE_DELETE_COL (FN_FORMAT + 104) /* */
#define FN_TABLE_SPLIT_CELLS (FN_FORMAT + 105) /* */
#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* */
#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* */
#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* */
#define FN_TABLE_INSERT_ROW_AFTER (FN_FORMAT + 109) /* */
#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem for optimizing tables */
#define FN_TABLE_INSERT_ROW_BEFORE (FN_FORMAT + 111) /* */
#define FN_TABLE_INSERT_COL_BEFORE (FN_FORMAT + 112) /* */
#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* */
#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* */
#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* */
#define FN_TABLE_INSERT_COL_AFTER (FN_FORMAT + 116) /* */
#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* protect table cells */
#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* undo table cell protection */
#define FN_TABLE_HEADLINE_REPEAT (FN_FORMAT + 120) /* also used in SwXTextTable*/
......
......@@ -148,6 +148,14 @@ interface BaseTextTable
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
// 2015/06 Deprecated, replaced by INSERT_COL_AFTER
FN_TABLE_INSERT_COL // status(final|play)
[
ExecMethod = Execute ;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_TABLE_INSERT_COL_AFTER // status(final|play)
[
ExecMethod = Execute ;
......@@ -176,6 +184,14 @@ interface BaseTextTable
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
// 2015/06 Deprecated, replaced by INSERT_ROW_AFTER
FN_TABLE_INSERT_ROW // status(final|play)
[
ExecMethod = Execute ;
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_TABLE_INSERT_ROW_DLG // status(final|play)
[
Export = FALSE ;
......
......@@ -3634,6 +3634,31 @@ SfxVoidItem InsertColumnsBefore FN_TABLE_INSERT_COL_BEFORE
GroupId = GID_TABLE;
]
/* 2015/06 Deprecated, replaced by InsertColumsAfter */
SfxVoidItem InsertColumns FN_TABLE_INSERT_COL
()
[
/* 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 FN_TABLE_INSERT_COL_AFTER
()
[
......@@ -4404,6 +4429,31 @@ SfxVoidItem InsertRowsBefore FN_TABLE_INSERT_ROW_BEFORE
GroupId = GID_TABLE;
]
/* 2015/06 Deprecated, replaced by InsertRowsAfter */
SfxVoidItem InsertRows FN_TABLE_INSERT_ROW
()
[
/* 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 FN_TABLE_INSERT_ROW_AFTER
()
[
......
......@@ -820,13 +820,20 @@ void SwTableShell::Execute(SfxRequest &rReq)
OSL_ENSURE( false, "function may not be called now." );
break;
// 2015/06 The following two are deprecated but kept for ascending
// compatibility
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
// fallback
case FN_TABLE_INSERT_COL_BEFORE:
case FN_TABLE_INSERT_ROW_BEFORE:
case FN_TABLE_INSERT_COL_AFTER:
case FN_TABLE_INSERT_ROW_AFTER:
{
bool bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL_BEFORE
|| rReq.GetSlot() == FN_TABLE_INSERT_COL_AFTER;
|| rReq.GetSlot() == FN_TABLE_INSERT_COL_AFTER
|| rReq.GetSlot() == FN_TABLE_INSERT_COL;
sal_uInt16 nCount = 0;
bool bAfter = true;
if (pItem)
......@@ -860,7 +867,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
nCount = maxY - minY + 1;
}
bAfter = rReq.GetSlot() == FN_TABLE_INSERT_COL_AFTER
|| rReq.GetSlot() == FN_TABLE_INSERT_ROW_AFTER;
|| rReq.GetSlot() == FN_TABLE_INSERT_ROW_AFTER
|| rReq.GetSlot() == FN_TABLE_INSERT_ROW
|| rReq.GetSlot() == FN_TABLE_INSERT_COL;
}
if( nCount )
......@@ -1251,6 +1260,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
}
break;
}
case FN_TABLE_INSERT_ROW:
case FN_TABLE_INSERT_ROW_AFTER:
case FN_TABLE_INSERT_ROW_DLG:
if ( rSh.IsInRepeatedHeadline() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment