[Libreoffice-commits] core.git: cui/inc cui/source

Muhammet Kara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 2 14:14:02 UTC 2021


 cui/inc/strings.hrc          |    1 +
 cui/source/customize/cfg.cxx |   10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 487dbbb69bfcf7c0368e9dc17e5aae1f17f8187f
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Sun May 23 11:22:57 2021 +0300
Commit:     Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Wed Jun 2 16:13:24 2021 +0200

    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 at documentfoundation.org>
    Tested-by: Jenkins

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);
             }
         }
     }


More information about the Libreoffice-commits mailing list