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();
145 OUString sNotebookbarInterface = getFileName(m_sFileName);
146
147 OUString sScopeName
148 = utl::ConfigManager::getProductName() + " " + m_sAppName + " - " + sNotebookbarInterface;
149 OUString sSaveInListBoxID = notebookbarTabScope;
150
151 m_xSaveInListBox->append(sSaveInListBoxID, sScopeName);
152 m_xSaveInListBox->set_active_id(sSaveInListBoxID);
153
154 m_xTopLevelListBox->append("NotebookBar", CuiResId(RID_CUISTR_ALL_COMMANDS));
155 m_xTopLevelListBox->set_active_id("NotebookBar");
157}
158
160 const css::uno::Reference<css::ui::XUIConfigurationManager>& xCfgMgr,
161 const css::uno::Reference<css::ui::XUIConfigurationManager>& xParentCfgMgr,
162 const OUString& aModuleId, bool bDocConfig)
163{
164 return static_cast<SaveInData*>(
165 new ToolbarSaveInData(xCfgMgr, xParentCfgMgr, aModuleId, bDocConfig));
166}
167
169
171{
172 OUString msg = CuiResId(RID_CUISTR_CONFIRM_TOOLBAR_RESET);
173
174 OUString saveInName = m_xSaveInListBox->get_active_text();
175
176 OUString label = SvxConfigPageHelper::replaceSaveInName(msg, saveInName);
177
178 std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(
179 GetFrameWeld(), VclMessageType::Question, VclButtonsType::YesNo, label));
180 int nValue = xQueryBox->run();
181 if (nValue == RET_YES)
182 {
184
185 OUString sNotebookbarInterface = getFileName(m_sFileName);
186 Sequence<OUString> sSequenceEntries;
187 CustomNotebookbarGenerator::setCustomizedUIItem(sSequenceEntries, sNotebookbarInterface);
188 OUString sUIPath = "modules/s" + m_sAppName.toAsciiLowerCase() + "/ui/";
190 }
191 return nValue;
192}
193
194void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId,
195 const OUString& sUIItemId,
196 const OUString& sUIItemCommand,
197 weld::TreeView& rTreeView,
198 const weld::TreeIter& rIter)
199{
200 css::uno::Reference<css::container::XNameAccess> m_xCommandToLabelMap;
201 uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
203 css::frame::theUICommandDescription::get(xContext));
204
206
207 xNameAccess->getByName(getModuleId(m_sAppName)) >>= m_xCommandToLabelMap;
208
209 try
210 {
211 uno::Any aModuleVal = m_xCommandToLabelMap->getByName(sUIItemCommand);
212
213 aModuleVal >>= aPropSeq;
214 }
215 catch (container::NoSuchElementException&)
216 {
217 }
218
219 OUString aLabel;
220 for (auto const& prop : std::as_const(aPropSeq))
221 if (prop.Name == "Name")
222 prop.Value >>= aLabel;
223
225
226 if (sClassId == u"GtkSeparatorMenuItem" || sClassId == u"GtkSeparator")
227 {
228 rTreeView.set_text(rIter, "--------------------------------------------", 0);
229 }
230 else
231 {
232 if (aName.isEmpty())
233 aName = sUIItemId;
234 auto xImage = GetSaveInData()->GetImage(sUIItemCommand);
235 if (xImage.is())
236 rTreeView.set_image(rIter, xImage, -1);
237 rTreeView.set_text(rIter, aName, 0);
238 rTreeView.set_id(rIter, sUIItemId);
239 }
240}
241
242void SvxNotebookbarConfigPage::getNodeValue(xmlNode* pNodePtr, NotebookbarEntries& aNodeEntries)
243{
244 pNodePtr = pNodePtr->xmlChildrenNode;
245 while (pNodePtr)
246 {
247 if (!(xmlStrcmp(pNodePtr->name, reinterpret_cast<const xmlChar*>("property"))))
248 {
249 xmlChar* UriValue = xmlGetProp(pNodePtr, reinterpret_cast<const xmlChar*>("name"));
250 if (!(xmlStrcmp(UriValue, reinterpret_cast<const xmlChar*>("visible"))))
251 {
252 xmlChar* aValue = xmlNodeGetContent(pNodePtr);
253 const char* cVisibleValue = reinterpret_cast<const char*>(aValue);
254 aNodeEntries.sVisibleValue = charToString(cVisibleValue);
255 xmlFree(aValue);
256 }
257 if (!(xmlStrcmp(UriValue, reinterpret_cast<const xmlChar*>("action_name"))))
258 {
259 xmlChar* aValue = xmlNodeGetContent(pNodePtr);
260 const char* cActionName = reinterpret_cast<const char*>(aValue);
261 aNodeEntries.sActionName = charToString(cActionName);
262 xmlFree(aValue);
263 }
264 xmlFree(UriValue);
265 }
266 pNodePtr = pNodePtr->next;
267 }
268}
269
270void SvxNotebookbarConfigPage::searchNodeandAttribute(std::vector<NotebookbarEntries>& aEntries,
271 std::vector<CategoriesEntries>& aCategoryList,
272 OUString& sActiveCategory,
273 CategoriesEntries& aCurItemEntry,
274 xmlNode* pNodePtr, bool isCategory)
275{
276 pNodePtr = pNodePtr->xmlChildrenNode;
277 while (pNodePtr)
278 {
279 if (pNodePtr->type == XML_ELEMENT_NODE)
280 {
281 const char* cNodeName = reinterpret_cast<const char*>(pNodePtr->name);
282 if (strcmp(cNodeName, "object") == 0)
283 {
284 OUString sSecondVal;
285
286 xmlChar* UriValue = xmlGetProp(pNodePtr, reinterpret_cast<const xmlChar*>("id"));
287 const char* cUIItemID = reinterpret_cast<const char*>(UriValue);
288 OUString sUIItemId = charToString(cUIItemID);
289 xmlFree(UriValue);
290
291 UriValue = xmlGetProp(pNodePtr, reinterpret_cast<const xmlChar*>("class"));
292 const char* cClassId = reinterpret_cast<const char*>(UriValue);
293 OUString sClassId = charToString(cClassId);
294 xmlFree(UriValue);
295
296 CategoriesEntries aCategoryEntry;
297 if (sClassId == "sfxlo-PriorityHBox")
298 {
299 aCategoryEntry.sDisplayName = sUIItemId;
300 aCategoryEntry.sUIItemId = sUIItemId;
301 aCategoryEntry.sClassType = sClassId;
302 aCategoryList.push_back(aCategoryEntry);
303
304 aCurItemEntry = aCategoryEntry;
305 }
306 else if (sClassId == "sfxlo-PriorityMergedHBox")
307 {
308 aCategoryEntry.sDisplayName = aCurItemEntry.sDisplayName + " | " + sUIItemId;
309 aCategoryEntry.sUIItemId = sUIItemId;
310 aCategoryEntry.sClassType = sClassId;
311
312 if (aCurItemEntry.sClassType == sClassId)
313 {
314 sal_Int32 rPos = 0;
315 aCategoryEntry.sDisplayName
316 = OUString::Concat(
317 o3tl::getToken(aCurItemEntry.sDisplayName, rPos, ' ', rPos))
318 + " | " + sUIItemId;
319 }
320 aCategoryList.push_back(aCategoryEntry);
321 aCurItemEntry = aCategoryEntry;
322 }
323 else if (sClassId == "svtlo-ManagedMenuButton")
324 {
325 sal_Int32 rPos = 1;
326 sSecondVal = sUIItemId.getToken(rPos, ':', rPos);
327 if (!sSecondVal.isEmpty())
328 {
329 aCategoryEntry.sDisplayName
330 = aCurItemEntry.sDisplayName + " | " + sSecondVal;
331 aCategoryEntry.sUIItemId = sSecondVal;
332 aCategoryList.push_back(aCategoryEntry);
333 }
334 }
335
336 NotebookbarEntries nodeEntries;
337 if (isCategoryAvailable(sClassId, sUIItemId, sActiveCategory, isCategory)
338 || isCategory)
339 {
340 isCategory = true;
341 if (sClassId == "GtkMenuItem" || sClassId == "GtkToolButton"
342 || sClassId == "GtkMenuToolButton"
343 || (sClassId == "svtlo-ManagedMenuButton" && sSecondVal.isEmpty()))
344 {
345 nodeEntries.sClassId = sClassId;
346 nodeEntries.sUIItemId = sUIItemId;
347 nodeEntries.sDisplayName = sUIItemId;
348
349 getNodeValue(pNodePtr, nodeEntries);
350 aEntries.push_back(nodeEntries);
351 }
352 else if (sClassId == "GtkSeparatorMenuItem" || sClassId == "GtkSeparator")
353 {
354 nodeEntries.sClassId = sClassId;
355 nodeEntries.sUIItemId = sUIItemId;
356 nodeEntries.sDisplayName = "Null";
357 nodeEntries.sVisibleValue = "Null";
358 nodeEntries.sActionName = "Null";
359 aEntries.push_back(nodeEntries);
360 }
361 else if (sClassId == "sfxlo-PriorityHBox"
362 || sClassId == "sfxlo-PriorityMergedHBox"
363 || sClassId == "svtlo-ManagedMenuButton")
364 {
365 nodeEntries.sClassId = sClassId;
366 nodeEntries.sUIItemId = sUIItemId;
367 nodeEntries.sDisplayName
368 = aCategoryList[aCategoryList.size() - 1].sDisplayName;
369 nodeEntries.sVisibleValue = "Null";
370 nodeEntries.sActionName = "Null";
371 aEntries.push_back(nodeEntries);
372 }
373 }
374 }
375 searchNodeandAttribute(aEntries, aCategoryList, sActiveCategory, aCurItemEntry,
376 pNodePtr, isCategory);
377 }
378 pNodePtr = pNodePtr->next;
379 }
380}
381
383 std::vector<NotebookbarEntries>& aEntries,
384 std::vector<CategoriesEntries>& aCategoryList,
385 OUString& sActiveCategory)
386{
387 CategoriesEntries aCurItemEntry;
388 searchNodeandAttribute(aEntries, aCategoryList, sActiveCategory, aCurItemEntry, pRootNodePtr,
389 false);
390}
391
393{
394 OString sUIFileUIPath = CustomNotebookbarGenerator::getSystemPath(
396 xmlDocPtr pDoc = xmlParseFile(sUIFileUIPath.getStr());
397 if (!pDoc)
398 {
401 pDoc = xmlParseFile(sUIFileUIPath.getStr());
402 }
403
404 if (!pDoc)
405 return;
406 xmlNodePtr pNodePtr = xmlDocGetRootElement(pDoc);
407
408 std::vector<NotebookbarEntries> aEntries;
409 std::vector<CategoriesEntries> aCategoryList;
410 OUString sActiveCategory = m_xTopLevelListBox->get_active_id();
411 FillFunctionsList(pNodePtr, aEntries, aCategoryList, sActiveCategory);
412
413 if (m_xTopLevelListBox->get_count() == 1)
414 {
415 for (const auto& rCategory : aCategoryList)
416 m_xTopLevelListBox->append(rCategory.sUIItemId, rCategory.sDisplayName);
417 }
418 tools::ULong nStart = 0;
419 if (aEntries[nStart].sClassId == "sfxlo-PriorityHBox"
420 || aEntries[nStart].sClassId == "sfxlo-PriorityMergedHBox")
421 nStart = 1;
422
423 std::vector<NotebookbarEntries> aTempEntries;
424 for (std::size_t nIdx = nStart; nIdx < aEntries.size(); nIdx++)
425 {
426 if (aEntries[nIdx].sClassId == "svtlo-ManagedMenuButton")
427 {
428 aTempEntries.push_back(aEntries[nIdx]);
429 sal_Int32 rPos = 1;
430 sActiveCategory = aEntries[nIdx].sUIItemId.getToken(rPos, ':', rPos);
431 FillFunctionsList(pNodePtr, aTempEntries, aCategoryList, sActiveCategory);
432 }
433 else
434 aTempEntries.push_back(aEntries[nIdx]);
435 }
436
437 aEntries = std::move(aTempEntries);
438
439 static_cast<SvxNotebookbarEntriesListBox*>(m_xContentsListBox.get())->GetTooltipMap().clear();
440 weld::TreeView& rTreeView = m_xContentsListBox->get_widget();
441 rTreeView.bulk_insert_for_each(
442 aEntries.size(), [this, &rTreeView, &aEntries](weld::TreeIter& rIter, int nIdx) {
443 if (aEntries[nIdx].sActionName != "Null")
444 {
445 if (aEntries[nIdx].sVisibleValue == "True")
446 {
447 rTreeView.set_toggle(rIter, TRISTATE_TRUE);
448 }
449 else
450 {
451 rTreeView.set_toggle(rIter, TRISTATE_FALSE);
452 }
453 }
455 aEntries[nIdx].sActionName, rTreeView, rIter);
456 if (aEntries[nIdx].sClassId != u"GtkSeparatorMenuItem"
457 && aEntries[nIdx].sClassId != u"GtkSeparator")
458 {
460 ->GetTooltipMap()[aEntries[nIdx].sDisplayName]
461 = aEntries[nIdx].sActionName;
462 }
463 });
464
465 aEntries.clear();
466
467 xmlFreeDoc(pDoc);
468}
469
471 SvxConfigPage* pPg)
472 : SvxMenuEntriesListBox(std::move(xParent), pPg)
473{
474 m_xControl->connect_toggled(LINK(this, SvxNotebookbarEntriesListBox, CheckButtonHdl));
475 m_xControl->connect_key_press(Link<const KeyEvent&, bool>());
476 m_xControl->connect_key_press(LINK(this, SvxNotebookbarEntriesListBox, KeyInputHdl));
477 // remove the inherited connect_query_tooltip then add the new one
478 m_xControl->connect_query_tooltip(Link<const weld::TreeIter&, OUString>());
479 m_xControl->connect_query_tooltip(LINK(this, SvxNotebookbarEntriesListBox, QueryTooltip));
480}
481
483
484static void EditRegistryFile(std::u16string_view sUIItemId, const OUString& sSetEntry,
485 const OUString& sNotebookbarInterface)
486{
487 int nFlag = 0;
488 Sequence<OUString> aOldEntries
490 Sequence<OUString> aNewEntries(aOldEntries.getLength() + 1);
491 auto pNewEntries = aNewEntries.getArray();
492 for (int nIdx = 0; nIdx < aOldEntries.getLength(); nIdx++)
493 {
494 sal_Int32 rPos = 0;
495 std::u16string_view sFirstValue = o3tl::getToken(aOldEntries[nIdx], rPos, ',', rPos);
496 if (sFirstValue == sUIItemId)
497 {
498 aOldEntries.getArray()[nIdx] = sSetEntry;
499 nFlag = 1;
500 break;
501 }
502 pNewEntries[nIdx] = aOldEntries[nIdx];
503 }
504
505 if (nFlag == 0)
506 {
507 pNewEntries[aOldEntries.getLength()] = sSetEntry;
508 CustomNotebookbarGenerator::setCustomizedUIItem(aNewEntries, sNotebookbarInterface);
509 }
510 else
511 {
512 CustomNotebookbarGenerator::setCustomizedUIItem(aOldEntries, sNotebookbarInterface);
513 }
514}
515
517{
518 OUString sUIItemId = m_xControl->get_selected_id();
519 OUString sNotebookbarInterface = getFileName(m_pPage->GetFileName());
520
521 OUString sVisible;
522 if (m_xControl->get_toggle(nRow) == TRISTATE_TRUE)
523 sVisible = "True";
524 else
525 sVisible = "False";
526 OUString sSetEntries = sUIItemId + ",visible," + sVisible;
527 Sequence<OUString> sSeqOfEntries{ sSetEntries };
528 EditRegistryFile(sUIItemId, sSetEntries, sNotebookbarInterface);
530 OUString sUIPath = "modules/s" + m_pPage->GetAppName().toAsciiLowerCase() + "/ui/";
532}
533
535 void)
536{
537 ChangedVisibility(m_xControl->get_iter_index_in_parent(rRowCol.first));
538}
539
540IMPL_LINK(SvxNotebookbarEntriesListBox, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
541{
542 if (rKeyEvent.GetKeyCode() == KEY_SPACE)
543 {
544 int nRow = m_xControl->get_selected_index();
545 m_xControl->set_toggle(nRow, m_xControl->get_toggle(nRow) == TRISTATE_TRUE ? TRISTATE_FALSE
546 : TRISTATE_TRUE);
547 ChangedVisibility(nRow);
548 return true;
549 }
550 return SvxMenuEntriesListBox::KeyInputHdl(rKeyEvent);
551}
552
553IMPL_LINK(SvxNotebookbarEntriesListBox, QueryTooltip, const weld::TreeIter&, rIter, OUString)
554{
555 const OUString& rsCommand = m_aTooltipMap[m_xControl->get_id(rIter)];
556 if (rsCommand.isEmpty())
557 return OUString();
558 OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(m_pPage->GetFrame()));
559 auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(rsCommand, aModuleName);
560 OUString sTooltipLabel = vcl::CommandInfoProvider::GetTooltipForCommand(rsCommand, aProperties,
561 m_pPage->GetFrame());
562 return CuiResId(RID_CUISTR_COMMANDLABEL) + ": "
563 + m_xControl->get_text(rIter).replaceFirst("~", "") + "\n"
564 + CuiResId(RID_CUISTR_COMMANDNAME) + ": " + rsCommand + "\n"
565 + CuiResId(RID_CUISTR_COMMANDTIP) + ": " + sTooltipLabel.replaceFirst("~", "");
566}
567
568/* 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, const ILibreOfficeKitNotifier *pNotifier=nullptr)
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
virtual void set_toggle(int row, TriState eState, 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 set_help_id(const OUString &rName)=0
virtual void hide()=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 OUStringLiteral 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