26#include <com/sun/star/beans/XPropertySet.hpp>
27#include <com/sun/star/script/browse/XBrowseNode.hpp>
28#include <com/sun/star/frame/XModel.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
31#include <unordered_map>
33#define OBJTYPE_METHOD 2L
34#define OBJTYPE_SCRIPTCONTAINER 3L
35#define OBJTYPE_SFROOT 4L
65 css::uno::Reference< css::script::browse::XBrowseNode >
nodes;
66 css::uno::Reference< css::frame::XModel >
model;
68 SFEntry(
const css::uno::Reference< css::script::browse::XBrowseNode >& entryNodes ,
69 const css::uno::Reference< css::frame::XModel >& entryModel) {
nodes = entryNodes;
loaded=
false;
model = entryModel; }
71 const css::uno::Reference< css::script::browse::XBrowseNode >&
GetNode()
const {
return nodes ;}
72 const css::uno::Reference< css::frame::XModel >&
GetModel()
const {
return model ;};
106 static bool getBoolProperty( css::uno::Reference< css::beans::XPropertySet >
const & xProps, OUString
const & propName );
107 void CheckButtons( css::uno::Reference< css::script::browse::XBrowseNode >
const & node );
114 OUString
getListOfChildren(
const css::uno::Reference< css::script::browse::XBrowseNode >& node,
int depth );
118 void Init(std::u16string_view language);
122 void insertEntry(OUString
const & rText, OUString
const & rBitmap,
124 bool bChildrenOnDemand,
125 std::unique_ptr< SFEntry > && aUserData,
126 std::u16string_view factoryURL,
bool bSelect);
127 void insertEntry(OUString
const & rText, OUString
const & rBitmap,
129 bool bChildrenOnDemand,
130 std::unique_ptr< SFEntry > && aUserData,
134 css::uno::Reference< css::script::browse::XBrowseNode >
const & node,
135 css::uno::Reference< css::frame::XModel>&
model);
137 static css::uno::Reference< css::script::browse::XBrowseNode >
138 getLangNodeFromRootNode( css::uno::Reference< css::script::browse::XBrowseNode >
const & root, std::u16string_view language );
140 static css::uno::Reference< css::uno::XInterface >
getDocumentModel( css::uno::Reference< css::uno::XComponentContext >
const & xCtx, std::u16string_view docName );
148 virtual short run()
override;
css::uno::Reference< css::script::browse::XBrowseNode > nodes
SFEntry(const css::uno::Reference< css::script::browse::XBrowseNode > &entryNodes, const css::uno::Reference< css::frame::XModel > &entryModel)
const css::uno::Reference< css::script::browse::XBrowseNode > & GetNode() const
const css::uno::Reference< css::frame::XModel > & GetModel() const
css::uno::Reference< css::frame::XModel > model
SFEntry(const SFEntry &r)
DECL_STATIC_LINK(SvxScriptErrorDialog, ShowDialog, void *, void)
static void ShowAsyncErrorDialog(weld::Window *pParent, css::uno::Any const &aException)
void delUserData(const weld::TreeIter &rIter)
void deleteTree(const weld::TreeIter &rIter)
static css::uno::Reference< css::script::browse::XBrowseNode > getLangNodeFromRootNode(css::uno::Reference< css::script::browse::XBrowseNode > const &root, std::u16string_view language)
const OUString m_delErrTitleStr
css::uno::Reference< css::frame::XModel > getModel(const weld::TreeIter &rEntry)
const OUString m_sMyMacros
std::unique_ptr< weld::TreeIter > m_xScratchIter
std::unique_ptr< weld::Button > m_xDelButton
const OUString m_delQueryStr
void insertEntry(OUString const &rText, OUString const &rBitmap, const weld::TreeIter *pParent, bool bChildrenOnDemand, std::unique_ptr< SFEntry > &&aUserData, std::u16string_view factoryURL, bool bSelect)
virtual short run() override
DECL_LINK(ExpandingHdl, const weld::TreeIter &, bool)
static css::uno::Reference< css::uno::XInterface > getDocumentModel(css::uno::Reference< css::uno::XComponentContext > const &xCtx, std::u16string_view docName)
void deleteEntry(const weld::TreeIter &rEntry)
std::unique_ptr< weld::Button > m_xRenameButton
DECL_LINK(ScriptSelectHdl, weld::TreeView &, void)
std::unique_ptr< weld::TreeView > m_xScriptsBox
SvxScriptOrgDialog(weld::Window *pParent, OUString language)
const OUString m_createDupStr
const OUString m_renameErrStr
const OUString m_renameErrTitleStr
void CheckButtons(css::uno::Reference< css::script::browse::XBrowseNode > const &node)
virtual ~SvxScriptOrgDialog() override
OUString getListOfChildren(const css::uno::Reference< css::script::browse::XBrowseNode > &node, int depth)
void Init(std::u16string_view language)
void renameEntry(const weld::TreeIter &rEntry)
const OUString m_createErrTitleStr
std::unique_ptr< weld::Button > m_xCloseButton
const OUString m_delErrStr
void RequestSubEntries(const weld::TreeIter &rRootEntry, css::uno::Reference< css::script::browse::XBrowseNode > const &node, css::uno::Reference< css::frame::XModel > &model)
std::unique_ptr< weld::Button > m_xEditButton
const OUString m_createErrStr
css::uno::Reference< css::script::browse::XBrowseNode > getBrowseNode(const weld::TreeIter &rEntry)
static bool getBoolProperty(css::uno::Reference< css::beans::XPropertySet > const &xProps, OUString const &propName)
const OUString m_sProdMacros
const OUString m_delQueryTitleStr
void StoreCurrentSelection()
std::unique_ptr< weld::Button > m_xCreateButton
static Selection_hash m_lastSelection
DECL_LINK(ButtonHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xRunButton
void createEntry(const weld::TreeIter &rEntry)
void RestorePreviousSelection()
std::unordered_map< OUString, OUString > Selection_hash