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