22#include <com/sun/star/beans/XPropertySet.hpp>
23#include <com/sun/star/container/XEnumerationAccess.hpp>
24#include <com/sun/star/container/XEnumeration.hpp>
25#include <com/sun/star/document/XScriptInvocationContext.hpp>
26#include <com/sun/star/frame/ModuleManager.hpp>
27#include <com/sun/star/frame/Desktop.hpp>
28#include <com/sun/star/frame/theUICommandDescription.hpp>
29#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
30#include <com/sun/star/script/browse/XBrowseNode.hpp>
31#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
32#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
33#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
34#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
35#include <com/sun/star/uno/RuntimeException.hpp>
36#include <com/sun/star/ui/theUICategoryDescription.hpp>
41#include <bitmaps.hlst>
50#include <osl/diagnose.h>
87 std::u16string_view sFamily, std::u16string_view sStyle)
89 return OUString::Concat(
".uno:StyleApply?Style:string=")
91 +
"&FamilyName:string="
107 sal_Int32 nCmdLen = aStyle.
sCommand.getLength();
108 OUString sCmdArgs = aStyle.
sCommand.copy(LEN_STYLEPROT, nCmdLen-LEN_STYLEPROT);
109 sal_Int32
i = sCmdArgs.indexOf(
'&');
113 OUString sArg = sCmdArgs.copy(0,
i);
115 aStyle.
sStyle = sArg.copy(LEN_SPART);
117 aStyle.
sFamily = sArg.copy(LEN_FPART);
119 sArg = sCmdArgs.copy(
i+1, sCmdArgs.getLength()-
i-1);
121 aStyle.
sStyle = sArg.copy(LEN_SPART);
123 aStyle.
sFamily = sArg.copy(LEN_FPART);
125 return !(aStyle.
sFamily.isEmpty() || aStyle.
sStyle.isEmpty());
132 css::uno::Reference< css::style::XStyleFamiliesSupplier >
xModel(
m_xDoc, css::uno::UNO_QUERY);
134 css::uno::Reference< css::container::XNameAccess > xFamilies;
136 xFamilies =
xModel->getStyleFamilies();
138 css::uno::Reference< css::container::XNameAccess > xStyleSet;
140 xFamilies->getByName(aStyle.
sFamily) >>= xStyleSet;
142 css::uno::Reference< css::beans::XPropertySet > xStyle;
144 xStyleSet->getByName(aStyle.
sStyle) >>= xStyle;
150 catch(
const css::uno::RuntimeException&)
152 catch(
const css::uno::Exception&)
153 { aStyle.
sLabel.clear(); }
155 if (aStyle.
sLabel.isEmpty())
164 css::uno::Reference< css::style::XStyleFamiliesSupplier >
xModel(
m_xDoc, css::uno::UNO_QUERY);
166 return std::vector< SfxStyleInfo_Impl >();
168 css::uno::Reference< css::container::XNameAccess > xCont =
xModel->getStyleFamilies();
169 const css::uno::Sequence< OUString > lFamilyNames = xCont->getElementNames();
170 std::vector< SfxStyleInfo_Impl > lFamilies;
171 for (
const auto& aFamily : lFamilyNames)
173 if ((aFamily ==
"CellStyles" &&
m_aModuleName !=
"com.sun.star.sheet.SpreadsheetDocument") ||
174 aFamily ==
"cell" || aFamily ==
"table" || aFamily ==
"Default")
182 css::uno::Reference< css::beans::XPropertySet > xFamilyInfo;
183 xCont->getByName(aFamilyInfo.
sFamily) >>= xFamilyInfo;
184 if (!xFamilyInfo.is())
192 catch(
const css::uno::RuntimeException&)
194 catch(
const css::uno::Exception&)
195 {
return std::vector< SfxStyleInfo_Impl >(); }
197 lFamilies.push_back(aFamilyInfo);
205 css::uno::Sequence< OUString > lStyleNames;
206 css::uno::Reference< css::style::XStyleFamiliesSupplier >
xModel(
m_xDoc, css::uno::UNO_QUERY_THROW);
207 css::uno::Reference< css::container::XNameAccess > xFamilies =
xModel->getStyleFamilies();
208 css::uno::Reference< css::container::XNameAccess > xStyleSet;
211 xFamilies->getByName(sFamily) >>= xStyleSet;
212 lStyleNames = xStyleSet->getElementNames();
214 catch(
const css::uno::RuntimeException&)
216 catch(
const css::uno::Exception&)
217 {
return std::vector< SfxStyleInfo_Impl >(); }
219 std::vector< SfxStyleInfo_Impl > lStyles;
220 sal_Int32 c = lStyleNames.getLength();
226 aStyleInfo.
sStyle = lStyleNames[
i];
231 css::uno::Reference< css::beans::XPropertySet > xStyle;
232 xStyleSet->getByName(aStyleInfo.
sStyle) >>= xStyle;
235 xStyle->getPropertyValue(
"DisplayName") >>= aStyleInfo.
sLabel;
237 catch(
const css::uno::RuntimeException&)
239 catch(
const css::uno::Exception&)
242 lStyles.push_back(aStyleInfo);
261 return pData->sHelpText;
272 return pData->sCommand;
280 if (!
pData->sLabel.isEmpty())
281 return pData->sLabel;
282 return pData->sCommand;
286 : m_xTreeView(
std::move(xTreeView))
287 , m_xScratchIter(m_xTreeView->make_iterator())
306 OUString aTip =
CuiResId(RID_CUISTR_COMMANDTIP) +
": ";
323 OUString* pScriptURI =
static_cast<OUString*
>(
pData->pObject);
345 return *
static_cast<OUString*
>(
pData->pObject);
361 m_sMyMacros(
CuiResId(RID_CUISTR_MYMACROS)),
362 m_sProdMacros(
CuiResId(RID_CUISTR_PRODMACROS)),
363 m_sDlgMacros(
CuiResId(RID_CUISTR_PRODMACROS)),
364 m_aStrGroupStyles(
CuiResId(RID_CUISTR_GROUP_STYLES)),
365 m_aStrGroupSidebarDecks(
CuiResId(RID_CUISTR_GROUP_SIDEBARDECKS))
383 Reference< XModel > lcl_getDocumentWithScripts_throw(
const Reference< XInterface >& _rxComponent )
385 Reference< XEmbeddedScripts > xScripts( _rxComponent, UNO_QUERY );
386 if ( !xScripts.is() )
388 Reference< XScriptInvocationContext > xContext( _rxComponent, UNO_QUERY );
390 xScripts = xContext->getScriptContainer();
393 return Reference< XModel >( xScripts, UNO_QUERY );
397 Reference< XModel > lcl_getScriptableDocument_nothrow(
const Reference< XFrame >& _rxFrame )
399 Reference< XModel > xDocument;
404 OSL_ENSURE( _rxFrame.is(),
"lcl_getScriptableDocument_nothrow: you need to pass a frame to this dialog/tab page!" );
408 Reference< XController >
xController( _rxFrame->getController(), UNO_SET_THROW );
409 xDocument = lcl_getDocumentWithScripts_throw(
xController->getModel() );
411 if ( !xDocument.is() )
414 xDocument = lcl_getDocumentWithScripts_throw( _rxFrame->getController() );
418 catch(
const Exception& )
428 , m_pFunctionListBox(nullptr)
429 , m_pStylesInfo(nullptr)
430 , m_xTreeView(
std::move(xTreeView))
431 , m_xScratchIter(m_xTreeView->make_iterator())
455 OUString* pScriptURI =
static_cast<OUString*
>(
pData->pObject);
477 css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider(
m_xFrame, css::uno::UNO_QUERY_THROW);
478 css::uno::Sequence< sal_Int16 > lGroups = xProvider->getSupportedCommandGroups();
479 sal_Int32 c1 = lGroups.getLength();
481 sal_Int32 nAddedGroups = 0;
483 for (i1=0; i1<c1; ++i1)
485 sal_Int16 nGroupID = lGroups[i1];
486 OUString sGroupID = OUString::number(nGroupID);
487 OUString sGroupName ;
492 if (sGroupName.isEmpty())
495 catch(
const css::container::NoSuchElementException&)
504 catch(
const css::uno::RuntimeException&)
506 catch(
const css::uno::Exception&)
515 if ( xRootNode->hasChildNodes() )
520 const Sequence< Reference< browse::XBrowseNode > > children =
521 xRootNode->getChildNodes();
522 bool bIsRootNode =
false;
524 OUString user(
"user");
525 OUString share(
"share");
526 if ( xRootNode->getName() ==
"Root" )
537 OUString currentDocTitle;
538 Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow(
m_xFrame ) );
539 if ( xDocument.is() )
541 currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument );
544 for ( Reference< browse::XBrowseNode >
const & theChild : children )
546 bool bDisplay =
true;
547 OUString uiName = theChild->getName();
550 if ( ! (uiName == user || uiName == share ||
551 uiName == currentDocTitle ) )
557 if ( uiName == user )
559 uiName =
xImp->m_sMyMacros;
561 else if ( uiName == share )
563 uiName =
xImp->m_sProdMacros;
567 if (theChild->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay )
573 bool bChildOnDemand =
false;
575 if ( theChild->hasChildNodes() )
577 const Sequence< Reference< browse::XBrowseNode > > grandchildren =
578 theChild->getChildNodes();
580 for (
const auto& rxNode : grandchildren )
582 if ( rxNode->getType() == browse::BrowseNodeTypes::CONTAINER )
584 bChildOnDemand =
true;
593 0,
static_cast<void *
>( theChild.get())));
610 for (
const auto & rInfo : xCommands)
618 pGrpInfo->
sLabel = sUIName;
626 const css::uno::Reference< css::frame::XFrame >& xFrame,
627 const OUString& sModuleLongName,
635 sal_Int32 nAddedGroups = 0;
646 SAL_INFO(
"cui.customize",
"** ** About to initialise SF Scripts");
648 Reference< browse::XBrowseNode > rootNode;
651 Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get(
m_xContext );
652 rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
656 TOOLS_WARN_EXCEPTION(
"cui.customize",
"Caught some exception whilst retrieving browse nodes from factory");
666 if ( bEventMode && nAddedGroups )
670 OUString s(
CuiResId(RID_CUISTR_ALLFUNCTIONS));
671 m_xTreeView->insert(
nullptr, 0, &s, &
sId,
nullptr,
nullptr,
false,
nullptr);
684 static_cast<void *
>(rootNode.get())));
685 OUString aTitle(
xImp->m_sDlgMacros);
687 m_xTreeView->insert(
nullptr, -1, &aTitle, &
sId,
nullptr,
nullptr,
true,
nullptr);
701 OUString sStyle(
xImp->m_aStrGroupStyles);
703 m_xTreeView->insert(
nullptr, -1, &sStyle, &
sId,
nullptr,
nullptr,
true,
nullptr);
706 OUString sSidebarDecks(
xImp->m_aStrGroupSidebarDecks);
708 m_xTreeView->insert(
nullptr, -1, &sSidebarDecks, &
sId,
nullptr,
nullptr,
false,
nullptr);
717 const Reference< browse::XBrowseNode >& node,
718 Reference< XComponentContext >
const & xCtx,
724 if (node->getName() ==
"user" || node->getName() ==
"share" )
726 aImage = RID_CUIBMP_HARDDISK;
731 OUString nodeName = node->getName();
733 if ( xDocumentModel.is() )
735 Reference< frame::XModuleManager2 > xModuleManager( frame::ModuleManager::create(xCtx) );
737 OUString appModule( xModuleManager->identify(
739 Sequence<beans::PropertyValue> moduleDescr;
740 Any aAny = xModuleManager->getByName(appModule);
741 if( !( aAny >>= moduleDescr ) )
745 beans::PropertyValue
const * pmoduleDescr =
746 moduleDescr.getConstArray();
747 for ( sal_Int32
pos = moduleDescr.getLength();
pos--; )
749 if ( pmoduleDescr[
pos ].
Name ==
"ooSetupFactoryEmptyDocumentURL" )
751 pmoduleDescr[
pos ].Value >>= factoryURL;
752 SAL_INFO(
"cui.customize",
"factory url for doc images is " << factoryURL);
757 if( !factoryURL.isEmpty() )
763 aImage = RID_CUIBMP_DOC;
769 if( node->getType() == browse::BrowseNodeTypes::SCRIPT )
770 aImage = RID_CUIBMP_MACRO;
772 aImage = RID_CUIBMP_LIB;
777Reference< XInterface >
780 Reference< XInterface >
xModel;
781 Reference< frame::XDesktop2 >
desktop = frame::Desktop::create( xCtx );
783 Reference< container::XEnumerationAccess > componentsAccess =
785 Reference< container::XEnumeration > components =
786 componentsAccess->createEnumeration();
787 while (components->hasMoreElements())
790 components->nextElement(), UNO_QUERY );
794 ::comphelper::DocumentInfo::getDocumentTitle(
model );
795 if( sTdocUrl == docName )
810 css::uno::Reference< css::container::XNameAccess > xModuleConf;
812 if (xModuleConf.is())
818 catch(
const css::uno::RuntimeException&)
820 catch(css::uno::Exception&)
824 if (sUIName.isEmpty())
838 std::unique_ptr<weld::TreeIter> xIter(
m_xTreeView->make_iterator());
846 switch ( pInfo->
nKind )
850 css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider(
m_xFrame, UNO_QUERY );
851 bool bValidIter =
m_xTreeView->get_iter_first(*xIter);
857 css::uno::Sequence< css::frame::DispatchInformation > lCommands;
860 lCommands = xProvider->getConfigurableDispatchInformation( pCurrentInfo->
nUniqueID );
863 catch ( container::NoSuchElementException& )
875 css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider (
m_xFrame, css::uno::UNO_QUERY_THROW);
876 css::uno::Sequence< css::frame::DispatchInformation > lCommands = xProvider->getConfigurableDispatchInformation(nGroup);
885 Reference< browse::XBrowseNode > rootNode(
886 static_cast< browse::XBrowseNode*
>( pInfo->
pObject ) ) ;
889 if ( rootNode->hasChildNodes() )
891 const Sequence< Reference< browse::XBrowseNode > > children =
892 rootNode->getChildNodes();
894 for (
const Reference< browse::XBrowseNode >& childNode : children )
896 if (childNode->getType() == browse::BrowseNodeTypes::SCRIPT)
898 OUString uri, description;
900 Reference < beans::XPropertySet >xPropSet( childNode, UNO_QUERY );
907 xPropSet->getPropertyValue(
"URI");
912 value = xPropSet->getPropertyValue(
"Description");
913 value >>= description;
919 OUString* pScriptURI =
new OUString( uri );
921 OUString aImage =
GetImage(childNode, Reference< XComponentContext >(),
false);
946 for (
auto const& lStyle : lStyles)
966 for (
auto const& rDeck : aDecks)
968 const OUString sCommand =
".uno:SidebarDeck." + rDeck.msId;
985 SAL_INFO(
"cui.customize",
"Ignoring unexpected SfxCfgKind: " <<
static_cast<int>(pInfo->
nKind) );
1000 SfxGroupInfo_Impl *pInfo = weld::fromId<SfxGroupInfo_Impl*>(m_xTreeView->get_id(rIter));
1001 switch ( pInfo->
nKind )
1005 if (!m_xTreeView->iter_has_child(rIter))
1007 Reference< browse::XBrowseNode > rootNode(
1008 static_cast< browse::XBrowseNode*
>( pInfo->
pObject ) ) ;
1009 FillScriptList(rootNode, &rIter);
1016 if (!m_xTreeView->iter_has_child(rIter))
1018 const std::vector<SfxStyleInfo_Impl> lStyleFamilies = m_pStylesInfo->getStyleFamilies();
1019 for (
auto const& lStyleFamily : lStyleFamilies)
1024 m_xTreeView->insert(&rIter, -1, &pFamily->
sLabel, &
sId,
nullptr,
nullptr,
false,
nullptr);
1031 OSL_FAIL(
"Wrong group type!" );
1037#if HAVE_FEATURE_SCRIPTING
1038void CuiConfigGroupListBox::SelectMacro(
const SfxMacroInfoItem *pItem )
1040 auto const rMacro = pItem->GetQualifiedName();
1041 sal_Int32 nIdx {rMacro.lastIndexOf(
'.')};
1042 const std::u16string_view aMethod( rMacro.subView(nIdx + 1) );
1043 std::u16string_view aLib;
1044 std::u16string_view aModule;
1048 nIdx = rMacro.lastIndexOf(
'.', nIdx);
1053 sal_Int32 nIdx2 = nIdx + 1;
1058 std::unique_ptr<weld::TreeIter> xIter =
m_xTreeView->make_iterator();
1064 OUString aEntryBas =
m_xTreeView->get_text(*xIter);
1065 if (aEntryBas ==
xImp->m_sDlgMacros)
1068 std::unique_ptr<weld::TreeIter> xLocationIter =
m_xTreeView->make_iterator(xIter.get());
1074 std::unique_ptr<weld::TreeIter> xLibIter =
m_xTreeView->make_iterator(xLocationIter.get());
1079 OUString aEntryLib =
m_xTreeView->get_text(*xLibIter);
1080 if (aEntryLib == aLib)
1083 std::unique_ptr<weld::TreeIter> xModIter =
m_xTreeView->make_iterator(xLibIter.get());
1088 OUString aEntryMod =
m_xTreeView->get_text(*xModIter);
1089 if ( aEntryMod == aModule )
1098 if (aEntryMethod == aMethod)
1107 }
while (
m_xTreeView->iter_next_sibling(*xModIter));
1111 }
while (
m_xTreeView->iter_next_sibling(*xLibIter));
1114 }
while (
m_xTreeView->iter_next_sibling(*xLocationIter));
1133 weld::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& xFrame)
1134 : GenericDialogController(pParent,
"cui/ui/macroselectordialog.ui",
"MacroSelectorDialog")
1135 , m_xDialogDescription(m_xBuilder->weld_label(
"helpmacro"))
1138 , m_xLibraryFT(m_xBuilder->weld_label(
"libraryft"))
1139 , m_xMacronameFT(m_xBuilder->weld_label(
"macronameft"))
1141 , m_xCancelButton(m_xBuilder->weld_button(
"cancel"))
1142 , m_xDescriptionText(m_xBuilder->weld_text_view(
"description"))
1143 , m_xDescriptionFrame(m_xBuilder->weld_frame(
"descriptionframe"))
1194 if (&rCtrl == &m_xCategories->get_widget())
1196 m_xCategories->GroupSelected();
1211 if (rCEvt.GetCommand() != CommandEventId::ContextMenu || !xTreeView.
n_children())
1215 std::unique_ptr<weld::Menu> xPopup(xBuilder->weld_menu(
"sortmenu"));
1216 std::unique_ptr<weld::Menu> xDropMenu(xBuilder->weld_menu(
"sortsubmenu"));
1217 xDropMenu->set_active(
"alphabetically", xTreeView.
get_sort_order());
1218 xDropMenu->set_active(
"properorder", !xTreeView.
get_sort_order());
1220 OUString sCommand(xPopup->popup_at_rect(&xTreeView,
tools::Rectangle(rCEvt.GetMousePosPixel(),
Size(1,1))));
1221 if (sCommand ==
"alphabetically")
1225 else if (sCommand ==
"properorder")
1228 m_xCategories->GroupSelected();
1230 else if (!sCommand.isEmpty())
1232 SAL_WARN(
"cui.customize",
"Unknown context menu action: " << sCommand );
1244 if ( !url.isEmpty() )
1259 if (&rButton == m_xCancelButton.get())
1265 SaveLastUsedMacro();
1281 std::unique_ptr<weld::TreeIter> xIter =
m_xCommands->make_iterator();
1301 OUString sMacroInfo;
1304 std::unique_ptr<weld::TreeIter> xIter = xCategories.
make_iterator();
1311 sMacroInfo = xCategories.
get_text(*xIter) +
"|" + sMacroInfo;
1325 OUString sMacroInfo;
1327 if (sMacroInfo.isEmpty())
1331 sal_Int16 nInfoParts = 0;
1332 sal_Int16 nLastIndex = sMacroInfo.indexOf(
'|');
1333 if (nLastIndex > -1)
1336 while ( nLastIndex != -1 )
1339 nLastIndex = sMacroInfo.indexOf(
'|', nLastIndex + 1);
1344 std::unique_ptr<weld::TreeIter> xIter = xCategories.
make_iterator();
1349 OUString sNodeToExpand;
1351 sal_Int16 nOpenedNodes = 0;
1352 for (sal_Int16
i=0;
i<nInfoParts - 1;
i++)
1354 sNodeToExpand = sMacroInfo.getToken(
i,
'|');
1355 bIsIterValid =
true;
1356 while (bIsIterValid && xCategories.
get_text(*xIter) != sNodeToExpand)
1366 else if (nOpenedNodes < nInfoParts - 1)
1371 xCategories.
select(*xIter);
1381 OUString
sMacroName = sMacroInfo.getToken(nInfoParts - 1,
'|');
1382 bIsIterValid =
true;
1389 xCommands.
select(*xIter);
PropertiesInfo aProperties
Reference< XExecutableDialog > m_xDialog
constexpr OUStringLiteral MACRO_SELECTOR_CONFIGNAME
IMPL_LINK_NOARG(SvxScriptSelectorDialog, FunctionDoubleClickHdl, weld::TreeView &, bool)
constexpr OUStringLiteral LAST_RUN_MACRO_INFO
const char CMDURL_SPART_ONLY[]
constexpr OUStringLiteral STYLEPROP_UINAME
const char CMDURL_STYLEPROT_ONLY[]
IMPL_LINK(CuiConfigFunctionListBox, QueryTooltip, const weld::TreeIter &, rIter, OUString)
const char CMDURL_FPART_ONLY[]
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
OUString GetCurLabel() const
SfxGroupInfoArr_Impl aArr
OUString get_text(int nPos) const
OUString GetCurCommand() const
void scroll_to_row(int pos)
OUString get_selected_id() const
void append(const OUString &rId, const OUString &rStr, const weld::TreeIter *pParent=nullptr)
~CuiConfigFunctionListBox()
OUString GetSelectedScriptURI() const
OUString GetHelpText(bool bConsiderParent=true)
std::unique_ptr< weld::TreeView > m_xTreeView
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
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
css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual OUString GetHelpText(const OUString &aHelpURL, const weld::Widget *pWidget)
css::uno::Any GetUserItem(const OUString &sName) const
void SetUserItem(const OUString &sName, const css::uno::Any &aValue)
SvxScriptSelectorDialog(weld::Window *pParent, const css::uno::Reference< css::frame::XFrame > &xFrame)
std::unique_ptr< weld::Label > m_xDialogDescription
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
TValueType getUnpackedValueOrDefault(const OUString &sKey, const TValueType &aDefault) const
std::shared_ptr< weld::Dialog > m_xDialog
virtual void scroll_to_row(int row)=0
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const=0
virtual bool get_selected(TreeIter *pIter) const=0
virtual void make_sorted()=0
virtual void expand_row(const TreeIter &rIter)=0
virtual OUString get_text(int row, int col=-1) const=0
virtual int n_children() const=0
virtual bool get_iter_first(TreeIter &rIter) const=0
virtual bool iter_next_sibling(TreeIter &rIter) const=0
virtual void select(int pos)=0
virtual bool iter_parent(TreeIter &rIter) const=0
virtual bool iter_children(TreeIter &rIter) const=0
virtual bool iter_has_child(const TreeIter &rIter) const=0
virtual bool get_sort_order() const=0
virtual void make_unsorted()=0
OUString CuiResId(TranslateId aKey)
#define TOOLS_WARN_EXCEPTION(area, stream)
std::unique_ptr< weld::Button > m_xOKButton
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
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)
Sequence< beans::PropertyValue > GetCommandProperties(const OUString &rsCommandName, const OUString &rsModuleName)
OUString GetTooltipForCommand(const OUString &rsCommandName, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, const Reference< frame::XFrame > &rxFrame)
OUString GetCommandShortcut(const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame)
OUString GetModuleIdentifier(const Reference< frame::XFrame > &rxFrame)
OUString toId(const void *pValue)
const SvxPageUsage aArr[]
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)
SvxConfigGroupBoxResource_Impl()
OUString m_aStrGroupStyles
OUString m_aStrGroupSidebarDecks
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel
constexpr OUStringLiteral sMacroName