LibreOffice Module cui (master) 1
SvxNotebookbarConfigPage.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
20#include <sal/config.h>
21
23#include <vcl/event.hxx>
24#include <vcl/weld.hxx>
25#include <vcl/svapp.hxx>
26
27#include <algorithm>
28#include <cstddef>
29
30#include <helpids.h>
31#include <strings.hrc>
32
33#include <cfg.hxx>
36#include <dialmgr.hxx>
37#include <libxml/parser.h>
38#include <osl/file.hxx>
43#include <o3tl/string_view.hxx>
44#include <com/sun/star/frame/theUICommandDescription.hpp>
45
46namespace uno = com::sun::star::uno;
48namespace lang = com::sun::star::lang;
52
53static bool isCategoryAvailable(std::u16string_view sClassId, std::u16string_view sUIItemId,
54 std::u16string_view sActiveCategory, bool& isCategory)
55{
56 if (sUIItemId == sActiveCategory)
57 return true;
58 else if ((sClassId == u"GtkMenu" || sClassId == u"GtkGrid") && sUIItemId != sActiveCategory)
59 {
60 isCategory = false;
61 return false;
62 }
63 return false;
64}
65
66static OUString charToString(const char* cString)
67{
68 return OUString(cString, strlen(cString), RTL_TEXTENCODING_UTF8);
69}
70
71static OUString getFileName(std::u16string_view aFileName)
72{
73 if (aFileName == u"notebookbar.ui")
74 return CuiResId(RID_CUISTR_TABBED);
75 else if (aFileName == u"notebookbar_compact.ui")
76 return CuiResId(RID_CUISTR_TABBED_COMPACT);
77 else if (aFileName == u"notebookbar_groupedbar_full.ui")
78 return CuiResId(RID_CUISTR_GROUPEDBAR);
79 else if (aFileName == u"notebookbar_groupedbar_compact.ui")
80 return CuiResId(RID_CUISTR_GROUPEDBAR_COMPACT);
81 else
82 return "None";
83}
84
85static OUString getModuleId(std::u16string_view sModuleName)
86{
87 if (sModuleName == u"Writer")
88 return "com.sun.star.text.TextDocument";
89 else if (sModuleName == u"Draw")
90 return "com.sun.star.drawing.DrawingDocument";
91 else if (sModuleName == u"Impress")
92 return "com.sun.star.presentation.PresentationDocument";
93 else if (sModuleName == u"Calc")
94 return "com.sun.star.sheet.SpreadsheetDocument";
95 else
96 return "None";
97}
98
100 weld::DialogController* pController,
101 const SfxItemSet& rSet)
102 : SvxConfigPage(pPage, pController, rSet)
103{
104 m_xCommandCategoryListBox->set_visible(false);
105 m_xDescriptionFieldLb->set_visible(false);
106 m_xSearchEdit->set_visible(false);
107 m_xDescriptionField->set_visible(false);
108 m_xMoveUpButton->set_visible(false);
109 m_xMoveDownButton->set_visible(false);
110 m_xCommandButtons->set_visible(false);
111 m_xLeftFunctionLabel->set_visible(false);
112 m_xSearchLabel->set_visible(false);
113 m_xCategoryLabel->set_visible(false);
114 m_xCustomizeBox->set_visible(false);
115 m_xCustomizeLabel->set_visible(false);
116
117 weld::TreeView& rCommandCategoryBox = m_xFunctions->get_widget();
118 rCommandCategoryBox.hide();
119
120 m_xContentsListBox.reset(
121 new SvxNotebookbarEntriesListBox(m_xBuilder->weld_tree_view("toolcontents"), this));
123 new SvxConfigPageFunctionDropTarget(*this, m_xContentsListBox->get_widget()));
124 weld::TreeView& rTreeView = m_xContentsListBox->get_widget();
125 Size aSize(m_xFunctions->get_size_request());
126 rTreeView.set_size_request(aSize.Width(), aSize.Height());
127
128 rTreeView.set_hexpand(true);
129 rTreeView.set_vexpand(true);
131 rTreeView.show();
132}
133
135
137
139
141{
142 m_xTopLevelListBox->clear();
143 m_xContentsListBox->clear();
144 m_xSaveInListBox->clear();
146 OUString sNotebookbarInterface = getFileName(m_sFileName);
147
148 OUString sScopeName
149 = utl::ConfigManager::getProductName() + " " + m_sAppName + " - " + sNotebookbarInterface;
150 OUString sSaveInListBoxID = notebookbarTabScope;
151
152 m_xSaveInListBox->append(sSaveInListBoxID, sScopeName);
153 m_xSaveInListBox->set_active_id(sSaveInListBoxID);
154
155 m_xTopLevelListBox->append("NotebookBar", CuiResId(RID_CUISTR_ALL_COMMANDS));
156 m_xTopLevelListBox->set_active_id("NotebookBar");
158}
159
161 const css::uno::Reference<css::ui::XUIConfigurationManager>& xCfgMgr,
162 const css::uno::Reference<css::ui::XUIConfigurationManager>& xParentCfgMgr,
163 const OUString& aModuleId, bool bDocConfig)
164{
165 return static_cast<SaveInData*>(
166 new ToolbarSaveInData(xCfgMgr, xParentCfgMgr, aModuleId, bDocConfig));
167}
168
170
172{
173 OUString msg = CuiResId(RID_CUISTR_CONFIRM_TOOLBAR_RESET);
174
175 OUString saveInName = m_xSaveInListBox->get_active_text();
176
177 OUString label = SvxConfigPageHelper::replaceSaveInName(msg, saveInName);
178
179 std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(
180 GetFrameWeld(), VclMessageType::Question, VclButtonsType::YesNo, label));
181 int nValue = xQueryBox->run();
182 if (nValue == RET_YES)
183 {
184 OUString sOriginalUIPath = CustomNotebookbarGenerator::getOriginalUIPath();
185 OUString sCustomizedUIPath = CustomNotebookbarGenerator::getCustomizedUIPath();
186 osl::File::copy(sOriginalUIPath, sCustomizedUIPath);
187 OUString sNotebookbarInterface = getFileName(m_sFileName);
188 Sequence<OUString> sSequenceEntries;
189 CustomNotebookbarGenerator::setCustomizedUIItem(sSequenceEntries, sNotebookbarInterface);
190 OUString sUIPath = "modules/s" + m_sAppName.toAsciiLowerCase() + "/ui/";
192 }
193 return nValue;
194}
195
196void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId,
197 const OUString& sUIItemId,
198 const OUString& sUIItemCommand,
199 weld::TreeView& rTreeView,
200 const weld::TreeIter& rIter)
201{
202 css::uno::Reference<css::container::XNameAccess> m_xCommandToLabelMap;
203 uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
205 css::frame::theUICommandDescription::get(xContext));
206
208
209 xNameAccess->getByName(getModuleId(m_sAppName)) >>= m_xCommandToLabelMap;
210
211 try
212 {
213 uno::Any aModuleVal = m_xCommandToLabelMap->getByName(sUIItemCommand);
214
215 aModuleVal >>= aPropSeq;
216 }
217 catch (container::NoSuchElementException&)
218 {
219 }
220
221 OUString aLabel;
222 for (auto const& prop : std::as_const(aPropSeq))
223 if (prop.Name == "Name")
224 prop.Value >>= aLabel;
225
227
228 if (sClassId == u"GtkSeparatorMenuItem" || sClassId == u"GtkSeparator")
229 {
230 rTreeView.set_text(rIter, "--------------------------------------------", 0);
231 }
232 else
233 {
234 if (aName.isEmpty())
235 aName = sUIItemId;
236 auto xImage = GetSaveInData()->GetImage(sUIItemCommand);
237 if (xImage.is())
238 rTreeView.set_image(rIter, xImage, -1);
239 rTreeView.set_text(rIter, aName, 0);
240 rTreeView.set_id(rIter, sUIItemCommand);
241 }
242}
243
244void SvxNotebookbarConfigPage::getNodeValue(xmlNode* pNodePtr, NotebookbarEntries& aNodeEntries)
245{
246 pNodePtr = pNodePtr->xmlChildrenNode;
247 while (pNodePtr)
248 {
249 if (!(xmlStrcmp(pNodePtr->name, reinterpret_cast<const xmlChar*>("property"))))
250 {
251 xmlChar* UriValue = xmlGetProp(pNodePtr, reinterpret_cast<const xmlChar*>("name"));
252 if (!(xmlStrcmp(UriValue, reinterpret_cast<const xmlChar*>("visible"))))
253 {
254 xmlChar* aValue = xmlNodeGetContent(pNodePtr);
255 const char* cVisibleValue = reinterpret_cast<const char*>(aValue);
256 aNodeEntries.sVisibleValue = charToString(cVisibleValue);
257 xmlFree(aValue);
258 }
259 if (!(xmlStrcmp(UriValue, reinterpret_cast<const xmlChar*>("action_name"))))
260 {
261 xmlChar* aValue = xmlNodeGetContent(pNodePtr);
262 const char* cActionName = reinterpret_cast<const char*>(aValue);
263 aNodeEntries.sActionName = charToString(cActionName);
264 xmlFree(aValue);
265 }
266 xmlFree(UriValue);
267 }
268 pNodePtr = pNodePtr->next;
269 }
270}
271
272void SvxNotebookbarConfigPage::searchNodeandAttribute(std::vector<NotebookbarEntries>& aEntries,
273 std::vector<CategoriesEntries>& aCategoryList,
274 OUString& sActiveCategory,
275 CategoriesEntries& aCurItemEntry,
276 xmlNode* pNodePtr, bool isCategory)
277{
278 pNodePtr = pNodePtr->xmlChildrenNode;
279 while (pNodePtr)
280 {
281 if (pNodePtr->type == XML_ELEMENT_NODE)
282 {
283 const char* cNodeName = reinterpret_cast<const char*>(pNodePtr->name);
284 if (strcmp(cNodeName, "object") == 0)
285 {
286 OUString sSecondVal;
287
288 xmlChar* UriValue = xmlGetProp(pNodePtr, reinterpret_cast<const xmlChar*>("id"));
289 const char* cUIItemID = reinterpret_cast<const char*>(UriValue);
290 OUString sUIItemId = charToString(cUIItemID);
291 xmlFree(UriValue);
292
293 UriValue = xmlGetProp(pNodePtr, reinterpret_cast<const xmlChar*>("class"));
294 const char* cClassId = reinterpret_cast<const char*>(UriValue);
295 OUString sClassId = charToString(cClassId);
296 xmlFree(UriValue);
297
298 CategoriesEntries aCategoryEntry;
299 if (sClassId == "sfxlo-PriorityHBox")
300 {
301 aCategoryEntry.sDisplayName = sUIItemId;
302 aCategoryEntry.sUIItemId = sUIItemId;
303 aCategoryEntry.sClassType = sClassId;
304 aCategoryList.push_back(aCategoryEntry);
305
306 aCurItemEntry = aCategoryEntry;
307 }
308 else if (sClassId == "sfxlo-PriorityMergedHBox")
309 {
310 aCategoryEntry.sDisplayName = aCurItemEntry.sDisplayName + " | " + sUIItemId;
311 aCategoryEntry.sUIItemId = sUIItemId;
312 aCategoryEntry.sClassType = sClassId;
313
314 if (aCurItemEntry.sClassType == sClassId)
315 {
316 sal_Int32 rPos = 0;
317 aCategoryEntry.sDisplayName
318 = OUString::Concat(
319 o3tl::getToken(aCurItemEntry.sDisplayName, rPos, ' ', rPos))
320 + " | " + sUIItemId;
321 }
322 aCategoryList.push_back(aCategoryEntry);
323 aCurItemEntry = aCategoryEntry;
324 }
325 else if (sClassId == "svtlo-ManagedMenuButton")
326 {
327 sal_Int32 rPos = 1;
328 sSecondVal = sUIItemId.getToken(rPos, ':', rPos);
329 if (!sSecondVal.isEmpty())
330 {
331 aCategoryEntry.sDisplayName
332 = aCurItemEntry.sDisplayName + " | " + sSecondVal;
333 aCategoryEntry.sUIItemId = sSecondVal;
334 aCategoryList.push_back(aCategoryEntry);
335 }
336 }
337
338 NotebookbarEntries nodeEntries;
339 if (isCategoryAvailable(sClassId, sUIItemId, sActiveCategory, isCategory)
340 || isCategory)
341 {
342 isCategory = true;
343 if (sClassId == "GtkMenuItem" || sClassId == "GtkToolButton"
344 || sClassId == "GtkMenuToolButton"
345 || (sClassId == "svtlo-ManagedMenuButton" && sSecondVal.isEmpty()))
346 {
347 nodeEntries.sClassId = sClassId;
348 nodeEntries.sUIItemId = sUIItemId;
349 nodeEntries.sDisplayName = sUIItemId;
350
351 getNodeValue(pNodePtr, nodeEntries);
352 aEntries.push_back(nodeEntries);
353 }
354 else if (sClassId == "GtkSeparatorMenuItem" || sClassId == "GtkSeparator")
355 {
356 nodeEntries.sClassId = sClassId;
357 nodeEntries.sUIItemId = sUIItemId;
358 nodeEntries.sDisplayName = "Null";
359 nodeEntries.sVisibleValue = "Null";
360 nodeEntries.sActionName = "Null";
361 aEntries.push_back(nodeEntries);
362 }
363 else if (sClassId == "sfxlo-PriorityHBox"
364 || sClassId == "sfxlo-PriorityMergedHBox"
365 || sClassId == "svtlo-ManagedMenuButton")
366 {
367 nodeEntries.sClassId = sClassId;
368 nodeEntries.sUIItemId = sUIItemId;
369 nodeEntries.sDisplayName
370 = aCategoryList[aCategoryList.size() - 1].sDisplayName;
371 nodeEntries.sVisibleValue = "Null";
372 nodeEntries.sActionName = "Null";
373 aEntries.push_back(nodeEntries);
374 }
375 }
376 }
377 searchNodeandAttribute(aEntries, aCategoryList, sActiveCategory, aCurItemEntry,
378 pNodePtr, isCategory);
379 }
380 pNodePtr = pNodePtr->next;
381 }
382}
383
385 std::vector<NotebookbarEntries>& aEntries,
386 std::vector<CategoriesEntries>& aCategoryList,
387 OUString& sActiveCategory)
388{
389 CategoriesEntries aCurItemEntry;
390 searchNodeandAttribute(aEntries, aCategoryList, sActiveCategory, aCurItemEntry, pRootNodePtr,
391 false);
392}
393
395{
396 OString sUIFileUIPath = CustomNotebookbarGenerator::getSystemPath(
398 xmlDocPtr pDoc = xmlParseFile(sUIFileUIPath.getStr());
399 if (!pDoc)
400 return;
401 xmlNodePtr pNodePtr = xmlDocGetRootElement(pDoc);
402
403 std::vector<NotebookbarEntries> aEntries;
404 std::vector<CategoriesEntries> aCategoryList;
405 OUString sActiveCategory = m_xTopLevelListBox->get_active_id();
406 FillFunctionsList(pNodePtr, aEntries, aCategoryList, sActiveCategory);
407
408 if (m_xTopLevelListBox->get_count() == 1)
409 {
410 for (const auto& rCategory : aCategoryList)
411 m_xTopLevelListBox->append(rCategory.sUIItemId, rCategory.sDisplayName);
412 }
413 tools::ULong nStart = 0;
414 if (aEntries[nStart].sClassId == "sfxlo-PriorityHBox"
415 || aEntries[nStart].sClassId == "sfxlo-PriorityMergedHBox")
416 nStart = 1;
417
418 std::vector<NotebookbarEntries> aTempEntries;
419 for (std::size_t nIdx = nStart; nIdx < aEntries.size(); nIdx++)
420 {
421 if (aEntries[nIdx].sClassId == "svtlo-ManagedMenuButton")
422 {
423 aTempEntries.push_back(aEntries[nIdx]);
424 sal_Int32 rPos = 1;
425 sActiveCategory = aEntries[nIdx].sUIItemId.getToken(rPos, ':', rPos);
426 FillFunctionsList(pNodePtr, aTempEntries, aCategoryList, sActiveCategory);
427 }
428 else
429 aTempEntries.push_back(aEntries[nIdx]);
430 }
431
432 aEntries = std::move(aTempEntries);
433
434 weld::TreeView& rTreeView = m_xContentsListBox->get_widget();
435 rTreeView.bulk_insert_for_each(
436 aEntries.size(), [this, &rTreeView, &aEntries](weld::TreeIter& rIter, int nIdx) {
437 if (aEntries[nIdx].sActionName != "Null")
438 {
439 if (aEntries[nIdx].sVisibleValue == "True")
440 {
441 rTreeView.set_toggle(rIter, TRISTATE_TRUE);
442 }
443 else
444 {
445 rTreeView.set_toggle(rIter, TRISTATE_FALSE);
446 }
447 }
449 aEntries[nIdx].sActionName, rTreeView, rIter);
450 });
451
452 aEntries.clear();
453
454 xmlFreeDoc(pDoc);
455}
456
458 SvxConfigPage* pPg)
459 : SvxMenuEntriesListBox(std::move(xParent), pPg)
460{
461 m_xControl->connect_toggled(LINK(this, SvxNotebookbarEntriesListBox, CheckButtonHdl));
462 m_xControl->connect_key_press(Link<const KeyEvent&, bool>());
463 m_xControl->connect_key_press(LINK(this, SvxNotebookbarEntriesListBox, KeyInputHdl));
464 // remove the inherited connect_query_tooltip then add the new one
465 m_xControl->connect_query_tooltip(Link<const weld::TreeIter&, OUString>());
466 m_xControl->connect_query_tooltip(LINK(this, SvxNotebookbarEntriesListBox, QueryTooltip));
467}
468
470
471static void EditRegistryFile(std::u16string_view sUIItemId, const OUString& sSetEntry,
472 const OUString& sNotebookbarInterface)
473{
474 int nFlag = 0;
475 Sequence<OUString> aOldEntries
477 Sequence<OUString> aNewEntries(aOldEntries.getLength() + 1);
478 auto pNewEntries = aNewEntries.getArray();
479 for (int nIdx = 0; nIdx < aOldEntries.getLength(); nIdx++)
480 {
481 sal_Int32 rPos = 0;
482 std::u16string_view sFirstValue = o3tl::getToken(aOldEntries[nIdx], rPos, ',', rPos);
483 if (sFirstValue == sUIItemId)
484 {
485 aOldEntries.getArray()[nIdx] = sSetEntry;
486 nFlag = 1;
487 break;
488 }
489 pNewEntries[nIdx] = aOldEntries[nIdx];
490 }
491
492 if (nFlag == 0)
493 {
494 pNewEntries[aOldEntries.getLength()] = sSetEntry;
495 CustomNotebookbarGenerator::setCustomizedUIItem(aNewEntries, sNotebookbarInterface);
496 }
497 else
498 {
499 CustomNotebookbarGenerator::setCustomizedUIItem(aOldEntries, sNotebookbarInterface);
500 }
501}
502
504{
505 OUString sUIItemId = m_xControl->get_selected_id();
506 OUString sNotebookbarInterface = getFileName(m_pPage->GetFileName());
507
508 OUString sVisible;
509 if (m_xControl->get_toggle(nRow) == TRISTATE_TRUE)
510 sVisible = "True";
511 else
512 sVisible = "False";
513 OUString sSetEntries = sUIItemId + ",visible," + sVisible;
514 Sequence<OUString> sSeqOfEntries{ sSetEntries };
515 EditRegistryFile(sUIItemId, sSetEntries, sNotebookbarInterface);
517 OUString sUIPath = "modules/s" + m_pPage->GetAppName().toAsciiLowerCase() + "/ui/";
519}
520
522 void)
523{
524 ChangedVisibility(m_xControl->get_iter_index_in_parent(rRowCol.first));
525}
526
527IMPL_LINK(SvxNotebookbarEntriesListBox, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
528{
529 if (rKeyEvent.GetKeyCode() == KEY_SPACE)
530 {
531 int nRow = m_xControl->get_selected_index();
532 m_xControl->set_toggle(nRow, m_xControl->get_toggle(nRow) == TRISTATE_TRUE ? TRISTATE_FALSE
533 : TRISTATE_TRUE);
534 ChangedVisibility(nRow);
535 return true;
536 }
537 return SvxMenuEntriesListBox::KeyInputHdl(rKeyEvent);
538}
539
540IMPL_LINK(SvxNotebookbarEntriesListBox, QueryTooltip, const weld::TreeIter&, rIter, OUString)
541{
542 OUString sCommand = m_xControl->get_id(rIter);
543 if (sCommand.isEmpty())
544 return OUString();
545 OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(m_pPage->GetFrame()));
547 OUString sTooltipLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sCommand, aProperties,
548 m_pPage->GetFrame());
549 return CuiResId(RID_CUISTR_COMMANDLABEL) + ": "
550 + m_xControl->get_text(rIter).replaceFirst("~", "") + "\n"
551 + CuiResId(RID_CUISTR_COMMANDNAME) + ": " + sCommand + "\n"
552 + CuiResId(RID_CUISTR_COMMANDTIP) + ": " + sTooltipLabel.replaceFirst("~", "");
553}
554
555/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IMPL_LINK(SvxNotebookbarEntriesListBox, CheckButtonHdl, const weld::TreeView::iter_col &, rRowCol, void)
static OUString getFileName(std::u16string_view aFileName)
static void EditRegistryFile(std::u16string_view sUIItemId, const OUString &sSetEntry, const OUString &sNotebookbarInterface)
static OUString charToString(const char *cString)
static OUString getModuleId(std::u16string_view sModuleName)
static bool isCategoryAvailable(std::u16string_view sClassId, std::u16string_view sUIItemId, std::u16string_view sActiveCategory, bool &isCategory)
PropertiesInfo aProperties
constexpr OUStringLiteral notebookbarTabScope
Definition: cfg.hxx:43
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage)
static void setCustomizedUIItem(Sequence< OUString > sUIItemProperties, OUString sNotebookbarConfigType)
static OString getSystemPath(OUString const &sURL)
static void modifyCustomizedUIFile(const Sequence< OUString > &sUIItemProperties)
static Sequence< OUString > getCustomizedUIItem(OUString sNotebookbarConfigType)
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:336
weld::Window * GetFrameWeld() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static OUString replaceSaveInName(const OUString &rMessage, std::u16string_view rSaveInName)
static OUString stripHotKey(const OUString &str)
void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString &sUIItemId, const OUString &sUIItemCommand, weld::TreeView &rTreeView, const weld::TreeIter &rIter)
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:410
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
Definition: cfg.hxx:404
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
Definition: cfg.hxx:394
std::unique_ptr< SvxConfigPageFunctionDropTarget > m_xDropTargetHelper
Definition: cfg.hxx:408
std::unique_ptr< weld::Widget > m_xCommandButtons
Definition: cfg.hxx:422
std::unique_ptr< weld::Label > m_xCategoryLabel
Definition: cfg.hxx:393
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:391
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:390
std::unique_ptr< weld::Widget > m_xCustomizeBox
Definition: cfg.hxx:415
std::unique_ptr< weld::Entry > m_xSearchEdit
Definition: cfg.hxx:397
const OUString & GetFileName() const
Definition: cfg.hxx:486
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:395
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
Definition: cfg.hxx:396
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:411
OUString m_sAppName
Definition: cfg.hxx:426
OUString m_sFileName
Definition: cfg.hxx:427
std::unique_ptr< weld::Label > m_xSearchLabel
Definition: cfg.hxx:398
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:403
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:413
const OUString & GetAppName() const
Definition: cfg.hxx:485
SaveInData * GetSaveInData()
Definition: cfg.hxx:484
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
Definition: cfg.hxx:407
std::unique_ptr< weld::TreeView > m_xControl
Definition: cfg.hxx:325
SvxConfigPage * m_pPage
Definition: cfg.hxx:327
virtual ~SvxNotebookbarConfigPage() override
static void getNodeValue(xmlNode *pNodePtr, NotebookbarEntries &aNodeEntries)
static void searchNodeandAttribute(std::vector< NotebookbarEntries > &aEntries, std::vector< CategoriesEntries > &aCategoryList, OUString &sActiveCategory, CategoriesEntries &aCurCategoryEntry, xmlNode *pNodePtr, bool isCategory)
SvxNotebookbarConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rItemSet)
virtual void SelectElement() override
SaveInData * CreateSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig) override
static void FillFunctionsList(xmlNodePtr pRootNodePtr, std::vector< NotebookbarEntries > &aEntries, std::vector< CategoriesEntries > &aCategoryList, OUString &sActiveCategory)
SvxNotebookbarEntriesListBox(std::unique_ptr< weld::TreeView > xControl, SvxConfigPage *pPg)
static void ReloadNotebookBar(std::u16string_view sUIPath)
static OUString getProductName()
virtual void set_text(int row, const OUString &rText, int col=-1)=0
std::pair< const TreeIter &, int > iter_col
virtual void set_image(int row, const OUString &rImage, int col=-1)=0
virtual void set_id(int row, const OUString &rId)=0
virtual void bulk_insert_for_each(int nSourceCount, const std::function< void(TreeIter &, int nSourceIndex)> &func, const weld::TreeIter *pParent=nullptr, const std::vector< int > *pFixedWidths=nullptr)=0
virtual void show()=0
virtual void hide()=0
virtual void set_help_id(const OString &rName)=0
virtual void set_vexpand(bool bExpand)=0
virtual void set_size_request(int nWidth, int nHeight)=0
virtual void set_hexpand(bool bExpand)=0
OUString CuiResId(TranslateId aKey)
Definition: cuiresmgr.cxx:23
float u
ScXMLEditAttributeMap::Entry const aEntries[]
sal_Int16 nValue
TRISTATE_FALSE
TRISTATE_TRUE
OUString sDisplayName
constexpr OStringLiteral HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS
Definition: helpids.h:33
OUString aName
constexpr sal_uInt16 KEY_SPACE
def label(st)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
unsigned long ULong
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 GetModuleIdentifier(const Reference< frame::XFrame > &rxFrame)
static SfxItemSet & rSet
OUString aLabel
RET_YES
Reference< XControl > m_xControl