diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2021-05-23 11:22:57 +0300 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-06-02 16:13:24 +0200 |
commit | 487dbbb69bfcf7c0368e9dc17e5aae1f17f8187f (patch) | |
tree | 2425ed9e8cc50e327881c73ee3257c82fb8f8032 /cui | |
parent | 89c01a87d55596f9c3b3c1ccabf7ef307edd9436 (diff) |
tdf#116491: Customize: Add indication for experimental commands
Change-Id: Id485f86598aa89cbce6d742c0207c178e5208ee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116014
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Diffstat (limited to 'cui')
-rw-r--r-- | cui/inc/strings.hrc | 1 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index 9ee8d66b2e89..2e6b1276739e 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -380,6 +380,7 @@ #define RID_SVXSTR_COMMANDLABEL NC_("RID_SVXSTR_COMMANDLABEL", "Label") #define RID_SVXSTR_COMMANDNAME NC_("RID_SVXSTR_COMMANDLABEL", "Command") #define RID_SVXSTR_COMMANDTIP NC_("RID_SVXSTR_COMMANDLABEL", "Tooltip") +#define RID_SVXSTR_COMMANDEXPERIMENTAL NC_("RID_SVXSTR_COMMANDEXPERIMENTAL", "Experimental") #define RID_SVXSTR_QRCODEDATALONG NC_("RID_SVXSTR_QRCODEDATALONG", "The URL or text is too long for the current error correction level. Either shorten the text or decrease the correction level.") #define RID_SVXSTR_DELETEUSERCOLOR1 NC_("RID_SVXSTR_DELETEUSERCOLOR1", "You can only delete user-defined colors") diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index ef65977d3382..25f973016043 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -88,6 +88,7 @@ #include <comphelper/documentinfo.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/processfactory.hxx> +#include <officecfg/Office/Common.hxx> namespace uno = com::sun::star::uno; namespace frame = com::sun::star::frame; @@ -1620,10 +1621,17 @@ IMPL_LINK_NOARG(SvxConfigPage, SelectFunctionHdl, weld::TreeView&, void) SfxGroupInfo_Impl *pData = reinterpret_cast<SfxGroupInfo_Impl*>(m_xFunctions->get_selected_id().toInt64()); if (pData) { + bool bIsExperimental + = vcl::CommandInfoProvider::IsExperimental(pData->sCommand, m_aModuleId); + + OUString aExperimental = "\n" + CuiResId(RID_SVXSTR_COMMANDEXPERIMENTAL); OUString aLabel = CuiResId(RID_SVXSTR_COMMANDLABEL) + ": " + pData->sLabel + "\n"; OUString aName = CuiResId(RID_SVXSTR_COMMANDNAME) + ": " + pData->sCommand + "\n"; OUString aTip = CuiResId(RID_SVXSTR_COMMANDTIP) + ": " + pData->sTooltip; - m_xDescriptionField->set_text(aLabel + aName + aTip); + if (bIsExperimental) + m_xDescriptionField->set_text(aLabel + aName + aTip + aExperimental); + else + m_xDescriptionField->set_text(aLabel + aName + aTip); } } } |