diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-02-03 15:03:50 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-02-03 16:48:27 +0100 |
commit | 00db5444b2126dbf48a7ef65e702dd4b10d4f941 (patch) | |
tree | df8d6d4458f1544433399b146f36e5738f896207 /sw | |
parent | f92e4bed51de1625bc8fba2d7a432420db6841d0 (diff) |
tdf#128468: Add new UNO command "MoveTabstop"
Work in progress. Implementation still incomplete.
The stuff I added in the .sdi files is mostly copy-paste without any
deeper understanding.
Change-Id: Iad36c20e963c9df19645a04ca4a0d9bf81f3839a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87873
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/cmdid.h | 3 | ||||
-rw-r--r-- | sw/sdi/_textsh.sdi | 6 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 17 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 10 |
4 files changed, 35 insertions, 1 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 2cdf32150685..c901e8304506 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -464,7 +464,8 @@ #define FN_FORMAT_APPLY_DEFAULT (FN_FORMAT2 + 157) #define FN_FORMAT_APPLY_TEXTBODY (FN_FORMAT2 + 158) #define FN_REMOVE_DIRECT_CHAR_FORMATS (FN_FORMAT2 + 159) -//free (160) + +#define FN_MOVE_TABSTOP (FN_FORMAT2 + 160) // Region: Extras #define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* */ diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 1e22b0e43b02..6171ffdc5a74 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -1545,6 +1545,12 @@ interface BaseText DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] + FN_MOVE_TABSTOP + [ + ExecMethod = Execute ; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] + SID_TRANSLITERATE_SENTENCE_CASE [ ExecMethod = ExecTransliteration; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index ec88a83c952d..64e08b17725f 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -7826,3 +7826,20 @@ SfxUInt32Item TableColumWidth SID_ATTR_TABLE_COLUMN_WIDTH ToolBoxConfig = FALSE, GroupId = SfxGroupId::Table; ] + +SfxVoidItem MoveTabstop FN_MOVE_TABSTOP +(SfxInt32Item Tabstop FN_PARAM_1, SfxInt32Item Amount FN_PARAM_2) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Format; +] diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index d69e47c6ebd9..2ce3d6c7bbb8 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1565,6 +1565,16 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.SetInsMode( bOldIns ); } break; + case FN_MOVE_TABSTOP: + { + const SfxInt32Item* pIndex = rReq.GetArg<SfxInt32Item>(FN_PARAM_1); + const SfxInt32Item* pAmount = rReq.GetArg<SfxInt32Item>(FN_PARAM_2); + if (!pIndex || !pAmount) + break; + SAL_INFO("sw.ui", "MoveTabstop(" << pIndex->GetValue() << "," << pAmount->GetValue() << ")"); + // To be implemented + } + break; default: OSL_ENSURE(false, "wrong dispatcher"); return; |