25#include <rtl/ustring.hxx>
27#include <com/sun/star/frame/DispatchInformation.hpp>
28#include <com/sun/star/frame/XModel.hpp>
29#include <com/sun/star/frame/XFrame.hpp>
30#include <com/sun/star/container/XNameAccess.hpp>
31#include <com/sun/star/script/browse/XBrowseNode.hpp>
32#include <com/sun/star/uno/XComponentContext.hpp>
34#include <config_features.h>
38#if HAVE_FEATURE_SCRIPTING
39class SfxMacroInfoItem;
65 css::uno::Reference< css::frame::XModel >
m_xDoc;
70 void init(
const OUString& rModuleName,
const css::uno::Reference< css::frame::XModel >& xModel);
76 std::vector< SfxStyleInfo_Impl >
getStyles(
const OUString& sFamily);
78 static OUString
generateCommand(std::u16string_view sFamily, std::u16string_view sStyle);
126 m_xTreeView->insert(pParent, -1, &rStr, &rId,
nullptr,
nullptr,
false,
nullptr);
130 std::unique_ptr<weld::TreeIter> xIter(
m_xTreeView->make_iterator());
131 m_xTreeView->insert(pParent, -1, &rStr, &rId,
nullptr,
nullptr,
false, xIter.get());
134 void append(
const OUString& rId,
const OUString& rStr,
const OUString& rImage,
const weld::TreeIter* pParent =
nullptr)
139 void append(
const OUString& rId,
const OUString& rStr,
const css::uno::Reference<css::graphic::XGraphic>& rImage,
const weld::TreeIter* pParent =
nullptr)
175 OUString
GetHelpText(
bool bConsiderParent =
true );
185 std::unique_ptr<SvxConfigGroupBoxResource_Impl>
xImp;
189 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
190 css::uno::Reference< css::frame::XFrame >
m_xFrame;
199 const css::uno::Reference< css::script::browse::XBrowseNode >& node,
200 css::uno::Reference< css::uno::XComponentContext >
const & xCtx,
204 css::uno::Reference< css::uno::XComponentContext >
const & xCtx,
205 std::u16string_view docName);
208 void FillScriptList(
const css::uno::Reference< css::script::browse::XBrowseNode >& xRootNode,
210 void FillFunctionsList(
const css::uno::Sequence< css::frame::DispatchInformation >& xCommands);
224 void Init(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
225 const css::uno::Reference< css::frame::XFrame >& xFrame,
226 const OUString& sModuleLongName,
231#if HAVE_FEATURE_SCRIPTING
232 void SelectMacro(
const SfxMacroInfoItem*);
261 const css::uno::Reference< css::frame::XFrame >& xFrame);
std::vector< std::unique_ptr< SfxGroupInfo_Impl > > SfxGroupInfoArr_Impl
OUString GetCurLabel() const
void set_size_request(int nWidth, int nHeight)
std::unique_ptr< weld::TreeIter > tree_append(const OUString &rId, const OUString &rStr, const weld::TreeIter *pParent=nullptr)
SfxGroupInfoArr_Impl aArr
bool get_selected(weld::TreeIter *pIter) const
void append(const OUString &rId, const OUString &rStr, const OUString &rImage, const weld::TreeIter *pParent=nullptr)
std::unique_ptr< weld::TreeIter > make_iterator(const weld::TreeIter *pOrig=nullptr) const
OUString get_selected_text() const
void expand_row(const weld::TreeIter &rIter)
void set_sensitive(bool bSensitive)
OUString get_text(int nPos) const
OUString GetCurCommand() const
void connect_row_activated(const Link< weld::TreeView &, bool > &rLink)
void connect_popup_menu(const Link< const CommandEvent &, bool > &rLink)
OUString get_id(const weld::TreeIter &rIter) const
void scroll_to_row(int pos)
void append(const OUString &rId, const OUString &rStr, const css::uno::Reference< css::graphic::XGraphic > &rImage, const weld::TreeIter *pParent=nullptr)
OUString get_selected_id() const
weld::TreeView & get_widget()
void append(const OUString &rId, const OUString &rStr, const weld::TreeIter *pParent=nullptr)
DECL_LINK(QueryTooltip, const weld::TreeIter &rIter, OUString)
bool iter_has_child(const weld::TreeIter &rIter) const
~CuiConfigFunctionListBox()
void remove(const weld::TreeIter &rIter)
OUString GetSelectedScriptURI() const
OUString GetHelpText(bool bConsiderParent=true)
void connect_changed(const Link< weld::TreeView &, void > &rLink)
Size get_size_request() const
std::unique_ptr< weld::TreeView > m_xTreeView
std::unique_ptr< weld::TreeIter > m_xScratchIter
CuiConfigFunctionListBox(std::unique_ptr< weld::TreeView > xTreeView)
void SetStylesInfo(SfxStylesInfo_Impl *pStyles)
OUString m_sModuleLongName
CuiConfigFunctionListBox * m_pFunctionListBox
std::unique_ptr< weld::TreeView > m_xTreeView
SfxStylesInfo_Impl * m_pStylesInfo
void Init(const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XFrame > &xFrame, const OUString &sModuleLongName, bool bEventMode)
static OUString GetImage(const css::uno::Reference< css::script::browse::XBrowseNode > &node, css::uno::Reference< css::uno::XComponentContext > const &xCtx, bool bIsRootNode)
static css::uno::Reference< css::uno::XInterface > getDocumentModel(css::uno::Reference< css::uno::XComponentContext > const &xCtx, std::u16string_view docName)
CuiConfigGroupListBox(std::unique_ptr< weld::TreeView > xTreeView)
SfxGroupInfoArr_Impl aArr
std::unique_ptr< SvxConfigGroupBoxResource_Impl > xImp
css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo
OUString MapCommand2UIName(const OUString &sCommand)
void FillFunctionsList(const css::uno::Sequence< css::frame::DispatchInformation > &xCommands)
css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo
weld::TreeView & get_widget()
DECL_LINK(ExpandingHdl, const weld::TreeIter &, bool)
void SetFunctionListBox(CuiConfigFunctionListBox *pBox)
std::unique_ptr< weld::TreeIter > m_xScratchIter
void FillScriptList(const css::uno::Reference< css::script::browse::XBrowseNode > &xRootNode, const weld::TreeIter *pParentEntry)
css::uno::Reference< css::frame::XFrame > m_xFrame
void set_sensitive(bool bSensitive)
css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription
void set_size_request(int nWidth, int nHeight)
css::uno::Reference< css::uno::XComponentContext > m_xContext
void connect_changed(const Link< weld::TreeView &, void > &rLink)
SvxScriptSelectorDialog(weld::Window *pParent, const css::uno::Reference< css::frame::XFrame > &xFrame)
DECL_LINK(FunctionDoubleClickHdl, weld::TreeView &, bool)
std::unique_ptr< weld::Label > m_xDialogDescription
DECL_LINK(ContextMenuHdl, const CommandEvent &, bool)
DECL_LINK(SelectHdl, weld::TreeView &, void)
std::unique_ptr< weld::Button > m_xOKButton
OUString GetScriptURL() const
std::unique_ptr< CuiConfigGroupListBox > m_xCategories
std::unique_ptr< weld::Label > m_xMacronameFT
std::unique_ptr< CuiConfigFunctionListBox > m_xCommands
std::unique_ptr< weld::TextView > m_xDescriptionText
std::unique_ptr< weld::Label > m_xLibraryFT
std::unique_ptr< weld::Button > m_xCancelButton
SfxStylesInfo_Impl m_aStylesInfo
std::unique_ptr< weld::Frame > m_xDescriptionFrame
virtual ~SvxScriptSelectorDialog() override
DECL_LINK(ClickHdl, weld::Button &, void)
SfxGroupInfo_Impl(SfxCfgKind n, sal_uInt16 nr, void *pObj=nullptr)
SfxStyleInfo_Impl(const SfxStyleInfo_Impl &rCopy)
void init(const OUString &rModuleName, const css::uno::Reference< css::frame::XModel > &xModel)
static bool parseStyleCommand(SfxStyleInfo_Impl &aStyle)
static OUString generateCommand(std::u16string_view sFamily, std::u16string_view sStyle)
std::vector< SfxStyleInfo_Impl > getStyleFamilies() const
std::vector< SfxStyleInfo_Impl > getStyles(const OUString &sFamily)
css::uno::Reference< css::frame::XModel > m_xDoc
void getLabel4Style(SfxStyleInfo_Impl &aStyle)