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/transfer.hxx>
23 #include <vcl/timer.hxx>
24 #include <vcl/weld.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 #define notebookbarTabScope "notebookbarTabScope"
44 
45 const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
46 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
47 const char ITEM_DESCRIPTOR_LABEL[] = "Label";
48 const char ITEM_DESCRIPTOR_TYPE[] = "Type";
49 const char ITEM_DESCRIPTOR_STYLE[] = "Style";
50 const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
51 const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
52 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
53 
54 inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
55 constexpr char16_t ITEM_TOOLBAR_URL[] = u"private:resource/toolbar/";
56 
57 inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
58 
59 const char aMenuSeparatorStr[] = " | ";
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 
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:
360 
361  virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
362  virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
363 
364 public:
366 };
367 
368 class SvxConfigPage : public SfxTabPage
369 {
370 private:
371 
375 
376  DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
377 
378 protected:
379 
381  OUString m_aURLToSelect;
382 
383  css::uno::Reference< css::frame::XFrame > m_xFrame;
384  OUString m_aModuleId;
385 
386  // Left side of the dialog where command categories and the available
387  // commands in them are displayed as a searchable list
388  std::unique_ptr<CommandCategoryListBox> m_xCommandCategoryListBox;
389  std::unique_ptr<CuiConfigFunctionListBox> m_xFunctions;
390 
391  std::unique_ptr<weld::Label> m_xCategoryLabel;
392  std::unique_ptr<weld::Label> m_xDescriptionFieldLb;
393  std::unique_ptr<weld::TextView> m_xDescriptionField;
394  std::unique_ptr<weld::Label> m_xLeftFunctionLabel;
395  std::unique_ptr<weld::Entry> m_xSearchEdit;
396  std::unique_ptr<weld::Label> m_xSearchLabel;
397 
398 
399  // Right side of the dialog where the contents of the selected
400  // menu or toolbar are displayed
401  std::unique_ptr<weld::Label> m_xCustomizeLabel;
402  std::unique_ptr<weld::ComboBox> m_xTopLevelListBox;
403  // Used to add and remove toolbars/menus
404  std::unique_ptr<weld::MenuButton> m_xGearBtn;
405  std::unique_ptr<SvxMenuEntriesListBox> m_xContentsListBox;
406  std::unique_ptr<SvxConfigPageFunctionDropTarget> m_xDropTargetHelper;
407 
408  std::unique_ptr<weld::Button> m_xMoveUpButton;
409  std::unique_ptr<weld::Button> m_xMoveDownButton;
410 
411  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
412 
413  std::unique_ptr<weld::MenuButton> m_xInsertBtn;
414  std::unique_ptr<weld::MenuButton> m_xModifyBtn;
415  // Used to reset the selected toolbar/menu/context menu
416  std::unique_ptr<weld::Button> m_xResetBtn;
417 
418  // Middle buttons
419  std::unique_ptr<weld::Button> m_xAddCommandButton;
420  std::unique_ptr<weld::Button> m_xRemoveCommandButton;
421 
422  OUString m_sAppName;
423  OUString m_sFileName;
424 
425  SvxConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
426 
427  DECL_LINK(MoveHdl, weld::Button&, void);
428  DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
429  DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
430  DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
431  DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
432  DECL_LINK(ImplUpdateDataHdl, Timer*, void);
433  DECL_LINK(FocusOut_Impl, weld::Widget&, void);
434 
435  virtual SaveInData* CreateSaveInData(
436  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
437  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
438  const OUString& aModuleId,
439  bool docConfig ) = 0;
440 
441  virtual void Init() = 0;
442  virtual void UpdateButtonStates() = 0;
443  virtual short QueryReset() = 0;
444 
445  virtual void SelectElement() = 0;
446 
447  int AppendEntry(SvxConfigEntry* pNewEntryData,
448  int nTarget);
449 
450  void AddSubMenusToUI( std::u16string_view rBaseTitle,
451  SvxConfigEntry const * pParentData );
452 
453  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
454  weld::TreeView& rTreeView, int nPos,
455  bool bMenu = false);
456  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
457  weld::TreeView& rTreeView, weld::TreeIter& rIter,
458  bool bMenu = false);
459 
460  void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString& sUIItemId,
461  const OUString& sUIItemCommand,
462  weld::TreeView& rTreeView, const weld::TreeIter& rIter);
463 
464  SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
465  SvxConfigEntry* pChildData );
466 
467  void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
468 
469 public:
470 
471  virtual ~SvxConfigPage() override;
472 
473  static bool CanConfig( std::u16string_view rModuleId );
474 
476  const OUString& GetAppName() const { return m_sAppName; }
477  const OUString& GetFileName() const { return m_sFileName; }
478 
479  int AddFunction(int nTarget,
480  bool bAllowDuplicates);
481 
482  virtual void MoveEntry( bool bMoveUp );
483 
484  bool MoveEntryData(int SourceEntry, int nTargetEntry);
485 
486  bool FillItemSet( SfxItemSet* ) override;
487  void Reset( const SfxItemSet* ) override;
488 
489  virtual void DeleteSelectedContent() = 0;
490  virtual void DeleteSelectedTopLevel() = 0;
491 
492  virtual void ListModified() {}
493 
495  {
496  return reinterpret_cast<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id().toInt64());
497  }
498 
509  static OUString
510  GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
511 
512  OUString GetScriptURL() const;
513  OUString GetSelectedDisplayName() const;
514 };
515 
517 {
518  std::unique_ptr<SvxEntries> mpEntries;
520 
521  std::unique_ptr<weld::Widget> m_xMenuBox;
522  std::unique_ptr<weld::Entry> m_xMenuNameEdit;
523  std::unique_ptr<weld::TreeView> m_xMenuListBox;
524  std::unique_ptr<weld::Button> m_xMoveUpButton;
525  std::unique_ptr<weld::Button> m_xMoveDownButton;
526 
527  void UpdateButtonStates();
528 
529  DECL_LINK(MoveHdl, weld::Button&, void);
530  DECL_LINK(ModifyHdl, weld::Entry&, void);
531  DECL_LINK(SelectHdl, weld::TreeView&, void);
532 
533 public:
536  SvxConfigEntry const *, bool bCreateMenu);
537  virtual ~SvxMainMenuOrganizerDialog() override;
538 
539  std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
541 };
542 
544 {
545 private:
546 
547  std::unique_ptr<SvxConfigEntry> pRootEntry;
549 
550  css::uno::Reference
551  < css::container::XNameAccess > m_xPersistentWindowState;
552 
553  void LoadToolbar(
554  const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
555  SvxConfigEntry const * pParentData );
556 
557  void ApplyToolbar(
558  css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
559  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
560  SvxConfigEntry const *pToolbar );
561 
562 public:
563 
565  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
566  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
567  const OUString& aModuleId,
568  bool docConfig );
569 
570  virtual ~ToolbarSaveInData() override;
571 
572  void CreateToolbar( SvxConfigEntry* pToolbar );
573  void RestoreToolbar( SvxConfigEntry* pToolbar );
574  void RemoveToolbar( SvxConfigEntry* pToolbar );
575  void ApplyToolbar( SvxConfigEntry* pToolbar );
576 
577  OUString GetSystemUIName( const OUString& rResourceURL );
578 
579  sal_Int32 GetSystemStyle( const OUString& rResourceURL );
580 
581  void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
582 
583  void SetSystemStyle(
584  const css::uno::Reference< css::frame::XFrame >& xFrame,
585  const OUString& rResourceURL, sal_Int32 nStyle );
586 
587  SvxEntries* GetEntries() override;
588  void SetEntries( std::unique_ptr<SvxEntries> ) override;
589  bool HasSettings() override;
590  bool HasURL( const OUString& rURL ) override;
591  void Reset() override;
592  bool Apply() override;
593 };
594 
596 {
597 private:
598  std::unique_ptr<weld::Entry> m_xEdtName;
599  std::unique_ptr<weld::Button> m_xBtnOK;
600 public:
601  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
602 
603  SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
604  virtual ~SvxNewToolbarDialog() override;
605 
606  OUString GetName() const
607  {
608  return m_xEdtName->get_text();
609  }
610 };
611 
613 {
614 private:
615  sal_Int32 m_nExpectedSize;
616 
617  css::uno::Reference<
618  css::ui::XImageManager > m_xImageManager;
619 
620  css::uno::Reference<
621  css::ui::XImageManager > m_xParentImageManager;
622 
623  css::uno::Reference<
624  css::ui::XImageManager > m_xImportedImageManager;
625 
626  css::uno::Reference<
627  css::graphic::XGraphicProvider > m_xGraphProvider;
628 
629  std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
630 
631  std::unique_ptr<ValueSet> m_xTbSymbol;
632  std::unique_ptr<weld::CustomWeld> m_xTbSymbolWin;
633  std::unique_ptr<weld::Label> m_xFtNote;
634  std::unique_ptr<weld::Button> m_xBtnImport;
635  std::unique_ptr<weld::Button> m_xBtnDelete;
636 
637  bool ReplaceGraphicItem( const OUString& aURL );
638 
639  bool ImportGraphic( const OUString& aURL );
640 
641  void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
642 
643 public:
644 
646  weld::Window *pWindow,
647  const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
648  const css::uno::Reference< css::ui::XImageManager >& rXParentImageManager);
649 
650  virtual ~SvxIconSelectorDialog() override;
651 
652  css::uno::Reference< css::graphic::XGraphic >
653  GetSelectedIcon();
654 
655  DECL_LINK(SelectHdl, ValueSet*, void);
656  DECL_LINK(ImportHdl, weld::Button&, void);
657  DECL_LINK(DeleteHdl, weld::Button&, void);
658 };
659 
660 //added for issue83555
662 {
663 private:
664  std::unique_ptr<weld::TextView> m_xLineEditDescription;
665 public:
666  SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
667 };
668 
669 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bIsVisible
toolbar specific properties
Definition: cfg.hxx:246
void RemoveToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2449
bool ReplaceGraphicItem(const OUString &aURL)
Definition: cfg.cxx:2874
const char ITEM_DESCRIPTOR_RESOURCEURL[]
Definition: cfg.hxx:51
bool bIsMain
Definition: cfg.hxx:241
OUString m_aDescriptorContainer
Definition: cfg.hxx:548
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:389
SvxEntries * GetEntries() const
Definition: cfg.hxx:290
bool IsModified() const
Definition: cfg.hxx:300
virtual short QueryReset()=0
const char ITEM_DESCRIPTOR_TYPE[]
Definition: cfg.hxx:48
std::unique_ptr< weld::Entry > m_xEdtName
Definition: cfg.hxx:598
std::unique_ptr< weld::Button > m_xResetBtn
Definition: cfg.hxx:416
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:525
const OUString & GetFileName() const
Definition: cfg.hxx:477
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:521
std::unique_ptr< weld::MenuButton > m_xModifyBtn
Definition: cfg.hxx:414
bool IsVisible() const
Definition: cfg.hxx:307
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:388
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
Definition: cfg.hxx:381
std::unique_ptr< SvxEntries > ReleaseEntries()
Definition: cfg.hxx:539
OUString aLabel
Definition: cfg.hxx:235
virtual ~SvxMainMenuOrganizerDialog() override
Definition: cfg.cxx:1770
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:551
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
Definition: cfg.cxx:229
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:659
static MenuSaveInData * GetDefaultData()
Definition: cfg.hxx:180
signed char sal_Int8
std::unique_ptr< SvxConfigPageFunctionDropTarget > m_xDropTargetHelper
Definition: cfg.hxx:406
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:2037
bool bDocConfig
Definition: cfg.hxx:84
void Reset(const SfxItemSet *) override
Definition: cfg.cxx:1023
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:383
std::unique_ptr< weld::Button > m_xBtnImport
Definition: cfg.hxx:634
static MenuSaveInData * pDefaultData
static holder of the default menu data
Definition: cfg.hxx:177
SvxConfigEntry * GetTopLevelSelection()
Definition: cfg.hxx:494
Timer m_aUpdateDataTimer
Definition: cfg.hxx:372
std::unique_ptr< weld::Button > m_xRemoveCommandButton
Definition: cfg.hxx:420
bool IsPopup() const
Definition: cfg.hxx:282
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
Definition: cfg.hxx:627
void SetBackupGraphic(css::uno::Reference< css::graphic::XGraphic > const &graphic)
Definition: cfg.hxx:309
int get_selected_index() const
Definition: cfg.hxx:332
bool HasSettings() override
Definition: cfg.cxx:839
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:621
virtual void MoveEntry(bool bMoveUp)
Definition: cfg.cxx:1625
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:322
constexpr OUStringLiteral CUSTOM_TOOLBAR_STR
Definition: cfg.hxx:57
const char ITEM_DESCRIPTOR_ISVISIBLE[]
Definition: cfg.hxx:50
std::unique_ptr< weld::Label > m_xCategoryLabel
Definition: cfg.hxx:391
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
Definition: cfg.cxx:3173
bool IsReadOnly() const
Definition: cfg.hxx:129
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
Definition: cfg.hxx:405
SvxIconSelectorDialog(weld::Window *pWindow, const css::uno::Reference< css::ui::XImageManager > &rXImageManager, const css::uno::Reference< css::ui::XImageManager > &rXParentImageManager)
Definition: cfg.cxx:2631
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
Definition: cfg.cxx:1323
OUString m_sFileName
Definition: cfg.hxx:423
std::unique_ptr< weld::Entry > m_xMenuNameEdit
Definition: cfg.hxx:522
OUString m_aDescriptorContainer
Definition: cfg.hxx:169
const char aMenuSeparatorStr[]
Definition: cfg.hxx:59
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:829
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
Definition: cfg.hxx:402
bool IsRenamable() const
Definition: cfg.cxx:1883
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:632
sal_Int32 nStyle
Definition: cfg.hxx:247
virtual void ListModified()
Definition: cfg.hxx:492
css::uno::Reference< css::graphic::XGraphic > xBackupGraphic
Definition: cfg.hxx:250
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: cfg.cxx:3180
bool FillItemSet(SfxItemSet *) override
Definition: cfg.cxx:1299
void LoadSubMenus(const css::uno::Reference< css::container::XIndexAccess > &xMenuSettings, const OUString &rBaseTitle, SvxConfigEntry const *pParentData, bool bContextMenu)
Definition: cfg.cxx:433
void ApplyMenu(css::uno::Reference< css::container::XIndexContainer > const &rMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry *pMenuData)
Definition: cfg.cxx:613
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:392
virtual SvxEntries * GetEntries()=0
OUString get_id(int nPos) const
Definition: cfg.hxx:333
SvxEntries * GetEntries() override
Definition: cfg.cxx:2097
OUString GetName() const
Definition: cfg.hxx:606
std::unique_ptr< weld::Label > m_xFtNote
Definition: cfg.hxx:633
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:1888
void SetName(const OUString &rStr)
Definition: cfg.hxx:279
void SetMain()
Definition: cfg.hxx:293
constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME
Definition: cfg.hxx:52
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:524
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:160
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:1445
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:698
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:545
bool bModified
Definition: cfg.hxx:82
void LoadToolbar(const css::uno::Reference< css::container::XIndexAccess > &xToolBarSettings, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:2535
void SetEntries(std::unique_ptr< SvxEntries > entries)
Definition: cfg.hxx:291
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:2272
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:1998
SvxEntries * FindParentForChild(SvxEntries *pParentEntries, SvxConfigEntry *pChildData)
Definition: cfg.cxx:1374
virtual void DeleteSelectedTopLevel()=0
css::uno::Reference< css::container::XNameAccess > m_xCommandToLabelMap
Definition: cfg.hxx:146
const char ITEM_DESCRIPTOR_STYLE[]
Definition: cfg.hxx:49
std::unique_ptr< SvxConfigEntry > m_pRootEntry
Definition: cfg.hxx:208
void SetUserDefined(bool bOn=true)
Definition: cfg.hxx:284
const char ITEM_DESCRIPTOR_LABEL[]
Definition: cfg.hxx:47
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
Definition: cfg.cxx:1701
weld::TreeView & get_widget()
Definition: cfg.hxx:342
bool bIsParentData
Definition: cfg.hxx:242
bool bInitialised
Definition: cfg.hxx:373
virtual ~ContextMenuSaveInData() override
Definition: cfg.cxx:694
const OUString & GetAppName() const
Definition: cfg.hxx:476
std::unique_ptr< ValueSet > m_xTbSymbol
Definition: cfg.hxx:631
sal_uInt16 nId
common properties
Definition: cfg.hxx:234
virtual ~ToolbarSaveInData() override
Definition: cfg.cxx:1906
virtual ~SvxIconSelectorDialog() override
Definition: cfg.cxx:2787
virtual ~SvxNewToolbarDialog() override
Definition: cfg.cxx:2622
std::unique_ptr< weld::Label > m_xSearchLabel
Definition: cfg.hxx:396
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:209
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:601
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:2326
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:683
OUString GetScriptURL() const
Definition: cfg.cxx:1276
sal_Int32 m_nExpectedSize
Definition: cfg.hxx:615
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
Definition: cfg.cxx:335
virtual ~SaveInData()
Definition: cfg.hxx:121
virtual void DeleteSelectedContent()=0
bool IsMovable() const
Definition: cfg.cxx:1873
VirtualDevice & get_dropdown_image() const
Definition: cfg.hxx:330
bool bStrEdited
Definition: cfg.hxx:239
void ResetContextMenu(const SvxConfigEntry *pEntry)
Definition: cfg.cxx:892
SvxNewToolbarDialog(weld::Window *pWindow, const OUString &rName)
Definition: cfg.cxx:2612
std::unique_ptr< weld::Button > m_xBtnOK
Definition: cfg.hxx:599
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
Definition: cfg.hxx:91
virtual ~MenuSaveInData() override
Definition: cfg.cxx:402
virtual ~SvxMenuEntriesListBox()
Definition: cfg.cxx:934
ScopedVclPtr< VirtualDevice > m_xDropDown
Definition: cfg.hxx:323
std::unique_ptr< weld::TextView > m_xLineEditDescription
Definition: cfg.hxx:664
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:267
bool ImportGraphic(const OUString &aURL)
Definition: cfg.cxx:3085
OUString GetSelectedDisplayName() const
Definition: cfg.cxx:1294
std::unique_ptr< weld::MenuButton > m_xInsertBtn
Definition: cfg.hxx:413
std::unique_ptr< weld::Entry > m_xSearchEdit
Definition: cfg.hxx:395
OUString m_sNewMenuEntryId
Definition: cfg.hxx:519
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:374
virtual ~SvxConfigPage() override
Definition: cfg.cxx:1019
void Reset() override
Definition: cfg.cxx:2290
const css::uno::Reference< css::ui::XImageManager > & GetParentImageManager() const
Definition: cfg.hxx:146
void RestoreToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2472
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:518
SvxMenuEntriesListBox(std::unique_ptr< weld::TreeView > xControl, SvxConfigPage *pPage)
Definition: cfg.cxx:924
bool MoveEntryData(int SourceEntry, int nTargetEntry)
Definition: cfg.cxx:1661
css::uno::Reference< css::ui::XImageManager > m_xImageManager
Definition: cfg.hxx:618
virtual void UpdateButtonStates()=0
bool Apply() override
Definition: cfg.cxx:844
void InsertEntryIntoUI(SvxConfigEntry *pNewEntryData, weld::TreeView &rTreeView, int nPos, bool bMenu=false)
Definition: cfg.cxx:1541
DECL_LINK(MoveHdl, weld::Button &, void)
bool IsMain() const
Definition: cfg.hxx:294
void SetModified(bool bValue=true)
Definition: cfg.hxx:126
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:401
int AddFunction(int nTarget, bool bAllowDuplicates)
Definition: cfg.cxx:1398
~SvxConfigEntry()
Definition: cfg.cxx:1862
void AddSubMenusToUI(std::u16string_view rBaseTitle, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:1357
void SetEntries(std::unique_ptr< SvxEntries > pNewEntries) override
Definition: cfg.cxx:824
bool bPopUp
Definition: cfg.hxx:238
virtual bool HasSettings()=0
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
Definition: cfg.cxx:3157
int n_children() const
Definition: cfg.hxx:335
bool HasSettings() override
Definition: cfg.cxx:2284
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
Definition: cfg.hxx:394
bool IsDeletable() const
Definition: cfg.cxx:1878
virtual void Init()=0
SvxConfigDialog(weld::Window *, const SfxItemSet *)
Definition: cfg.cxx:203
void ImportGraphics(const css::uno::Sequence< OUString > &aURLs)
Definition: cfg.cxx:2986
SvxConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &)
Definition: cfg.cxx:970
bool bIsModified
Definition: cfg.hxx:243
constexpr char16_t ITEM_TOOLBAR_URL[]
Definition: cfg.hxx:55
void CreateToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2422
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:428
std::unique_ptr< weld::Button > m_xBtnDelete
Definition: cfg.hxx:635
SvxEntries * GetEntries() override
Definition: cfg.cxx:723
SvxConfigPageFunctionDropTarget(SvxConfigPage &rPage, weld::TreeView &rTreeView)
Definition: cfg.cxx:3166
SvxEntries * GetEntries() override
methods inherited from SaveInData
Definition: cfg.cxx:407
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:411
virtual bool HasURL(const OUString &aURL)=0
const char ITEM_DESCRIPTOR_COMMANDURL[]
Definition: cfg.hxx:45
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:2266
SvxConfigEntry * GetSelectedEntry()
Definition: cfg.cxx:1834
void Reset() override
Definition: cfg.cxx:874
std::unique_ptr< weld::TreeView > m_xMenuListBox
Definition: cfg.hxx:523
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:393
bool bReadOnly
Definition: cfg.hxx:85
weld::TreeView & m_rTreeView
Definition: cfg.hxx:359
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:409
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
Definition: cfg.hxx:624
static OUString GetFrameWithDefaultAndIdentify(css::uno::Reference< css::frame::XFrame > &_inout_rxFrame)
identifies the module in the given frame.
Definition: cfg.cxx:1238
bool HasURL(const OUString &) override
Definition: cfg.hxx:199
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
Definition: cfg.cxx:2791
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
Definition: cfg.hxx:629
bool IsSeparator() const
Definition: cfg.hxx:288
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
Definition: cfg.hxx:152
void CreateDropDown()
Definition: cfg.cxx:906
bool IsDocConfig() const
Definition: cfg.hxx:130
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:408
OUString m_aModuleId
Definition: cfg.hxx:384
TriState
std::unique_ptr< weld::MenuButton > m_xGearBtn
Definition: cfg.hxx:404
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:422
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: cfg.cxx:244
SaveInData * GetSaveInData()
Definition: cfg.hxx:475
MenuSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:371
sal_uInt16 nPos
sal_Int32 GetSystemStyle(const OUString &rResourceURL)
Definition: cfg.cxx:1910
virtual void SelectElement()=0
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:547
std::unique_ptr< weld::Button > m_xAddCommandButton
Definition: cfg.hxx:419
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
bool HasChangedName() const
Definition: cfg.hxx:280
SvxConfigEntry()
Definition: cfg.hxx:261