LibreOffice Module cui (master)  1
cfg.hxx
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 #pragma once
21 
22 #include <vcl/timer.hxx>
23 #include <vcl/weld.hxx>
24 #include <vcl/weldutils.hxx>
25 #include <svtools/valueset.hxx>
26 
27 #include <com/sun/star/container/XIndexContainer.hpp>
28 #include <com/sun/star/container/XNameAccess.hpp>
29 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
30 #include <com/sun/star/ui/XImageManager.hpp>
31 #include <com/sun/star/graphic/XGraphicProvider.hpp>
32 #include <com/sun/star/frame/XFrame.hpp>
33 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
34 
35 #include <sfx2/tabdlg.hxx>
36 #include <memory>
37 #include <string_view>
38 #include <vector>
39 
40 #include "cfgutil.hxx"
42 
43 inline constexpr OUStringLiteral notebookbarTabScope = u"notebookbarTabScope";
44 
45 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
46 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
47 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
48 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
49 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
50 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE = u"IsVisible";
51 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_RESOURCEURL = u"ResourceURL";
52 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
53 
54 inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
55 inline constexpr OUStringLiteral ITEM_TOOLBAR_URL = u"private:resource/toolbar/";
56 
57 inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
58 
59 inline constexpr OUStringLiteral aMenuSeparatorStr = u" | ";
60 
61 class SvxConfigEntry;
63 
64 typedef std::vector< SvxConfigEntry* > SvxEntries;
65 
67 {
68 private:
69  css::uno::Reference< css::frame::XFrame > m_xFrame;
70  DECL_LINK(ActivatePageHdl, const OString&, void);
71 public:
73 
74  virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
75  void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
76 };
77 
79 {
80 private:
81 
82  bool bModified;
83 
84  bool bDocConfig;
85  bool bReadOnly;
86 
87  css::uno::Reference
88  < css::ui::XUIConfigurationManager > m_xCfgMgr;
89 
90  css::uno::Reference
91  < css::ui::XUIConfigurationManager > m_xParentCfgMgr;
92 
93  css::uno::Reference
94  < css::ui::XImageManager > m_xImgMgr;
95 
96  css::uno::Reference
97  < css::ui::XImageManager > m_xParentImgMgr;
98 
99  static css::uno::Reference
100  < css::ui::XImageManager >* xDefaultImgMgr;
101 
102 protected:
103 
104  void ApplyMenu(
105  css::uno::Reference< css::container::XIndexContainer > const & rMenuBar,
106  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
107  SvxConfigEntry *pMenuData );
108 
109  void LoadSubMenus(
110  const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
111  const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool bContextMenu );
112 
113 public:
114 
115  SaveInData(
116  const css::uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr,
117  const css::uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr,
118  const OUString& aModuleId,
119  bool docConfig );
120 
121  virtual ~SaveInData() {}
122 
123  bool PersistChanges(
124  const css::uno::Reference< css::uno::XInterface >& xManager );
125 
126  void SetModified( bool bValue = true ) { bModified = bValue; }
127  bool IsModified( ) const { return bModified; }
128 
129  bool IsReadOnly( ) const { return bReadOnly; }
130  bool IsDocConfig( ) const { return bDocConfig; }
131 
132  const css::uno::Reference
133  < css::ui::XUIConfigurationManager >&
134  GetConfigManager() const { return m_xCfgMgr; };
135 
136  const css::uno::Reference
137  < css::ui::XUIConfigurationManager >&
139 
140  const css::uno::Reference
141  < css::ui::XImageManager >&
142  GetImageManager() const { return m_xImgMgr; };
143 
144  const css::uno::Reference
145  < css::ui::XImageManager >&
147 
148  css::uno::Reference
149  < css::container::XNameAccess > m_xCommandToLabelMap;
150 
151  css::uno::Sequence
152  < css::beans::PropertyValue > m_aSeparatorSeq;
153 
154  css::uno::Reference<css::graphic::XGraphic> GetImage(const OUString& rCommandURL);
155 
156  virtual bool HasURL( const OUString& aURL ) = 0;
157  virtual bool HasSettings() = 0;
158  virtual SvxEntries* GetEntries() = 0;
159  virtual void SetEntries( std::unique_ptr<SvxEntries> ) = 0;
160  virtual void Reset() = 0;
161  virtual bool Apply() = 0;
162 };
163 
165 {
166 private:
167 
170 
171  css::uno::Reference
172  < css::container::XIndexAccess > m_xMenuSettings;
173 
174  std::unique_ptr<SvxConfigEntry> pRootEntry;
175 
176 
178 
179  static void SetDefaultData( MenuSaveInData* pData ) {pDefaultData = pData;}
181 
182  void Apply(
183  css::uno::Reference< css::container::XIndexContainer > const & rNewMenuBar,
184  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
185 
186 public:
187 
189  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
190  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
191  const OUString& aModuleId,
192  bool docConfig );
193 
194  virtual ~MenuSaveInData() override;
195 
197  SvxEntries* GetEntries() override;
198  void SetEntries( std::unique_ptr<SvxEntries> ) override;
199  bool HasURL( const OUString& ) override { return false; }
200  bool HasSettings() override { return m_xMenuSettings.is(); }
201  void Reset() override;
202  bool Apply() override;
203 };
204 
206 {
207 private:
208  std::unique_ptr< SvxConfigEntry > m_pRootEntry;
209  css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState;
210  OUString GetUIName( const OUString& rResourceURL );
211 
212 public:
214  const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
215  const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
216  const OUString& aModuleId, bool bIsDocConfig );
217  virtual ~ContextMenuSaveInData() override;
218 
219  SvxEntries* GetEntries() override;
220  void SetEntries( std::unique_ptr<SvxEntries> pNewEntries ) override;
221  bool HasSettings() override;
222  bool HasURL( const OUString& rURL ) override;
223  void Reset() override;
224  bool Apply() override;
225 
226  void ResetContextMenu( const SvxConfigEntry* pEntry );
227 };
228 
230 {
231 private:
232 
234  sal_uInt16 nId;
235  OUString aLabel;
236  OUString aCommand;
237 
238  bool bPopUp;
241  bool bIsMain;
244 
247  sal_Int32 nStyle;
248 
249  css::uno::Reference<
250  css::graphic::XGraphic > xBackupGraphic;
251 
252  std::unique_ptr<SvxEntries> mpEntries;
253 
254 public:
255 
256  SvxConfigEntry( const OUString& rDisplayName,
257  const OUString& rCommandURL,
258  bool bPopup,
259  bool bParentData );
260 
262  :
263  nId( 0 ),
264  bPopUp( false ),
265  bStrEdited( false ),
266  bIsUserDefined( false ),
267  bIsMain( false ),
268  bIsParentData( false ),
269  bIsModified( false ),
270  bIsVisible( true ),
271  nStyle( 0 )
272  {}
273 
274  ~SvxConfigEntry();
275 
276  const OUString& GetCommand() const { return aCommand; }
277 
278  const OUString& GetName() const { return aLabel; }
279  void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
280  bool HasChangedName() const { return bStrEdited; }
281 
282  bool IsPopup() const { return bPopUp; }
283 
284  void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
285  bool IsUserDefined() const { return bIsUserDefined; }
286 
287  bool IsBinding() const { return !bPopUp; }
288  bool IsSeparator() const { return nId == 0; }
289 
290  SvxEntries* GetEntries() const { return mpEntries.get(); }
291  void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
292 
293  void SetMain() { bIsMain = true; }
294  bool IsMain() const { return bIsMain; }
295 
296  void SetParentData( bool bValue = true ) { bIsParentData = bValue; }
297  bool IsParentData() const { return bIsParentData; }
298 
299  void SetModified( bool bValue = true ) { bIsModified = bValue; }
300  bool IsModified() const { return bIsModified; }
301 
302  bool IsMovable() const;
303  bool IsDeletable() const;
304  bool IsRenamable() const;
305 
306  void SetVisible( bool b ) { bIsVisible = b; }
307  bool IsVisible() const { return bIsVisible; }
308 
309  void SetBackupGraphic( css::uno::Reference< css::graphic::XGraphic > const & graphic )
310  { xBackupGraphic = graphic; }
311 
312  const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic() const
313  { return xBackupGraphic; }
314 
315  sal_Int32 GetStyle() const { return nStyle; }
316  void SetStyle( sal_Int32 style ) { nStyle = style; }
317 };
318 
320 {
321 protected:
322  std::unique_ptr<weld::TreeView> m_xControl;
325 
326 public:
327  SvxMenuEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPage);
328  virtual ~SvxMenuEntriesListBox();
329 
331 
332  int get_selected_index() const { return m_xControl->get_selected_index(); }
333  OUString get_id(int nPos) const { return m_xControl->get_id(nPos); }
334  void remove(int nPos) { m_xControl->remove(nPos); }
335  int n_children() const { return m_xControl->n_children(); }
336  void set_text(int row, const OUString& rText, int col) { m_xControl->set_text(row, rText, col); }
337  void clear() { m_xControl->clear(); } //need frees ?
338  void set_toggle(int row, TriState eState) { m_xControl->set_toggle(row, eState); }
339  void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); }
340  void select(int pos) { m_xControl->select(pos); }
341 
343 
344  void insert(int pos, const OUString& rId)
345  {
346  m_xControl->insert(nullptr, pos, nullptr, &rId,
347  nullptr, nullptr, false, nullptr);
348  }
349 
350  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
351 
352  void CreateDropDown();
353 };
354 
356 {
357 private:
359 
360  virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
361 
362 public:
364 };
365 
366 class SvxConfigPage : public SfxTabPage
367 {
368 private:
369 
373 
374  DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
375 
376 protected:
377 
379  OUString m_aURLToSelect;
380 
381  css::uno::Reference< css::frame::XFrame > m_xFrame;
382  OUString m_aModuleId;
383 
384  // Left side of the dialog where command categories and the available
385  // commands in them are displayed as a searchable list
386  std::unique_ptr<CommandCategoryListBox> m_xCommandCategoryListBox;
387  std::unique_ptr<CuiConfigFunctionListBox> m_xFunctions;
388 
389  std::unique_ptr<weld::Label> m_xCategoryLabel;
390  std::unique_ptr<weld::Label> m_xDescriptionFieldLb;
391  std::unique_ptr<weld::TextView> m_xDescriptionField;
392  std::unique_ptr<weld::Label> m_xLeftFunctionLabel;
393  std::unique_ptr<weld::Entry> m_xSearchEdit;
394  std::unique_ptr<weld::Label> m_xSearchLabel;
395 
396 
397  // Right side of the dialog where the contents of the selected
398  // menu or toolbar are displayed
399  std::unique_ptr<weld::Label> m_xCustomizeLabel;
400  std::unique_ptr<weld::ComboBox> m_xTopLevelListBox;
401  // Used to add and remove toolbars/menus
402  std::unique_ptr<weld::MenuButton> m_xGearBtn;
403  std::unique_ptr<SvxMenuEntriesListBox> m_xContentsListBox;
404  std::unique_ptr<SvxConfigPageFunctionDropTarget> m_xDropTargetHelper;
405 
406  std::unique_ptr<weld::Button> m_xMoveUpButton;
407  std::unique_ptr<weld::Button> m_xMoveDownButton;
408 
409  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
410 
411  std::unique_ptr<weld::MenuButton> m_xInsertBtn;
412  std::unique_ptr<weld::MenuButton> m_xModifyBtn;
413  // Used to reset the selected toolbar/menu/context menu
414  std::unique_ptr<weld::Button> m_xResetBtn;
415 
416  // Middle buttons
417  std::unique_ptr<weld::Button> m_xAddCommandButton;
418  std::unique_ptr<weld::Button> m_xRemoveCommandButton;
419 
420  OUString m_sAppName;
421  OUString m_sFileName;
422 
423  SvxConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
424 
425  DECL_LINK(MoveHdl, weld::Button&, void);
426  DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
427  DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
428  DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
429  DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
430  DECL_LINK(ImplUpdateDataHdl, Timer*, void);
431  DECL_LINK(FocusOut_Impl, weld::Widget&, void);
432 
433  virtual SaveInData* CreateSaveInData(
434  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
435  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
436  const OUString& aModuleId,
437  bool docConfig ) = 0;
438 
439  virtual void Init() = 0;
440  virtual void UpdateButtonStates() = 0;
441  virtual short QueryReset() = 0;
442 
443  virtual void SelectElement() = 0;
444 
445  int AppendEntry(SvxConfigEntry* pNewEntryData,
446  int nTarget);
447 
448  void AddSubMenusToUI( std::u16string_view rBaseTitle,
449  SvxConfigEntry const * pParentData );
450 
451  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
452  weld::TreeView& rTreeView, int nPos,
453  bool bMenu = false);
454  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
455  weld::TreeView& rTreeView, weld::TreeIter& rIter,
456  bool bMenu = false);
457 
458  void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString& sUIItemId,
459  const OUString& sUIItemCommand,
460  weld::TreeView& rTreeView, const weld::TreeIter& rIter);
461 
462  SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
463  SvxConfigEntry* pChildData );
464 
465  void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
466 
467  static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData,
468  const SvxEntries *pEntries);
469 
470  SvxConfigEntry *CreateCommandFromSelection(const OUString &aURL);
471 
472 public:
473 
474  virtual ~SvxConfigPage() override;
475 
476  static bool CanConfig( std::u16string_view rModuleId );
477 
479  const OUString& GetAppName() const { return m_sAppName; }
480  const OUString& GetFileName() const { return m_sFileName; }
481 
482  int AddFunction(int nTarget,
483  bool bAllowDuplicates);
484 
485  virtual void MoveEntry( bool bMoveUp );
486 
487  bool MoveEntryData(int SourceEntry, int nTargetEntry);
488 
489  bool FillItemSet( SfxItemSet* ) override;
490  void Reset( const SfxItemSet* ) override;
491 
492  virtual void DeleteSelectedContent() = 0;
493  virtual void DeleteSelectedTopLevel() = 0;
494 
495  virtual void ListModified() {}
496 
498  {
499  return weld::fromId<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id());
500  }
501 
512  static OUString
513  GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
514 
515  OUString GetScriptURL() const;
516  OUString GetSelectedDisplayName() const;
517 };
518 
520 {
521  std::unique_ptr<SvxEntries> mpEntries;
523 
524  std::unique_ptr<weld::Widget> m_xMenuBox;
525  std::unique_ptr<weld::Entry> m_xMenuNameEdit;
526  std::unique_ptr<weld::TreeView> m_xMenuListBox;
527  std::unique_ptr<weld::Button> m_xMoveUpButton;
528  std::unique_ptr<weld::Button> m_xMoveDownButton;
529 
530  void UpdateButtonStates();
531 
532  DECL_LINK(MoveHdl, weld::Button&, void);
533  DECL_LINK(ModifyHdl, weld::Entry&, void);
534  DECL_LINK(SelectHdl, weld::TreeView&, void);
535 
536 public:
539  SvxConfigEntry const *, bool bCreateMenu);
540  virtual ~SvxMainMenuOrganizerDialog() override;
541 
542  std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
544 };
545 
547 {
548 private:
549 
550  std::unique_ptr<SvxConfigEntry> pRootEntry;
552 
553  css::uno::Reference
554  < css::container::XNameAccess > m_xPersistentWindowState;
555 
556  void LoadToolbar(
557  const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
558  SvxConfigEntry const * pParentData );
559 
560  void ApplyToolbar(
561  css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
562  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
563  SvxConfigEntry const *pToolbar );
564 
565 public:
566 
568  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
569  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
570  const OUString& aModuleId,
571  bool docConfig );
572 
573  virtual ~ToolbarSaveInData() override;
574 
575  void CreateToolbar( SvxConfigEntry* pToolbar );
576  void RestoreToolbar( SvxConfigEntry* pToolbar );
577  void RemoveToolbar( SvxConfigEntry* pToolbar );
578  void ApplyToolbar( SvxConfigEntry* pToolbar );
579 
580  OUString GetSystemUIName( const OUString& rResourceURL );
581 
582  sal_Int32 GetSystemStyle( const OUString& rResourceURL );
583 
584  void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
585 
586  void SetSystemStyle(
587  const css::uno::Reference< css::frame::XFrame >& xFrame,
588  const OUString& rResourceURL, sal_Int32 nStyle );
589 
590  SvxEntries* GetEntries() override;
591  void SetEntries( std::unique_ptr<SvxEntries> ) override;
592  bool HasSettings() override;
593  bool HasURL( const OUString& rURL ) override;
594  void Reset() override;
595  bool Apply() override;
596 };
597 
599 {
600 private:
601  std::unique_ptr<weld::Entry> m_xEdtName;
602  std::unique_ptr<weld::Button> m_xBtnOK;
603 public:
604  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
605 
606  SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
607  virtual ~SvxNewToolbarDialog() override;
608 
609  OUString GetName() const
610  {
611  return m_xEdtName->get_text();
612  }
613 };
614 
616 {
617 private:
618  sal_Int32 m_nExpectedSize;
619 
620  css::uno::Reference<
621  css::ui::XImageManager > m_xImageManager;
622 
623  css::uno::Reference<
624  css::ui::XImageManager > m_xParentImageManager;
625 
626  css::uno::Reference<
627  css::ui::XImageManager > m_xImportedImageManager;
628 
629  css::uno::Reference<
630  css::graphic::XGraphicProvider > m_xGraphProvider;
631 
632  std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
633 
634  std::unique_ptr<ValueSet> m_xTbSymbol;
635  std::unique_ptr<weld::CustomWeld> m_xTbSymbolWin;
636  std::unique_ptr<weld::Label> m_xFtNote;
637  std::unique_ptr<weld::Button> m_xBtnImport;
638  std::unique_ptr<weld::Button> m_xBtnDelete;
639 
640  bool ReplaceGraphicItem( const OUString& aURL );
641 
642  bool ImportGraphic( const OUString& aURL );
643 
644  void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
645 
646 public:
647 
649  weld::Window *pWindow,
650  const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
651  const css::uno::Reference< css::ui::XImageManager >& rXParentImageManager);
652 
653  virtual ~SvxIconSelectorDialog() override;
654 
655  css::uno::Reference< css::graphic::XGraphic >
656  GetSelectedIcon();
657 
658  DECL_LINK(SelectHdl, ValueSet*, void);
659  DECL_LINK(ImportHdl, weld::Button&, void);
660  DECL_LINK(DeleteHdl, weld::Button&, void);
661 };
662 
663 //added for issue83555
665 {
666 private:
667  std::unique_ptr<weld::TextView> m_xLineEditDescription;
668 public:
669  SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
670 };
671 
672 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bIsVisible
toolbar specific properties
Definition: cfg.hxx:246
void RemoveToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2499
bool ReplaceGraphicItem(const OUString &aURL)
Definition: cfg.cxx:2927
bool bIsMain
Definition: cfg.hxx:241
constexpr OUStringLiteral aMenuSeparatorStr
Definition: cfg.hxx:59
OUString m_aDescriptorContainer
Definition: cfg.hxx:551
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:387
SvxEntries * GetEntries() const
Definition: cfg.hxx:290
bool IsModified() const
Definition: cfg.hxx:300
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL
Definition: cfg.hxx:45
virtual short QueryReset()=0
std::unique_ptr< weld::Entry > m_xEdtName
Definition: cfg.hxx:601
std::unique_ptr< weld::Button > m_xResetBtn
Definition: cfg.hxx:414
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:528
const OUString & GetFileName() const
Definition: cfg.hxx:480
const css::uno::Reference< css::ui::XImageManager > & GetImageManager() const
Definition: cfg.hxx:142
const OUString & GetName() const
Definition: cfg.hxx:278
std::unique_ptr< weld::Widget > m_xMenuBox
Definition: cfg.hxx:524
std::unique_ptr< weld::MenuButton > m_xModifyBtn
Definition: cfg.hxx:412
bool IsVisible() const
Definition: cfg.hxx:307
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:386
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
Definition: cfg.hxx:379
std::unique_ptr< SvxEntries > ReleaseEntries()
Definition: cfg.hxx:542
OUString aLabel
Definition: cfg.hxx:235
virtual ~SvxMainMenuOrganizerDialog() override
Definition: cfg.cxx:1819
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:554
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
Definition: cfg.cxx:236
void SetModified(bool bValue=true)
Definition: cfg.hxx:299
constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER
Definition: cfg.hxx:46
SvxConfigPage & m_rPage
Definition: cfg.hxx:358
void Reset() override
Definition: cfg.cxx:666
static MenuSaveInData * GetDefaultData()
Definition: cfg.hxx:180
signed char sal_Int8
std::unique_ptr< SvxConfigPageFunctionDropTarget > m_xDropTargetHelper
Definition: cfg.hxx:404
virtual SaveInData * CreateSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)=0
OUString GetSystemUIName(const OUString &rResourceURL)
Definition: cfg.cxx:2086
bool bDocConfig
Definition: cfg.hxx:84
void Reset(const SfxItemSet *) override
Definition: cfg.cxx:1035
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:381
std::unique_ptr< weld::Button > m_xBtnImport
Definition: cfg.hxx:637
static MenuSaveInData * pDefaultData
static holder of the default menu data
Definition: cfg.hxx:177
SvxConfigEntry * GetTopLevelSelection()
Definition: cfg.hxx:497
Timer m_aUpdateDataTimer
Definition: cfg.hxx:370
std::unique_ptr< weld::Button > m_xRemoveCommandButton
Definition: cfg.hxx:418
bool IsPopup() const
Definition: cfg.hxx:282
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
Definition: cfg.hxx:630
void SetBackupGraphic(css::uno::Reference< css::graphic::XGraphic > const &graphic)
Definition: cfg.hxx:309
int get_selected_index() const
Definition: cfg.hxx:332
constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE
Definition: cfg.hxx:50
constexpr OUStringLiteral notebookbarTabScope
Definition: cfg.hxx:43
bool HasSettings() override
Definition: cfg.cxx:846
DECL_LINK(SelectHdl, ValueSet *, void)
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetConfigManager() const
Definition: cfg.hxx:134
static void SetDefaultData(MenuSaveInData *pData)
Definition: cfg.hxx:179
css::uno::Reference< css::ui::XImageManager > m_xParentImageManager
Definition: cfg.hxx:624
virtual void MoveEntry(bool bMoveUp)
Definition: cfg.cxx:1676
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:327
constexpr OUStringLiteral CUSTOM_TOOLBAR_STR
Definition: cfg.hxx:57
std::unique_ptr< weld::Label > m_xCategoryLabel
Definition: cfg.hxx:389
bool IsReadOnly() const
Definition: cfg.hxx:129
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
Definition: cfg.hxx:403
constexpr OUStringLiteral ITEM_DESCRIPTOR_RESOURCEURL
Definition: cfg.hxx:51
SvxIconSelectorDialog(weld::Window *pWindow, const css::uno::Reference< css::ui::XImageManager > &rXImageManager, const css::uno::Reference< css::ui::XImageManager > &rXParentImageManager)
Definition: cfg.cxx:2682
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
Definition: cfg.cxx:1335
OUString m_sFileName
Definition: cfg.hxx:421
std::unique_ptr< weld::Entry > m_xMenuNameEdit
Definition: cfg.hxx:525
OUString m_aDescriptorContainer
Definition: cfg.hxx:169
std::vector< SvxConfigEntry * > SvxEntries
Definition: cfg.hxx:62
void set_text(int row, const OUString &rText, int col)
Definition: cfg.hxx:336
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:836
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
Definition: cfg.hxx:400
bool IsRenamable() const
Definition: cfg.cxx:1932
const OUString & GetCommand() const
Definition: cfg.hxx:276
constexpr OUStringLiteral ITEM_MENUBAR_URL
Definition: cfg.hxx:54
std::unique_ptr< weld::CustomWeld > m_xTbSymbolWin
Definition: cfg.hxx:635
sal_Int32 nStyle
Definition: cfg.hxx:247
virtual void ListModified()
Definition: cfg.hxx:495
css::uno::Reference< css::graphic::XGraphic > xBackupGraphic
Definition: cfg.hxx:250
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: cfg.cxx:3213
bool FillItemSet(SfxItemSet *) override
Definition: cfg.cxx:1311
void LoadSubMenus(const css::uno::Reference< css::container::XIndexAccess > &xMenuSettings, const OUString &rBaseTitle, SvxConfigEntry const *pParentData, bool bContextMenu)
Definition: cfg.cxx:438
void ApplyMenu(css::uno::Reference< css::container::XIndexContainer > const &rMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry *pMenuData)
Definition: cfg.cxx:619
bool bIsUserDefined
Definition: cfg.hxx:240
bool IsBinding() const
Definition: cfg.hxx:287
void select(int pos)
Definition: cfg.hxx:340
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
Definition: cfg.hxx:390
virtual SvxEntries * GetEntries()=0
OUString get_id(int nPos) const
Definition: cfg.hxx:333
SvxEntries * GetEntries() override
Definition: cfg.cxx:2146
OUString GetName() const
Definition: cfg.hxx:609
std::unique_ptr< weld::Label > m_xFtNote
Definition: cfg.hxx:636
std::unique_ptr< weld::TreeView > m_xControl
Definition: cfg.hxx:322
void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString &sUIItemId, const OUString &sUIItemCommand, weld::TreeView &rTreeView, const weld::TreeIter &rIter)
css::uno::Reference< css::ui::XImageManager > m_xImgMgr
Definition: cfg.hxx:94
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
bool IsModified() const
Definition: cfg.hxx:127
ToolbarSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:1937
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE
Definition: cfg.hxx:49
void SetName(const OUString &rStr)
Definition: cfg.hxx:279
void SetMain()
Definition: cfg.hxx:293
constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME
Definition: cfg.hxx:52
constexpr OUStringLiteral ITEM_TOOLBAR_URL
Definition: cfg.hxx:55
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:527
bool IsParentData() const
Definition: cfg.hxx:297
css::uno::Reference< css::ui::XUIConfigurationManager > m_xCfgMgr
Definition: cfg.hxx:88
static bool CanConfig(std::u16string_view rModuleId)
Definition: cfg.cxx:162
OUString aCommand
Definition: cfg.hxx:236
void set_toggle(int row, TriState eState)
Definition: cfg.hxx:338
int AppendEntry(SvxConfigEntry *pNewEntryData, int nTarget)
Definition: cfg.cxx:1487
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:174
DECL_LINK(SearchUpdateHdl, weld::Entry &, void)
static css::uno::Reference< css::ui::XImageManager > * xDefaultImgMgr
Definition: cfg.hxx:100
OUString GetUIName(const OUString &rResourceURL)
Definition: cfg.cxx:705
bool HasSettings() override
Definition: cfg.hxx:200
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetParentConfigManager() const
Definition: cfg.hxx:138
bool Apply() override
Definition: cfg.cxx:550
bool bModified
Definition: cfg.hxx:82
void LoadToolbar(const css::uno::Reference< css::container::XIndexAccess > &xToolBarSettings, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:2586
void SetEntries(std::unique_ptr< SvxEntries > entries)
Definition: cfg.hxx:291
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:2321
virtual bool Apply()=0
void SetParentData(bool bValue=true)
Definition: cfg.hxx:296
const css::uno::Reference< css::graphic::XGraphic > & GetBackupGraphic() const
Definition: cfg.hxx:312
css::uno::Reference< css::container::XIndexAccess > m_xMenuSettings
Definition: cfg.hxx:172
void SetSystemStyle(const OUString &rResourceURL, sal_Int32 nStyle)
Definition: cfg.cxx:2047
SvxEntries * FindParentForChild(SvxEntries *pParentEntries, SvxConfigEntry *pChildData)
Definition: cfg.cxx:1386
virtual void DeleteSelectedTopLevel()=0
css::uno::Reference< css::container::XNameAccess > m_xCommandToLabelMap
Definition: cfg.hxx:146
std::unique_ptr< SvxConfigEntry > m_pRootEntry
Definition: cfg.hxx:208
void SetUserDefined(bool bOn=true)
Definition: cfg.hxx:284
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
Definition: cfg.cxx:1750
weld::TreeView & get_widget()
Definition: cfg.hxx:342
bool bIsParentData
Definition: cfg.hxx:242
bool bInitialised
Definition: cfg.hxx:371
virtual ~ContextMenuSaveInData() override
Definition: cfg.cxx:701
SvxConfigEntry * CreateCommandFromSelection(const OUString &aURL)
Definition: cfg.cxx:1410
const OUString & GetAppName() const
Definition: cfg.hxx:479
std::unique_ptr< ValueSet > m_xTbSymbol
Definition: cfg.hxx:634
sal_uInt16 nId
common properties
Definition: cfg.hxx:234
virtual ~ToolbarSaveInData() override
Definition: cfg.cxx:1955
virtual ~SvxIconSelectorDialog() override
Definition: cfg.cxx:2838
virtual ~SvxNewToolbarDialog() override
Definition: cfg.cxx:2673
std::unique_ptr< weld::Label > m_xSearchLabel
Definition: cfg.hxx:394
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:209
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:604
float u
css::uno::Reference< css::ui::XImageManager > m_xParentImgMgr
Definition: cfg.hxx:97
void SetVisible(bool b)
Definition: cfg.hxx:306
void SetStyle(sal_Int32 style)
Definition: cfg.hxx:316
virtual void Reset()=0
bool Apply() override
Definition: cfg.cxx:2375
ContextMenuSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &xCfgMgr, const css::uno::Reference< css::ui::XUIConfigurationManager > &xParentCfgMgr, const OUString &aModuleId, bool bIsDocConfig)
Definition: cfg.cxx:690
OUString GetScriptURL() const
Definition: cfg.cxx:1288
sal_Int32 m_nExpectedSize
Definition: cfg.hxx:618
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
Definition: cfg.cxx:340
virtual ~SaveInData()
Definition: cfg.hxx:121
virtual void DeleteSelectedContent()=0
bool IsMovable() const
Definition: cfg.cxx:1922
VirtualDevice & get_dropdown_image() const
Definition: cfg.hxx:330
bool bStrEdited
Definition: cfg.hxx:239
void ResetContextMenu(const SvxConfigEntry *pEntry)
Definition: cfg.cxx:899
SvxNewToolbarDialog(weld::Window *pWindow, const OUString &rName)
Definition: cfg.cxx:2663
std::unique_ptr< weld::Button > m_xBtnOK
Definition: cfg.hxx:602
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
Definition: cfg.hxx:91
virtual ~MenuSaveInData() override
Definition: cfg.cxx:407
virtual ~SvxMenuEntriesListBox()
Definition: cfg.cxx:941
ScopedVclPtr< VirtualDevice > m_xDropDown
Definition: cfg.hxx:323
std::unique_ptr< weld::TextView > m_xLineEditDescription
Definition: cfg.hxx:667
SaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &xCfgMgr, const css::uno::Reference< css::ui::XUIConfigurationManager > &xParentCfgMgr, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:274
bool ImportGraphic(const OUString &aURL)
Definition: cfg.cxx:3130
OUString GetSelectedDisplayName() const
Definition: cfg.cxx:1306
std::unique_ptr< weld::MenuButton > m_xInsertBtn
Definition: cfg.hxx:411
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL
Definition: cfg.hxx:47
std::unique_ptr< weld::Entry > m_xSearchEdit
Definition: cfg.hxx:393
OUString m_sNewMenuEntryId
Definition: cfg.hxx:522
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:252
sal_Int32 GetStyle() const
Definition: cfg.hxx:315
bool IsUserDefined() const
Definition: cfg.hxx:285
SaveInData * pCurrentSaveInData
Definition: cfg.hxx:372
virtual ~SvxConfigPage() override
Definition: cfg.cxx:1025
void Reset() override
Definition: cfg.cxx:2339
const css::uno::Reference< css::ui::XImageManager > & GetParentImageManager() const
Definition: cfg.hxx:146
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE
Definition: cfg.hxx:48
void RestoreToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2522
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:521
SvxMenuEntriesListBox(std::unique_ptr< weld::TreeView > xControl, SvxConfigPage *pPage)
Definition: cfg.cxx:931
bool MoveEntryData(int SourceEntry, int nTargetEntry)
Definition: cfg.cxx:1712
css::uno::Reference< css::ui::XImageManager > m_xImageManager
Definition: cfg.hxx:621
virtual void UpdateButtonStates()=0
bool Apply() override
Definition: cfg.cxx:851
DECL_LINK(ActivatePageHdl, const OString &, void)
void InsertEntryIntoUI(SvxConfigEntry *pNewEntryData, weld::TreeView &rTreeView, int nPos, bool bMenu=false)
Definition: cfg.cxx:1583
DECL_LINK(MoveHdl, weld::Button &, void)
bool IsMain() const
Definition: cfg.hxx:294
static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData, const SvxEntries *pEntries)
Definition: cfg.cxx:1438
void SetModified(bool bValue=true)
Definition: cfg.hxx:126
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:399
int AddFunction(int nTarget, bool bAllowDuplicates)
Definition: cfg.cxx:1459
~SvxConfigEntry()
Definition: cfg.cxx:1911
void AddSubMenusToUI(std::u16string_view rBaseTitle, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:1369
void SetEntries(std::unique_ptr< SvxEntries > pNewEntries) override
Definition: cfg.cxx:831
bool bPopUp
Definition: cfg.hxx:238
virtual bool HasSettings()=0
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
Definition: cfg.cxx:3198
int n_children() const
Definition: cfg.hxx:335
bool HasSettings() override
Definition: cfg.cxx:2333
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
Definition: cfg.hxx:392
bool IsDeletable() const
Definition: cfg.cxx:1927
virtual void Init()=0
SvxConfigDialog(weld::Window *, const SfxItemSet *)
Definition: cfg.cxx:205
void ImportGraphics(const css::uno::Sequence< OUString > &aURLs)
Definition: cfg.cxx:3031
SvxConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &)
Definition: cfg.cxx:977
bool bIsModified
Definition: cfg.hxx:243
void CreateToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2472
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:433
std::unique_ptr< weld::Button > m_xBtnDelete
Definition: cfg.hxx:638
SvxEntries * GetEntries() override
Definition: cfg.cxx:730
SvxConfigPageFunctionDropTarget(SvxConfigPage &rPage, weld::TreeView &rTreeView)
Definition: cfg.cxx:3207
SvxEntries * GetEntries() override
methods inherited from SaveInData
Definition: cfg.cxx:412
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:409
virtual bool HasURL(const OUString &aURL)=0
void ApplyToolbar(css::uno::Reference< css::container::XIndexContainer > const &rNewToolbarBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry const *pToolbar)
void scroll_to_row(int pos)
Definition: cfg.hxx:339
SvxConfigPage * m_pPage
Definition: cfg.hxx:324
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:2315
SvxConfigEntry * GetSelectedEntry()
Definition: cfg.cxx:1883
void Reset() override
Definition: cfg.cxx:881
std::unique_ptr< weld::TreeView > m_xMenuListBox
Definition: cfg.hxx:526
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:391
bool bReadOnly
Definition: cfg.hxx:85
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:407
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
Definition: cfg.hxx:627
static OUString GetFrameWithDefaultAndIdentify(css::uno::Reference< css::frame::XFrame > &_inout_rxFrame)
identifies the module in the given frame.
Definition: cfg.cxx:1250
bool HasURL(const OUString &) override
Definition: cfg.hxx:199
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
Definition: cfg.cxx:2842
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
Definition: cfg.hxx:632
bool IsSeparator() const
Definition: cfg.hxx:288
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
Definition: cfg.hxx:152
void CreateDropDown()
Definition: cfg.cxx:913
bool IsDocConfig() const
Definition: cfg.hxx:130
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:406
OUString m_aModuleId
Definition: cfg.hxx:382
TriState
std::unique_ptr< weld::MenuButton > m_xGearBtn
Definition: cfg.hxx:402
OUString m_aMenuResourceURL
Definition: cfg.hxx:168
void insert(int pos, const OUString &rId)
Definition: cfg.hxx:344
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:69
OUString m_sAppName
Definition: cfg.hxx:420
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: cfg.cxx:251
SaveInData * GetSaveInData()
Definition: cfg.hxx:478
MenuSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:376
sal_uInt16 nPos
sal_Int32 GetSystemStyle(const OUString &rResourceURL)
Definition: cfg.cxx:1959
virtual void SelectElement()=0
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:550
std::unique_ptr< weld::Button > m_xAddCommandButton
Definition: cfg.hxx:417
bool m_bDetectedRangeSegmentation false
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
bool HasChangedName() const
Definition: cfg.hxx:280
SvxConfigEntry()
Definition: cfg.hxx:261