Kaydet (Commit) 3b12778a authored tarafından Muhammet Kara's avatar Muhammet Kara

tdf#112207: Allow assigning macros to ui elements

* Adds "Macros" category to the categories list

* Search/filter feature now works also on the macros category

* Since macros category has multiple trees and subtrees, and many leaf
  elements (macros). I chose to implement the behavior like this:

  If there is no filter/search term, the trees will be presented as in the old
  macro selector dialog (collapsed), but if user types a search term, then
  filtering happens: non-matching elements and empty containers/(sub)trees
  are removed and everything is expanded so that user easily sees what
  (s)he is looking for.

Change-Id: I1a93f156a7293c7e61baac882a10ff631961e2af
Reviewed-on: https://gerrit.libreoffice.org/44938Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarHeiko Tietze <tietze.heiko@googlemail.com>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 3f2915c4)
Reviewed-on: https://gerrit.libreoffice.org/45779
üst 5ea28efc
...@@ -89,8 +89,10 @@ ...@@ -89,8 +89,10 @@
#define RID_SVXSTR_ERR_TEXTNOTFOUND NC_("RID_SVXSTR_ERR_TEXTNOTFOUND", "No alternatives found.") #define RID_SVXSTR_ERR_TEXTNOTFOUND NC_("RID_SVXSTR_ERR_TEXTNOTFOUND", "No alternatives found.")
#define RID_SVXSTR_SELECT_FILE_IFRAME NC_("RID_SVXSTR_SELECT_FILE_IFRAME", "Select File for Floating Frame") #define RID_SVXSTR_SELECT_FILE_IFRAME NC_("RID_SVXSTR_SELECT_FILE_IFRAME", "Select File for Floating Frame")
#define RID_SVXSTR_ALLFUNCTIONS NC_("RID_SVXSTR_ALLFUNCTIONS", "All categories") #define RID_SVXSTR_ALLFUNCTIONS NC_("RID_SVXSTR_ALLFUNCTIONS", "All categories")
#define RID_SVXSTR_MACROS NC_("RID_SVXSTR_MACROS", "Macros")
#define RID_SVXSTR_MYMACROS NC_("RID_SVXSTR_MYMACROS", "My Macros") #define RID_SVXSTR_MYMACROS NC_("RID_SVXSTR_MYMACROS", "My Macros")
#define RID_SVXSTR_PRODMACROS NC_("RID_SVXSTR_PRODMACROS", "%PRODUCTNAME Macros") #define RID_SVXSTR_PRODMACROS NC_("RID_SVXSTR_PRODMACROS", "%PRODUCTNAME Macros")
#define RID_SVXSTR_NOMACRODESC NC_("RID_SVXSTR_NOMACRODESC", "There is no description available for this macro.")
#define RID_SVXSTR_SELECTOR_ADD_COMMANDS NC_("RID_SVXSTR_SELECTOR_ADD_COMMANDS", "Add Commands") #define RID_SVXSTR_SELECTOR_ADD_COMMANDS NC_("RID_SVXSTR_SELECTOR_ADD_COMMANDS", "Add Commands")
#define RID_SVXSTR_SELECTOR_RUN NC_("RID_SVXSTR_SELECTOR_RUN", "Run") #define RID_SVXSTR_SELECTOR_RUN NC_("RID_SVXSTR_SELECTOR_RUN", "Run")
#define RID_SVXSTR_ROW NC_("RID_SVXSTR_ROW", "Insert Rows") #define RID_SVXSTR_ROW NC_("RID_SVXSTR_ROW", "Insert Rows")
......
...@@ -64,6 +64,11 @@ public: ...@@ -64,6 +64,11 @@ public:
const OUString& filterTerm = OUString() ); const OUString& filterTerm = OUString() );
void SetStylesInfo(SfxStylesInfo_Impl* pStyles); void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
// Adds children of the given macro group to the functions list
void addChildren(
SvTreeListEntry* parentEntry, const css::uno::Reference<com::sun::star::script::browse::XBrowseNode> &parentNode,
const VclPtr<SfxConfigFunctionListBox> &pFunctionListBox, const OUString &filterTerm);
}; };
#endif // INCLUDED_CUI_SOURCE_INC_COMMANDCATEGORYLISTBOX_HXX #endif // INCLUDED_CUI_SOURCE_INC_COMMANDCATEGORYLISTBOX_HXX
......
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