LibreOffice Module cui (master) 1
CommandCategoryListBox.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
21
22#include <com/sun/star/uno/XInterface.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
25#include <com/sun/star/frame/theUICommandDescription.hpp>
26#include <com/sun/star/ui/theUICategoryDescription.hpp>
27#include <com/sun/star/script/browse/XBrowseNode.hpp>
28#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
29#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
30#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
32#include <vcl/settings.hxx>
33#include <vcl/svapp.hxx>
34
35// include search util
36#include <com/sun/star/util/SearchFlags.hpp>
37#include <com/sun/star/util/SearchAlgorithms2.hpp>
40
41#include <dialmgr.hxx>
42#include <strings.hrc>
46#include <comphelper/string.hxx>
47#include <officecfg/Office/Common.hxx>
50#include <sal/log.hxx>
51
52#include <cfg.hxx> //for SaveInData
53
54CommandCategoryListBox::CommandCategoryListBox(std::unique_ptr<weld::ComboBox> xControl)
55 : pStylesInfo(nullptr)
56 , m_xControl(std::move(xControl))
57{
58 //Initialize search util
59 m_searchOptions.AlgorithmType2 = css::util::SearchAlgorithms2::ABSOLUTE;
60 m_searchOptions.transliterateFlags |= TransliterationFlags::IGNORE_CASE;
61 m_searchOptions.searchFlag |= (css::util::SearchFlags::REG_NOT_BEGINOFLINE
62 | css::util::SearchFlags::REG_NOT_ENDOFLINE);
63}
64
66
68{
69 // Clear objects from m_aGroupInfo vector to avoid memory leak
70 for (const auto& It : m_aGroupInfo)
71 {
72 if (It->nKind == SfxCfgKind::GROUP_STYLES && It->pObject)
73 {
74 SfxStyleInfo_Impl* pStyle = static_cast<SfxStyleInfo_Impl*>(It->pObject);
75 delete pStyle;
76 }
77 else if (It->nKind == SfxCfgKind::FUNCTION_SCRIPT && It->pObject)
78 {
79 OUString* pScriptURI = static_cast<OUString*>(It->pObject);
80 delete pScriptURI;
81 }
82 else if (It->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER && It->pObject)
83 {
84 css::uno::XInterface* xi = static_cast<css::uno::XInterface*>(It->pObject);
85 if (xi != nullptr)
86 {
87 xi->release();
88 }
89 }
90 }
91
92 m_aGroupInfo.clear();
93 m_xControl->clear();
94}
95
96void CommandCategoryListBox::Init(const css::uno::Reference<css::uno::XComponentContext>& xContext,
97 const css::uno::Reference<css::frame::XFrame>& xFrame,
98 const OUString& sModuleLongName)
99{
100 // User will not see incomplete UI
101 m_xControl->freeze();
102 ClearAll();
103
104 m_xContext = xContext;
106
107 m_sModuleLongName = sModuleLongName;
108 m_xGlobalCategoryInfo = css::ui::theUICategoryDescription::get(m_xContext);
110 css::uno::UNO_QUERY_THROW);
111 m_xUICmdDescription = css::frame::theUICommandDescription::get(m_xContext);
112
113 // Support style commands
114 css::uno::Reference<css::frame::XController> xController;
115 css::uno::Reference<css::frame::XModel> xModel;
116 if (xFrame.is())
117 xController = xFrame->getController();
118 if (xController.is())
119 xModel = xController->getModel();
120
121 m_aStylesInfo.init(sModuleLongName, xModel);
123
124 try
125 {
126 css::uno::Reference<css::frame::XDispatchInformationProvider> xProvider(
127 m_xFrame, css::uno::UNO_QUERY_THROW);
128 css::uno::Sequence<sal_Int16> lGroups = xProvider->getSupportedCommandGroups();
129
130 sal_Int32 nGroupsLength = lGroups.getLength();
131
132 if (nGroupsLength > 0)
133 {
134 // Add the category of "All commands"
135 m_aGroupInfo.push_back(
136 std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::GROUP_ALLFUNCTIONS, 0));
137 m_xControl->append(weld::toId(m_aGroupInfo.back().get()),
138 CuiResId(RID_CUISTR_ALLFUNCTIONS));
139 }
140
141 // Separate the "All commands"category from the actual categories
142 m_xControl->append_separator("");
143
144 typedef std::pair<OUString, sal_Int16> str_id;
145 std::vector<str_id> aCategories;
146
147 // Add the actual categories
148 for (sal_Int32 i = 0; i < nGroupsLength; ++i)
149 {
150 sal_Int16 nGroupID = lGroups[i];
151 OUString sGroupID = OUString::number(nGroupID);
152 OUString sGroupName;
153
154 try
155 {
156 m_xModuleCategoryInfo->getByName(sGroupID) >>= sGroupName;
157 if (sGroupName.isEmpty())
158 continue;
159 }
160 catch (const css::container::NoSuchElementException&)
161 {
162 continue;
163 }
164 aCategories.emplace_back(std::make_pair(sGroupName, nGroupID));
165 }
166
169 Application::GetSettings().GetUILanguageTag().getLocale());
170
171 std::sort(aCategories.begin(), aCategories.end(),
172 [&sort](const str_id& a, const str_id& b) {
173 return sort.compare(a.first, b.first) < 0;
174 });
175
176 // Add the actual categories
177 for (const auto& a : aCategories)
178 {
179 const OUString& rGroupName = a.first;
180 sal_Int16 nGroupID = a.second;
181 m_aGroupInfo.push_back(
182 std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::GROUP_FUNCTION, nGroupID));
183 m_xControl->append(weld::toId(m_aGroupInfo.back().get()), rGroupName);
184 }
185
186 // Separate regular commands from styles and macros
187 m_xControl->append_separator("");
188
189 // Add macros category
190 m_aGroupInfo.push_back(
191 std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::GROUP_SCRIPTCONTAINER, 0, nullptr));
192 m_xControl->append(weld::toId(m_aGroupInfo.back().get()), CuiResId(RID_CUISTR_MACROS));
193
194 // Add styles category
195 //TODO: last param should contain user data?
196 m_aGroupInfo.push_back(
197 std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::GROUP_STYLES, 0, nullptr));
198 m_xControl->append(weld::toId(m_aGroupInfo.back().get()),
199 CuiResId(RID_CUISTR_GROUP_STYLES));
200 }
201 catch (const css::uno::RuntimeException&)
202 {
203 throw;
204 }
205 catch (const css::uno::Exception&)
206 {
207 }
208
209 // Reveal the updated UI to user
210 m_xControl->thaw();
211 m_xControl->set_active(0);
212}
213
215 const css::uno::Sequence<css::frame::DispatchInformation>& xCommands,
216 CuiConfigFunctionListBox* pFunctionListBox, const OUString& filterTerm,
217 SaveInData* pCurrentSaveInData)
218{
219 // Setup search filter parameters
220 m_searchOptions.searchString = filterTerm;
222 const bool bInExperimentalMode = officecfg::Office::Common::Misc::ExperimentalMode::get();
223
224 for (const auto& rInfo : xCommands)
225 {
226 auto aProperties
228
229 OUString sUIName = getCommandName(rInfo.Command);
231 OUString sTooltipLabel
234 .replaceFirst("~", "");
235 bool bIsExperimental
237
238 // Hide experimental commands when not in experimental mode
239 bool bHideExperimental = bIsExperimental && !bInExperimentalMode;
240
241 // Apply the search filter
242 if (bHideExperimental
243 || (!filterTerm.isEmpty() && !textSearch.searchForward(sUIName)
244 && !textSearch.searchForward(sLabel) && !textSearch.searchForward(sTooltipLabel)
245 && !textSearch.searchForward(sPopupLabel)))
246 {
247 continue;
248 }
249
250 css::uno::Reference<css::graphic::XGraphic> xImage;
251 if (pCurrentSaveInData)
252 xImage = pCurrentSaveInData->GetImage(rInfo.Command);
253
254 m_aGroupInfo.push_back(std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::FUNCTION_SLOT, 0));
255 SfxGroupInfo_Impl* pGrpInfo = m_aGroupInfo.back().get();
256 pGrpInfo->sCommand = rInfo.Command;
257 pGrpInfo->sLabel = sUIName;
258 pGrpInfo->sTooltip = sTooltipLabel;
259 pFunctionListBox->append(weld::toId(m_aGroupInfo.back().get()), sUIName, xImage);
260 }
261}
262
263OUString CommandCategoryListBox::getCommandName(const OUString& sCommand)
264{
265 OUString sUIName;
266 try
267 {
268 css::uno::Reference<css::container::XNameAccess> xModuleConf;
269 m_xUICmdDescription->getByName(m_sModuleLongName) >>= xModuleConf;
270 if (xModuleConf.is())
271 {
272 ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand));
273 sUIName = lProps.getUnpackedValueOrDefault("Name", OUString());
274 }
275 }
276 catch (const css::uno::RuntimeException&)
277 {
278 throw;
279 }
280 catch (css::uno::Exception&)
281 {
282 sUIName.clear();
283 }
284
285 // fallback for missing UINames !?
286 if (sUIName.isEmpty())
287 {
288 sUIName = sCommand;
289 }
290
291 return sUIName;
292}
293
295 const OUString& filterTerm,
296 SaveInData* pCurrentSaveInData)
297{
298 SfxGroupInfo_Impl* pInfo = weld::fromId<SfxGroupInfo_Impl*>(m_xControl->get_active_id());
299 std::vector<std::unique_ptr<weld::TreeIter>> aNodesToExpand;
300 pFunctionListBox->freeze();
301 pFunctionListBox->ClearAll();
302
303 switch (pInfo->nKind)
304 {
306 {
307 css::uno::Reference<css::frame::XDispatchInformationProvider> xProvider(
308 m_xFrame, css::uno::UNO_QUERY);
309 sal_Int32 nEntryCount = m_xControl->get_count();
310
311 for (sal_Int32 nCurPos = 0; nCurPos < nEntryCount; ++nCurPos)
312 {
313 SfxGroupInfo_Impl* pCurrentInfo
314 = weld::fromId<SfxGroupInfo_Impl*>(m_xControl->get_id(nCurPos));
315
316 if (!pCurrentInfo) //separator
317 continue;
318
319 if (pCurrentInfo->nKind == SfxCfgKind::GROUP_FUNCTION)
320 {
321 css::uno::Sequence<css::frame::DispatchInformation> lCommands;
322 try
323 {
324 lCommands = xProvider->getConfigurableDispatchInformation(
325 pCurrentInfo->nUniqueID);
326 FillFunctionsList(lCommands, pFunctionListBox, filterTerm,
327 pCurrentSaveInData);
328 }
329 catch (css::container::NoSuchElementException&)
330 {
331 }
332 }
333 }
334
335 break;
336 }
338 {
339 sal_uInt16 nGroup = pInfo->nUniqueID;
340 css::uno::Reference<css::frame::XDispatchInformationProvider> xProvider(
341 m_xFrame, css::uno::UNO_QUERY_THROW);
342 css::uno::Sequence<css::frame::DispatchInformation> lCommands
343 = xProvider->getConfigurableDispatchInformation(nGroup);
344 FillFunctionsList(lCommands, pFunctionListBox, filterTerm, pCurrentSaveInData);
345 break;
346 }
348 {
349 SAL_INFO("cui.customize", "** ** About to initialise SF Scripts");
350 // Add Scripting Framework entries
351 css::uno::Reference<css::script::browse::XBrowseNode> rootNode;
352 try
353 {
354 css::uno::Reference<css::script::browse::XBrowseNodeFactory> xFac
355 = css::script::browse::theBrowseNodeFactory::get(m_xContext);
356 rootNode.set(xFac->createView(
357 css::script::browse::BrowseNodeFactoryViewTypes::MACROSELECTOR));
358 }
359 catch (css::uno::Exception const&)
360 {
362 "cui.customize",
363 "Caught some exception whilst retrieving browse nodes from factory");
364 // TODO exception handling
365 }
366
367 if (rootNode.is() && rootNode->hasChildNodes())
368 {
369 //We call acquire on the XBrowseNode so that it does not
370 //get autodestructed and become invalid when accessed later.
371 rootNode->acquire();
372
373 m_aGroupInfo.push_back(std::make_unique<SfxGroupInfo_Impl>(
374 SfxCfgKind::GROUP_SCRIPTCONTAINER, 0, static_cast<void*>(rootNode.get())));
375
376 // Add main macro groups
377 const css::uno::Sequence<css::uno::Reference<css::script::browse::XBrowseNode>>
378 aChildNodes = rootNode->getChildNodes();
379 for (auto const& childGroup : aChildNodes)
380 {
381 childGroup->acquire();
382
383 if (childGroup->hasChildNodes())
384 {
385 OUString sUIName;
386 if (childGroup->getName() == "user")
387 {
388 sUIName = CuiResId(RID_CUISTR_MYMACROS);
389 }
390 else if (childGroup->getName() == "share")
391 {
392 sUIName = CuiResId(RID_CUISTR_PRODMACROS);
393 }
394 else
395 {
396 sUIName = childGroup->getName();
397 }
398
399 if (sUIName.isEmpty())
400 {
401 continue;
402 }
403
404 m_aGroupInfo.push_back(std::make_unique<SfxGroupInfo_Impl>(
406 std::unique_ptr<weld::TreeIter> xMacroGroup(pFunctionListBox->tree_append(
407 weld::toId(m_aGroupInfo.back().get()), sUIName));
408
409 {
410 // tdf#128010: Do not nag user asking to enable JRE: if it's disabled,
411 // simply don't show relevant entries (user chose to not use JRE)
412 css::uno::ContextLayer layer(
414 //Add the children and the grand children
415 addChildren(xMacroGroup.get(), childGroup, pFunctionListBox, filterTerm,
416 pCurrentSaveInData, aNodesToExpand);
417 }
418
419 // Remove the main group if empty
420 if (!pFunctionListBox->iter_has_child(*xMacroGroup))
421 {
422 pFunctionListBox->remove(*xMacroGroup);
423 }
424 else if (!filterTerm.isEmpty())
425 {
426 aNodesToExpand.emplace_back(std::move(xMacroGroup));
427 }
428 }
429 }
430 }
431
432 break;
433 }
435 {
436 const std::vector<SfxStyleInfo_Impl> lStyleFamilies = pStylesInfo->getStyleFamilies();
437
438 for (const auto& pIt : lStyleFamilies)
439 {
440 if (pIt.sLabel.isEmpty())
441 {
442 continue;
443 }
444
445 m_aGroupInfo.push_back(
446 std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::GROUP_STYLES, 0));
447 // pIt.sLabel is Name of the style family
448 std::unique_ptr<weld::TreeIter> xFuncEntry(pFunctionListBox->tree_append(
449 weld::toId(m_aGroupInfo.back().get()), pIt.sLabel));
450
451 const std::vector<SfxStyleInfo_Impl> lStyles = pStylesInfo->getStyles(pIt.sFamily);
452
453 // Setup search filter parameters
454 m_searchOptions.searchString = filterTerm;
456
457 // Insert children (styles)
458 for (const auto& pStyleIt : lStyles)
459 {
460 OUString sUIName = pStyleIt.sLabel;
461 sal_Int32 aStartPos = 0;
462 sal_Int32 aEndPos = sUIName.getLength();
463
464 // Apply the search filter
465 if (!filterTerm.isEmpty()
466 && !textSearch.SearchForward(sUIName, &aStartPos, &aEndPos))
467 {
468 continue;
469 }
470
471 SfxStyleInfo_Impl* pStyle = new SfxStyleInfo_Impl(pStyleIt);
472
473 m_aGroupInfo.push_back(
474 std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::GROUP_STYLES, 0, pStyle));
475
476 m_aGroupInfo.back()->sCommand = pStyle->sCommand;
477 m_aGroupInfo.back()->sLabel = pStyle->sLabel;
478
479 pFunctionListBox->append(weld::toId(m_aGroupInfo.back().get()), sUIName,
480 xFuncEntry.get());
481 }
482
483 // Remove the style group from the list if no children
484 if (!pFunctionListBox->iter_has_child(*xFuncEntry))
485 {
486 pFunctionListBox->remove(*xFuncEntry);
487 }
488 else if (!filterTerm.isEmpty())
489 {
490 aNodesToExpand.emplace_back(std::move(xFuncEntry));
491 }
492 }
493
494 break;
495 }
496 default:
497 // Do nothing, the list box will stay empty
498 SAL_INFO("cui.customize",
499 "Ignoring unexpected SfxCfgKind: " << static_cast<int>(pInfo->nKind));
500 break;
501 }
502
503 pFunctionListBox->thaw();
504
505 if (pFunctionListBox->n_children())
506 pFunctionListBox->select(0);
507
508 //post freeze
509 for (const auto& it : aNodesToExpand)
510 pFunctionListBox->expand_row(*it);
511}
512
514
516 const weld::TreeIter* parentEntry,
517 const css::uno::Reference<css::script::browse::XBrowseNode>& parentNode,
518 CuiConfigFunctionListBox* pFunctionListBox, const OUString& filterTerm,
519 SaveInData* pCurrentSaveInData, std::vector<std::unique_ptr<weld::TreeIter>>& rNodesToExpand)
520{
521 // Setup search filter parameters
522 m_searchOptions.searchString = filterTerm;
524
525 const css::uno::Sequence<css::uno::Reference<css::script::browse::XBrowseNode>> aChildNodes
526 = parentNode->getChildNodes();
527 for (auto const& child : aChildNodes)
528 {
529 // Acquire to prevent auto-destruction
530 child->acquire();
531
532 if (child->hasChildNodes())
533 {
534 OUString sUIName = child->getName();
535
536 m_aGroupInfo.push_back(std::make_unique<SfxGroupInfo_Impl>(
537 SfxCfgKind::GROUP_SCRIPTCONTAINER, 0, static_cast<void*>(child.get())));
538 std::unique_ptr<weld::TreeIter> xNewEntry(pFunctionListBox->tree_append(
539 weld::toId(m_aGroupInfo.back().get()), sUIName, parentEntry));
540
541 addChildren(xNewEntry.get(), child, pFunctionListBox, filterTerm, pCurrentSaveInData,
542 rNodesToExpand);
543
544 // Remove the group if empty
545 if (!pFunctionListBox->iter_has_child(*xNewEntry))
546 pFunctionListBox->remove(*xNewEntry);
547 else
548 rNodesToExpand.emplace_back(std::move(xNewEntry));
549 }
550 else if (child->getType() == css::script::browse::BrowseNodeTypes::SCRIPT)
551 {
552 // Prepare for filtering
553 OUString sUIName = child->getName();
554 sal_Int32 aStartPos = 0;
555 sal_Int32 aEndPos = sUIName.getLength();
556
557 // Apply the search filter
558 if (!filterTerm.isEmpty() && !textSearch.SearchForward(sUIName, &aStartPos, &aEndPos))
559 {
560 continue;
561 }
562
563 OUString uri, description;
564
565 css::uno::Reference<css::beans::XPropertySet> xPropSet(child, css::uno::UNO_QUERY);
566
567 if (!xPropSet.is())
568 {
569 continue;
570 }
571
572 css::uno::Any value = xPropSet->getPropertyValue("URI");
573 value >>= uri;
574
575 try
576 {
577 value = xPropSet->getPropertyValue("Description");
578 value >>= description;
579 }
580 catch (css::uno::Exception&)
581 {
582 // do nothing, the description will be empty
583 }
584
585 if (description.isEmpty())
586 {
587 description = CuiResId(RID_CUISTR_NOMACRODESC);
588 }
589
590 OUString* pScriptURI = new OUString(uri);
591
592 css::uno::Reference<css::graphic::XGraphic> xImage;
593 if (pCurrentSaveInData)
594 xImage = pCurrentSaveInData->GetImage(uri);
595
596 m_aGroupInfo.push_back(
597 std::make_unique<SfxGroupInfo_Impl>(SfxCfgKind::FUNCTION_SCRIPT, 0, pScriptURI));
598 m_aGroupInfo.back()->sCommand = uri;
599 m_aGroupInfo.back()->sLabel = sUIName;
600 m_aGroupInfo.back()->sHelpText = description;
601 pFunctionListBox->append(weld::toId(m_aGroupInfo.back().get()), sUIName, xImage,
602 parentEntry);
603 }
604 }
605}
606
607/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
PropertiesInfo aProperties
@ GROUP_SCRIPTCONTAINER
@ GROUP_ALLFUNCTIONS
static const AllSettings & GetSettings()
css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo
css::uno::Reference< css::uno::XComponentContext > m_xContext
void addChildren(const weld::TreeIter *parentEntry, const css::uno::Reference< com::sun::star::script::browse::XBrowseNode > &parentNode, CuiConfigFunctionListBox *pFunctionListBox, const OUString &filterTerm, SaveInData *pCurrentSaveInData, std::vector< std::unique_ptr< weld::TreeIter > > &rNodesToExpand)
std::unique_ptr< weld::ComboBox > m_xControl
void SetStylesInfo(SfxStylesInfo_Impl *pStyles)
css::uno::Reference< css::frame::XFrame > m_xFrame
SfxStylesInfo_Impl * pStylesInfo
void Init(const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XFrame > &xFrame, const OUString &sModuleLongName)
SfxStylesInfo_Impl m_aStylesInfo
CommandCategoryListBox(std::unique_ptr< weld::ComboBox > xControl)
SfxGroupInfoArr_Impl m_aGroupInfo
css::uno::Reference< css::container::XNameAccess > m_xUICmdDescription
i18nutil::SearchOptions2 m_searchOptions
OUString getCommandName(const OUString &sCommand)
css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo
void FillFunctionsList(const css::uno::Sequence< css::frame::DispatchInformation > &xCommands, CuiConfigFunctionListBox *pFunctionListBox, const OUString &filterTerm, SaveInData *pCurrentSaveInData)
void categorySelected(CuiConfigFunctionListBox *pFunctionListBox, const OUString &filterTerm, SaveInData *pCurrentSaveInData=nullptr)
Signals that a command category has been selected.
void select(int pos)
Definition: cfgutil.hxx:166
std::unique_ptr< weld::TreeIter > tree_append(const OUString &rId, const OUString &rStr, const weld::TreeIter *pParent=nullptr)
Definition: cfgutil.hxx:128
void expand_row(const weld::TreeIter &rIter)
Definition: cfgutil.hxx:147
void append(const OUString &rId, const OUString &rStr, const weld::TreeIter *pParent=nullptr)
Definition: cfgutil.hxx:124
bool iter_has_child(const weld::TreeIter &rIter) const
Definition: cfgutil.hxx:150
int n_children() const
Definition: cfgutil.hxx:148
void remove(int nPos)
Definition: cfgutil.hxx:144
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:336
TValueType getUnpackedValueOrDefault(const OUString &sKey, const TValueType &aDefault) const
bool SearchForward(const OUString &rStr, sal_Int32 *pStart, sal_Int32 *pEnd, css::util::SearchResult *pRes=nullptr)
bool searchForward(const OUString &rStr)
Any value
OUString CuiResId(TranslateId aKey)
Definition: cuiresmgr.cxx:23
#define TOOLS_WARN_EXCEPTION(area, stream)
uno_Any a
#define SAL_INFO(area, stream)
const LanguageTag & getLocale()
css::uno::Reference< css::uno::XCurrentContext > NoEnableJavaInteractionContext()
Reference< XComponentContext > getProcessComponentContext()
int i
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 GetPopupLabelForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
OUString GetLabelForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
bool IsExperimental(const OUString &rsCommandName, const OUString &rModuleName)
OUString toId(const void *pValue)
OUString sTooltip
Definition: cfgutil.hxx:100
OUString sLabel
Definition: cfgutil.hxx:98
sal_uInt16 nUniqueID
Definition: cfgutil.hxx:95
OUString sCommand
Definition: cfgutil.hxx:97
SfxCfgKind nKind
Definition: cfgutil.hxx:94
OUString sCommand
Definition: cfgutil.hxx:46
OUString sLabel
Definition: cfgutil.hxx:47
void init(const OUString &rModuleName, const css::uno::Reference< css::frame::XModel > &xModel)
Definition: cfgutil.cxx:72
std::vector< SfxStyleInfo_Impl > getStyleFamilies() const
Definition: cfgutil.cxx:161
std::vector< SfxStyleInfo_Impl > getStyles(const OUString &sFamily)
Definition: cfgutil.cxx:203
TransliterationFlags transliterateFlags
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel
bool bIsExperimental
Reference< XControl > m_xControl