29#include <bitmaps.hlst>
33#include <com/sun/star/uno/XComponentContext.hpp>
34#include <com/sun/star/script/provider/ScriptFrameworkErrorException.hpp>
35#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
36#include <com/sun/star/script/provider/XScriptProvider.hpp>
37#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
38#include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
39#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
40#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
41#include <com/sun/star/script/provider/ScriptErrorRaisedException.hpp>
42#include <com/sun/star/script/provider/ScriptExceptionRaisedException.hpp>
43#include <com/sun/star/script/provider/ScriptFrameworkErrorType.hpp>
44#include <com/sun/star/frame/Desktop.hpp>
45#include <com/sun/star/frame/ModuleManager.hpp>
46#include <com/sun/star/script/XInvocation.hpp>
47#include <com/sun/star/document/XEmbeddedScripts.hpp>
60using namespace css::uno;
61using namespace css::script;
62using namespace css::frame;
63using namespace css::document;
82 std::unique_ptr<weld::TreeIter> xIter =
m_xScriptsBox->make_iterator(&rIter);
86 std::unique_ptr<weld::TreeIter> xAltIter =
m_xScriptsBox->make_iterator();
101 std::unique_ptr<weld::TreeIter> xIter =
m_xScriptsBox->make_iterator();
105 std::unique_ptr<weld::TreeIter> xAltIter =
m_xScriptsBox->make_iterator();
125 Reference< browse::XBrowseNode > rootNode;
126 Reference< XComponentContext > xCtx(
129 Sequence< Reference< browse::XBrowseNode > > children;
133 Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get(xCtx);
135 rootNode.set( xFac->createView(
136 browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) );
138 if ( rootNode.is() && rootNode->hasChildNodes() )
140 children = rootNode->getChildNodes();
149 Reference<XModel> xDocumentModel;
150 for (
const Reference< browse::XBrowseNode >& childNode : std::as_const(children) )
153 OUString uiName = childNode->getName();
155 if (uiName ==
"user")
160 else if (uiName ==
"share")
169 if ( xDocumentModel.is() )
171 Reference< frame::XModuleManager2 > xModuleManager( frame::ModuleManager::create(xCtx) );
174 Sequence<beans::PropertyValue> moduleDescr;
176 OUString appModule = xModuleManager->identify( xDocumentModel );
177 xModuleManager->getByName(appModule) >>= moduleDescr;
178 }
catch(
const uno::Exception&)
181 for (
const beans::PropertyValue& prop : std::as_const(moduleDescr))
183 if ( prop.Name ==
"ooSetupFactoryEmptyDocumentURL" )
185 prop.Value >>= factoryURL;
192 Reference< browse::XBrowseNode > langEntries =
195 insertEntry( uiName, app ? OUString(RID_CUIBMP_HARDDISK) : OUString(RID_CUIBMP_DOC),
196 nullptr,
true, std::make_unique< SFEntry >( langEntries, xDocumentModel ), factoryURL,
false );
202Reference< XInterface >
205 Reference< XInterface >
xModel;
206 Reference< frame::XDesktop2 >
desktop = frame::Desktop::create(xCtx);
208 Reference< container::XEnumerationAccess > componentsAccess =
210 Reference< container::XEnumeration > components =
211 componentsAccess->createEnumeration();
212 while (components->hasMoreElements())
215 components->nextElement(), UNO_QUERY );
218 OUString sTdocUrl = ::comphelper::DocumentInfo::getDocumentTitle(
model );
219 if( sTdocUrl == docName )
229Reference< browse::XBrowseNode >
232 Reference< browse::XBrowseNode > langNode;
237 const Sequence<Reference<browse::XBrowseNode>> children = rootNode->getChildNodes();
238 const auto it = std::find_if(children.begin(), children.end(),
239 [&](
const Reference<browse::XBrowseNode>& child) {
240 return child->getName() == language;
242 return (it != children.end()) ? *it :
nullptr;
247 langNode = tryFind();
252 langNode = tryFind();
264 Reference< XModel >&
model)
271 Sequence< Reference< browse::XBrowseNode > > children;
274 children = node->getChildNodes();
281 for (
const Reference< browse::XBrowseNode >& childNode : std::as_const(children) )
283 OUString
name( childNode->getName() );
284 if ( childNode->getType() != browse::BrowseNodeTypes::SCRIPT)
286 insertEntry(
name, RID_CUIBMP_LIB, &rRootEntry,
true, std::make_unique<SFEntry>(childNode,
model),
false);
290 insertEntry(
name, RID_CUIBMP_MACRO, &rRootEntry,
false, std::make_unique<SFEntry>(childNode,
model),
false);
296 const weld::TreeIter* pParent,
bool bChildrenOnDemand, std::unique_ptr<SFEntry> && aUserData,
297 std::u16string_view factoryURL,
bool bSelect)
299 if (rBitmap == RID_CUIBMP_DOC && !factoryURL.empty())
302 insertEntry(rText, aImage, pParent, bChildrenOnDemand, std::move(aUserData), bSelect);
305 insertEntry(rText, rBitmap, pParent, bChildrenOnDemand, std::move(aUserData), bSelect);
309 const OUString& rText,
const OUString& rBitmap,
const weld::TreeIter* pParent,
310 bool bChildrenOnDemand, std::unique_ptr<SFEntry> && aUserData,
bool bSelect)
325 SFEntry* userData = weld::fromId<SFEntry*>(m_xScriptsBox->get_id(rIter));
327 Reference< browse::XBrowseNode > node;
328 Reference< XModel >
model;
329 if ( userData && !userData->
isLoaded() )
333 RequestSubEntries(rIter, node,
model);
342 : GenericDialogController(pParent,
"cui/ui/newlibdialog.ui",
"NewLibDialog")
343 , m_xEdit(m_xBuilder->weld_entry(
"entry"))
347 std::unique_ptr<weld::Label> xNewLibFT(
m_xBuilder->weld_label(
"newlibft"));
352 std::unique_ptr<weld::Label> xNewMacroFT(
m_xBuilder->weld_label(
"newmacroft"));
354 std::unique_ptr<weld::Label> xAltTitle(
m_xBuilder->weld_label(
"altmacrotitle"));
355 m_xDialog->set_title(xAltTitle->get_label());
360 std::unique_ptr<weld::Label> xRenameFT(
m_xBuilder->weld_label(
"renameft"));
362 std::unique_ptr<weld::Label> xAltTitle(
m_xBuilder->weld_label(
"altrenametitle"));
363 m_xDialog->set_title(xAltTitle->get_label());
372 , m_sLanguage(
std::move(language))
373 , m_delErrStr(
CuiResId(RID_CUISTR_DELFAILED))
374 , m_delErrTitleStr(
CuiResId(RID_CUISTR_DELFAILED_TITLE))
375 , m_delQueryStr(
CuiResId(RID_CUISTR_DELQUERY))
376 , m_delQueryTitleStr(
CuiResId(RID_CUISTR_DELQUERY_TITLE))
377 , m_createErrStr(
CuiResId(RID_CUISTR_CREATEFAILED))
378 , m_createDupStr(
CuiResId(RID_CUISTR_CREATEFAILEDDUP))
379 , m_createErrTitleStr(
CuiResId(RID_CUISTR_CREATEFAILED_TITLE))
380 , m_renameErrStr(
CuiResId(RID_CUISTR_RENAMEFAILED))
381 , m_renameErrTitleStr(
CuiResId(RID_CUISTR_RENAMEFAILED_TITLE))
382 , m_sMyMacros(
CuiResId(RID_CUISTR_MYMACROS))
383 , m_sProdMacros(
CuiResId(RID_CUISTR_PRODMACROS))
384 , m_xScriptsBox(m_xBuilder->weld_tree_view(
"scripts"))
385 , m_xScratchIter(m_xScriptsBox->make_iterator())
386 , m_xRunButton(m_xBuilder->weld_button(
"ok"))
387 , m_xCloseButton(m_xBuilder->weld_button(
"close"))
388 , m_xCreateButton(m_xBuilder->weld_button(
"create"))
389 , m_xEditButton(m_xBuilder->weld_button(
"edit"))
390 , m_xRenameButton(m_xBuilder->weld_button(
"rename"))
391 , m_xDelButton(m_xBuilder->weld_button(
"delete"))
395 OUString winTitle(
m_xDialog->get_title());
396 winTitle = winTitle.replaceFirst(
"%MACROLANG",
m_sLanguage );
433 Reference< provider::XScriptProviderSupplier > xSPS( pDoc->
GetModel(), UNO_QUERY );
436 xSPS->getScriptProvider();
442 return SfxDialogController::run();
449 if ( node->getType() == browse::BrowseNodeTypes::SCRIPT)
468 OUString
sName(
"Editable");
525 std::unique_ptr<weld::TreeIter> xIter = m_xScriptsBox->make_iterator();
526 if (!m_xScriptsBox->get_selected(xIter.get()))
529 SFEntry* userData = weld::fromId<SFEntry*>(m_xScriptsBox->get_id(*xIter));
531 Reference< browse::XBrowseNode > node;
541 if ( &rButton == m_xCloseButton.get() )
543 StoreCurrentSelection();
546 if (!(&rButton == m_xEditButton.get() ||
547 &rButton == m_xCreateButton.get() ||
548 &rButton == m_xDelButton.get() ||
549 &rButton == m_xRunButton.get() ||
550 &rButton == m_xRenameButton.get()))
554 std::unique_ptr<weld::TreeIter> xIter = m_xScriptsBox->make_iterator();
555 if (!m_xScriptsBox->get_selected(xIter.get()))
557 SFEntry* userData = weld::fromId<SFEntry*>(m_xScriptsBox->get_id(*xIter));
561 Reference< browse::XBrowseNode > node;
562 Reference< XModel >
xModel;
572 if (&rButton == m_xRunButton.get())
576 Reference< provider::XScriptProvider > mspNode;
584 Reference< XEmbeddedScripts > xEmbeddedScripts(
xModel, UNO_QUERY);
585 if( !xEmbeddedScripts.is() )
590 if (!xEmbeddedScripts->getAllowMacroExecution())
597 std::unique_ptr<weld::TreeIter> xParentIter = m_xScriptsBox->make_iterator(xIter.get());
598 bool bParent = m_xScriptsBox->iter_parent(*xParentIter);
599 while (bParent && !mspNode.is() )
601 SFEntry* mspUserData = weld::fromId<SFEntry*>(m_xScriptsBox->get_id(*xParentIter));
602 mspNode.set( mspUserData->
GetNode() , UNO_QUERY );
603 bParent = m_xScriptsBox->iter_parent(*xParentIter);
605 xProp->getPropertyValue(
"URI") >>= tmpString;
606 const OUString scriptURL( tmpString );
612 Reference< provider::XScript > xScript(
613 mspNode->getScript( scriptURL ), UNO_SET_THROW );
615 const Sequence< Any >
args(0);
616 Sequence< sal_Int16 > outIndex;
617 Sequence< Any > outArgs( 0 );
618 xScript->invoke(
args, outIndex, outArgs );
620 catch ( reflection::InvocationTargetException& ite )
624 catch ( provider::ScriptFrameworkErrorException& ite )
637 StoreCurrentSelection();
640 else if ( &rButton == m_xEditButton.get() )
642 Reference< script::XInvocation > xInv( node, UNO_QUERY );
645 StoreCurrentSelection();
647 Sequence< Any >
args(0);
648 Sequence< Any > outArgs( 0 );
649 Sequence< sal_Int16 > outIndex;
653 xInv->invoke(
"Editable",
args, outIndex, outArgs );
661 else if ( &rButton == m_xCreateButton.get() )
665 else if ( &rButton == m_xDelButton.get() )
669 else if ( &rButton == m_xRenameButton.get() )
677 Reference< browse::XBrowseNode > node;
688 Reference< XModel >
model;
700 Reference< browse::XBrowseNode > aChildNode;
701 Reference< browse::XBrowseNode > node =
getBrowseNode( rEntry );
702 Reference< script::XInvocation > xInv( node, UNO_QUERY );
707 OUString aNewStdName;
711 aNewStdName =
"Library" ;
715 aNewStdName =
"Macro" ;
723 Sequence< Reference< browse::XBrowseNode > > childNodes;
727 if( !node->hasChildNodes() )
729 aNewName = aNewStdName + OUString::number(
i);
734 childNodes = node->getChildNodes();
745 aNewName = aNewStdName + OUString::number(
i);
747 if(childNodes.hasElements() )
749 OUString nodeName = childNodes[0]->getName();
750 sal_Int32 extnPos = nodeName.lastIndexOf(
'.' );
752 extn = nodeName.copy(extnPos);
754 for(
const Reference< browse::XBrowseNode >&
n : std::as_const(childNodes) )
756 if (Concat2View(aNewName+extn) ==
n->getName())
781 for(
const Reference< browse::XBrowseNode >&
n : std::as_const(childNodes) )
783 if (Concat2View(aUserSuppliedName+extn) ==
n->getName())
789 VclMessageType::Warning, VclButtonsType::Ok, aError));
797 aNewName = aUserSuppliedName;
811 Sequence< Any >
args{
Any(aNewName) };
812 Sequence< Any > outArgs;
813 Sequence< sal_Int16 > outIndex;
816 Any aResult = xInv->invoke(
"Creatable",
args, outIndex, outArgs );
817 Reference< browse::XBrowseNode > newNode( aResult, UNO_QUERY );
818 aChildNode = newNode;
826 if ( aChildNode.is() )
828 OUString aChildName = aChildNode->getName();
830 Reference<XModel> xDocumentModel =
getModel( rEntry );
837 if ( aChildNode->getType() == browse::BrowseNodeTypes::SCRIPT )
839 insertEntry(aChildName, RID_CUIBMP_MACRO, &rEntry,
false,
840 std::make_unique<SFEntry>(aChildNode,xDocumentModel),
true);
844 insertEntry(aChildName, RID_CUIBMP_LIB, &rEntry,
false,
845 std::make_unique<SFEntry>(aChildNode,xDocumentModel),
true);
852 if ( userData && !userData->
isLoaded() )
863 VclMessageType::Warning, VclButtonsType::Ok, aError));
872 Reference< browse::XBrowseNode > aChildNode;
873 Reference< browse::XBrowseNode > node =
getBrowseNode(rEntry);
874 Reference< script::XInvocation > xInv( node, UNO_QUERY );
878 OUString aNewName = node->getName();
879 sal_Int32 extnPos = aNewName.lastIndexOf(
'.' );
882 aNewName = aNewName.copy(0,extnPos);
892 Sequence< Any >
args{
Any(aNewName) };
893 Sequence< Any > outArgs;
894 Sequence< sal_Int16 > outIndex;
897 Any aResult = xInv->invoke(
"Renamable",
args, outIndex, outArgs );
898 Reference< browse::XBrowseNode > newNode( aResult, UNO_QUERY );
899 aChildNode = newNode;
907 if ( aChildNode.is() )
919 VclMessageType::Warning, VclButtonsType::Ok, aError));
928 Reference< browse::XBrowseNode > node =
getBrowseNode(rEntry);
932 VclMessageType::Question, VclButtonsType::YesNo, aQuery));
934 if (xQueryBox->run() ==
RET_NO)
939 Reference< script::XInvocation > xInv( node, UNO_QUERY );
942 Sequence< Any >
args( 0 );
943 Sequence< Any > outArgs( 0 );
944 Sequence< sal_Int16 > outIndex;
947 Any aResult = xInv->invoke(
"Deletable",
args, outIndex, outArgs );
965 VclMessageType::Warning, VclButtonsType::Ok,
m_delErrStr));
973 OUString
const & propName )
978 xProps->getPropertyValue( propName ) >>=
result;
989 OUStringBuffer
result =
"\n";
990 for(
int i=0;
i<=depth;
i++ )
994 result.append(node->getName());
998 if ( node->hasChildNodes() )
1000 const Sequence< Reference< browse::XBrowseNode > > children
1001 = node->getChildNodes();
1002 for(
const Reference< browse::XBrowseNode >&
n : children )
1013 return result.makeStringAndClear();
1020 std::unique_ptr<weld::TreeIter> xIter =
m_xScriptsBox->make_iterator();
1023 OUString aDescription;
1027 aDescription =
m_xScriptsBox->get_text(*xIter) + aDescription;
1030 aDescription =
";" + aDescription;
1033 OUString sDesc( aDescription );
1040 if( aStoredEntry.isEmpty() )
1042 std::unique_ptr<weld::TreeIter> xEntry;
1043 std::unique_ptr<weld::TreeIter> xTmpEntry(
m_xScriptsBox->make_iterator());
1087OUString ReplaceString(
1088 const OUString& source,
1089 std::u16string_view token,
1090 std::u16string_view value )
1092 sal_Int32
pos = source.indexOf( token );
1094 if ( pos != -1 && !
value.empty() )
1096 return source.replaceAt( pos, token.size(), value );
1104OUString FormatErrorString(
1105 const OUString& unformatted,
1106 std::u16string_view language,
1107 std::u16string_view script,
1108 std::u16string_view line,
1109 std::u16string_view type,
1110 std::u16string_view message )
1112 OUString
result = unformatted;
1114 result = ReplaceString(result, u
"%LANGUAGENAME", language );
1115 result = ReplaceString(result, u
"%SCRIPTNAME", script );
1116 result = ReplaceString(result, u
"%LINENUMBER", line );
1118 if ( !
type.empty() )
1123 if ( !message.empty() )
1125 result +=
"\n\n" +
CuiResId(RID_CUISTR_ERROR_MESSAGE_LABEL) +
" " + message;
1131OUString GetErrorMessage(
1132 const provider::ScriptErrorRaisedException& eScriptError )
1134 OUString unformatted =
CuiResId( RID_CUISTR_ERROR_AT_LINE );
1140 OUString message = eScriptError.Message;
1142 if ( !eScriptError.language.isEmpty() )
1144 language = eScriptError.language;
1147 if ( !eScriptError.scriptName.isEmpty() )
1149 script = eScriptError.scriptName;
1152 if ( !eScriptError.Message.isEmpty() )
1154 message = eScriptError.Message;
1156 if ( eScriptError.lineNum != -1 )
1158 line = OUString::number( eScriptError.lineNum );
1159 unformatted =
CuiResId( RID_CUISTR_ERROR_AT_LINE );
1163 unformatted =
CuiResId( RID_CUISTR_ERROR_RUNNING );
1166 return FormatErrorString(
1167 unformatted, language, script, line, u
"", message );
1170OUString GetErrorMessage(
1171 const provider::ScriptExceptionRaisedException& eScriptException )
1173 OUString unformatted =
CuiResId( RID_CUISTR_EXCEPTION_AT_LINE );
1180 OUString message = eScriptException.Message;
1182 if ( !eScriptException.language.isEmpty() )
1184 language = eScriptException.language;
1186 if ( !eScriptException.scriptName.isEmpty() )
1188 script = eScriptException.scriptName;
1191 if ( !eScriptException.Message.isEmpty() )
1193 message = eScriptException.Message;
1196 if ( eScriptException.lineNum != -1 )
1198 line = OUString::number( eScriptException.lineNum );
1199 unformatted =
CuiResId( RID_CUISTR_EXCEPTION_AT_LINE );
1203 unformatted =
CuiResId( RID_CUISTR_EXCEPTION_RUNNING );
1206 if ( !eScriptException.exceptionType.isEmpty() )
1208 type = eScriptException.exceptionType;
1211 return FormatErrorString(
1212 unformatted, language, script, line, type, message );
1215OUString GetErrorMessage(
1216 const provider::ScriptFrameworkErrorException& sError )
1218 OUString unformatted =
CuiResId( RID_CUISTR_FRAMEWORK_ERROR_RUNNING );
1220 OUString language(
"UNKNOWN");
1222 OUString
script(
"UNKNOWN");
1226 if ( !sError.scriptName.isEmpty() )
1228 script = sError.scriptName;
1230 if ( !sError.language.isEmpty() )
1232 language = sError.language;
1234 if ( sError.errorType == provider::ScriptFrameworkErrorType::NOTSUPPORTED )
1236 message =
CuiResId(RID_CUISTR_ERROR_LANG_NOT_SUPPORTED);
1237 message = ReplaceString(message, u
"%LANGUAGENAME", language );
1242 message = sError.Message;
1244 return FormatErrorString(
1245 unformatted, language, script, u
"", std::u16string_view(), message );
1248OUString GetErrorMessage(
const css::uno::Any& aException )
1250 if ( aException.getValueType() ==
1253 reflection::InvocationTargetException ite;
1258 provider::ScriptErrorRaisedException scriptError;
1259 ite.TargetException >>= scriptError;
1260 return GetErrorMessage( scriptError );
1265 provider::ScriptExceptionRaisedException scriptException;
1266 ite.TargetException >>= scriptException;
1267 return GetErrorMessage( scriptException );
1279 provider::ScriptFrameworkErrorException sfe;
1281 return GetErrorMessage( sfe );
1285 auto msg = aException.getValueTypeName();
1287 if ( (aException >>= e) && !e.Message.isEmpty() )
1289 msg +=
": " + e.Message;
1300 OUString
sMessage = GetErrorMessage( aException );
1306 pData->pParent = pParent;
1314 std::unique_ptr<DialogData> xData(
static_cast<DialogData*
>(
p));
1315 OUString message = xData->sMessage;
1317 if ( message.isEmpty() )
1318 message =
CuiResId( RID_CUISTR_ERROR_TITLE );
1320 std::shared_ptr<weld::MessageDialog> xBox;
1323 VclMessageType::Warning,
1327 xBox->set_title(
CuiResId(RID_CUISTR_ERROR_TITLE));
1329 xBox->runAsync(xBox, [](sal_Int32 ) {});
Reference< XExecutableDialog > m_xDialog
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
const css::uno::Reference< css::script::browse::XBrowseNode > & GetNode() const
const css::uno::Reference< css::frame::XModel > & GetModel() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
css::uno::Reference< css::frame::XModel3 > GetModel() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
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
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
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
std::unique_ptr< weld::Button > m_xRunButton
void createEntry(const weld::TreeIter &rEntry)
void RestorePreviousSelection()
std::shared_ptr< weld::Dialog > m_xDialog
std::unique_ptr< weld::Builder > m_xBuilder
OUString CuiResId(TranslateId aKey)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define LINK(Instance, Class, Member)
std::unique_ptr< sal_Int32[]> pData
css::uno::Reference< css::uno::XCurrentContext > NoEnableJavaInteractionContext()
Reference< XComponentContext > getProcessComponentContext()
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
OUString toId(const void *pValue)
IMPL_LINK(SvxScriptOrgDialog, ExpandingHdl, const weld::TreeIter &, rIter, bool)
IMPL_STATIC_LINK(SvxScriptErrorDialog, ShowDialog, void *, p, void)
IMPL_LINK_NOARG(SvxScriptOrgDialog, ScriptSelectHdl, weld::TreeView &, void)
std::unordered_map< OUString, OUString > Selection_hash
Reference< XModel > xModel