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