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 #ifndef INCLUDED_CUI_SOURCE_INC_CFG_HXX
20 #define INCLUDED_CUI_SOURCE_INC_CFG_HXX
21 
22 #include <vcl/weld.hxx>
23 #include <svtools/valueset.hxx>
24 
25 #include <com/sun/star/container/XIndexContainer.hpp>
26 #include <com/sun/star/container/XNameAccess.hpp>
27 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
28 #include <com/sun/star/ui/XImageManager.hpp>
29 #include <com/sun/star/graphic/XGraphicProvider.hpp>
30 #include <com/sun/star/frame/XFrame.hpp>
31 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
32 
33 #include <sfx2/tabdlg.hxx>
34 #include <memory>
35 #include <vector>
36 
37 #include "cfgutil.hxx"
39 
40 #define notebookbarTabScope "notebookbarTabScope"
41 
42 static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
43 static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
44 static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
45 static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
46 static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
47 static const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
48 static const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
49 static const char ITEM_DESCRIPTOR_UINAME[] = "UIName";
50 
51 static const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
52 static const char ITEM_TOOLBAR_URL[] = "private:resource/toolbar/";
53 
54 static const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_";
55 
56 static const char aMenuSeparatorStr[] = " | ";
57 
58 class SvxConfigEntry;
60 
61 typedef std::vector< SvxConfigEntry* > SvxEntries;
62 
64 {
65 private:
66  css::uno::Reference< css::frame::XFrame > m_xFrame;
67 
68 public:
70 
71  virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
72  void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
73 };
74 
76 {
77 private:
78 
79  bool bModified;
80 
81  bool bDocConfig;
82  bool bReadOnly;
83 
84  css::uno::Reference
85  < css::ui::XUIConfigurationManager > m_xCfgMgr;
86 
87  css::uno::Reference
88  < css::ui::XUIConfigurationManager > m_xParentCfgMgr;
89 
90  css::uno::Reference
91  < css::ui::XImageManager > m_xImgMgr;
92 
93  css::uno::Reference
94  < css::ui::XImageManager > m_xParentImgMgr;
95 
96  static css::uno::Reference
97  < css::ui::XImageManager >* xDefaultImgMgr;
98 
99 protected:
100 
101  void ApplyMenu(
102  css::uno::Reference< css::container::XIndexContainer > const & rMenuBar,
103  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
104  SvxConfigEntry *pMenuData );
105 
106  void LoadSubMenus(
107  const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
108  const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool bContextMenu );
109 
110 public:
111 
112  SaveInData(
113  const css::uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr,
114  const css::uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr,
115  const OUString& aModuleId,
116  bool docConfig );
117 
118  virtual ~SaveInData() {}
119 
120  bool PersistChanges(
121  const css::uno::Reference< css::uno::XInterface >& xManager );
122 
123  void SetModified( bool bValue = true ) { bModified = bValue; }
124  bool IsModified( ) { return bModified; }
125 
126  bool IsReadOnly( ) { return bReadOnly; }
127  bool IsDocConfig( ) { return bDocConfig; }
128 
129  const css::uno::Reference
130  < css::ui::XUIConfigurationManager >&
132 
133  const css::uno::Reference
134  < css::ui::XUIConfigurationManager >&
136 
137  const css::uno::Reference
138  < css::ui::XImageManager >&
139  GetImageManager() { return m_xImgMgr; };
140 
141  const css::uno::Reference
142  < css::ui::XImageManager >&
144 
145  css::uno::Reference
146  < css::container::XNameAccess > m_xCommandToLabelMap;
147 
148  css::uno::Sequence
149  < css::beans::PropertyValue > m_aSeparatorSeq;
150 
151  css::uno::Reference<css::graphic::XGraphic> GetImage(const OUString& rCommandURL);
152 
153  virtual bool HasURL( const OUString& aURL ) = 0;
154  virtual bool HasSettings() = 0;
155  virtual SvxEntries* GetEntries() = 0;
156  virtual void SetEntries( std::unique_ptr<SvxEntries> ) = 0;
157  virtual void Reset() = 0;
158  virtual bool Apply() = 0;
159 };
160 
162 {
163 private:
164 
167 
168  css::uno::Reference
169  < css::container::XIndexAccess > m_xMenuSettings;
170 
171  std::unique_ptr<SvxConfigEntry> pRootEntry;
172 
173 
175 
176  static void SetDefaultData( MenuSaveInData* pData ) {pDefaultData = pData;}
178 
179  void Apply(
180  css::uno::Reference< css::container::XIndexContainer > const & rNewMenuBar,
181  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
182 
183 public:
184 
186  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
187  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
188  const OUString& aModuleId,
189  bool docConfig );
190 
191  virtual ~MenuSaveInData() override;
192 
194  SvxEntries* GetEntries() override;
195  void SetEntries( std::unique_ptr<SvxEntries> ) override;
196  bool HasURL( const OUString& ) override { return false; }
197  bool HasSettings() override { return m_xMenuSettings.is(); }
198  void Reset() override;
199  bool Apply() override;
200 };
201 
203 {
204 private:
205  std::unique_ptr< SvxConfigEntry > m_pRootEntry;
206  css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState;
207  OUString GetUIName( const OUString& rResourceURL );
208 
209 public:
211  const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
212  const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
213  const OUString& aModuleId, bool bIsDocConfig );
214  virtual ~ContextMenuSaveInData() override;
215 
216  SvxEntries* GetEntries() override;
217  void SetEntries( std::unique_ptr<SvxEntries> pNewEntries ) override;
218  bool HasSettings() override;
219  bool HasURL( const OUString& rURL ) override;
220  void Reset() override;
221  bool Apply() override;
222 
223  void ResetContextMenu( const SvxConfigEntry* pEntry );
224 };
225 
227 {
228 private:
229 
231  sal_uInt16 nId;
232  OUString aLabel;
233  OUString aCommand;
234 
235  bool bPopUp;
238  bool bIsMain;
241 
244  sal_Int32 nStyle;
245 
246  css::uno::Reference<
247  css::graphic::XGraphic > xBackupGraphic;
248 
249  std::unique_ptr<SvxEntries> mpEntries;
250 
251 public:
252 
253  SvxConfigEntry( const OUString& rDisplayName,
254  const OUString& rCommandURL,
255  bool bPopup,
256  bool bParentData );
257 
259  :
260  nId( 0 ),
261  bPopUp( false ),
262  bStrEdited( false ),
263  bIsUserDefined( false ),
264  bIsMain( false ),
265  bIsParentData( false ),
266  bIsModified( false ),
267  bIsVisible( true ),
268  nStyle( 0 )
269  {}
270 
271  ~SvxConfigEntry();
272 
273  const OUString& GetCommand() const { return aCommand; }
274 
275  const OUString& GetName() const { return aLabel; }
276  void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
277  bool HasChangedName() const { return bStrEdited; }
278 
279  bool IsPopup() const { return bPopUp; }
280 
281  void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
282  bool IsUserDefined() const { return bIsUserDefined; }
283 
284  bool IsBinding() const { return !bPopUp; }
285  bool IsSeparator() const { return nId == 0; }
286 
287  SvxEntries* GetEntries() const { return mpEntries.get(); }
288  void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
289 
290  void SetMain() { bIsMain = true; }
291  bool IsMain() { return bIsMain; }
292 
293  void SetParentData( bool bValue = true ) { bIsParentData = bValue; }
294  bool IsParentData() { return bIsParentData; }
295 
296  void SetModified( bool bValue = true ) { bIsModified = bValue; }
297  bool IsModified() { return bIsModified; }
298 
299  bool IsMovable();
300  bool IsDeletable();
301  bool IsRenamable();
302 
303  void SetVisible( bool b ) { bIsVisible = b; }
304  bool IsVisible() const { return bIsVisible; }
305 
306  void SetBackupGraphic( css::uno::Reference< css::graphic::XGraphic > const & graphic )
307  { xBackupGraphic = graphic; }
308 
309  const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic()
310  { return xBackupGraphic; }
311 
312  sal_Int32 GetStyle() const { return nStyle; }
313  void SetStyle( sal_Int32 style ) { nStyle = style; }
314 };
315 
317 {
318 protected:
319  std::unique_ptr<weld::TreeView> m_xControl;
322 
323 public:
324  SvxMenuEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPage);
325  virtual ~SvxMenuEntriesListBox();
326 
327  int get_selected_index() const { return m_xControl->get_selected_index(); }
328  OUString get_id(int nPos) const { return m_xControl->get_id(nPos); }
329  void remove(int nPos) { m_xControl->remove(nPos); }
330  int n_children() const { return m_xControl->n_children(); }
331  void set_text(int row, const OUString& rText, int col) { m_xControl->set_text(row, rText, col); }
332  void set_image(int row, const css::uno::Reference<css::graphic::XGraphic>& rImage, int col) { m_xControl->set_image(row, rImage, col); }
333  void set_dropdown(int row, int col) { m_xControl->set_image(row, *m_xDropDown, col); }
334  void set_id(int row, const OUString& rId) { m_xControl->set_id(row, rId); }
335  void clear() { m_xControl->clear(); } //need frees ?
336  void set_toggle(int row, TriState eState, int col) { m_xControl->set_toggle(row, eState, col); }
337  void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); }
338  void select(int pos) { m_xControl->select(pos); }
339 
341 
342  void insert(int pos, const OUString& rId)
343  {
344  m_xControl->insert(nullptr, pos, nullptr, &rId,
345  nullptr, nullptr, nullptr, false, nullptr);
346  }
347 
348  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
349 
350  void CreateDropDown();
351 };
352 
353 class SvxConfigPage : public SfxTabPage
354 {
355 private:
356 
360 
361  DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
362 
363 protected:
364 
366  OUString m_aURLToSelect;
367 
368  css::uno::Reference< css::frame::XFrame > m_xFrame;
369 
370  // Left side of the dialog where command categories and the available
371  // commands in them are displayed as a searchable list
372  std::unique_ptr<CommandCategoryListBox> m_xCommandCategoryListBox;
373  std::unique_ptr<CuiConfigFunctionListBox> m_xFunctions;
374 
375  std::unique_ptr<weld::Label> m_xCategoryLabel;
376  std::unique_ptr<weld::ComboBox> m_xCategoryListBox;
377  std::unique_ptr<weld::Label> m_xDescriptionFieldLb;
378  std::unique_ptr<weld::TextView> m_xDescriptionField;
379  std::unique_ptr<weld::Label> m_xLeftFunctionLabel;
380  std::unique_ptr<weld::Entry> m_xSearchEdit;
381  std::unique_ptr<weld::Label> m_xSearchLabel;
382 
383 
384  // Right side of the dialog where the contents of the selected
385  // menu or toolbar are displayed
386  std::unique_ptr<weld::Label> m_xCustomizeLabel;
387  std::unique_ptr<weld::ComboBox> m_xTopLevelListBox;
388  // Used to add and remove toolbars/menus
389  std::unique_ptr<weld::MenuButton> m_xGearBtn;
390  std::unique_ptr<SvxMenuEntriesListBox> m_xContentsListBox;
391 
392  std::unique_ptr<weld::Button> m_xMoveUpButton;
393  std::unique_ptr<weld::Button> m_xMoveDownButton;
394 
395  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
396 
397  std::unique_ptr<weld::MenuButton> m_xInsertBtn;
398  std::unique_ptr<weld::MenuButton> m_xModifyBtn;
399  // Used to reset the selected toolbar/menu/context menu
400  std::unique_ptr<weld::Button> m_xResetBtn;
401 
402  // Middle buttons
403  std::unique_ptr<weld::Button> m_xAddCommandButton;
404  std::unique_ptr<weld::Button> m_xRemoveCommandButton;
405 
406 
408 
409  DECL_LINK(MoveHdl, weld::Button&, void);
410  DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
411  DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, void);
412  DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
413  DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
414  DECL_LINK(ImplUpdateDataHdl, Timer*, void);
415  DECL_LINK(FocusOut_Impl, weld::Widget&, void);
416 
417  virtual SaveInData* CreateSaveInData(
418  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
419  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
420  const OUString& aModuleId,
421  bool docConfig ) = 0;
422 
423  virtual void Init() = 0;
424  virtual void UpdateButtonStates() = 0;
425  virtual short QueryReset() = 0;
426 
427  virtual void SelectElement() = 0;
428 
429  int InsertEntry(SvxConfigEntry* pNewEntryData,
430  int nTarget,
431  bool bFront = false);
432 
433  void AddSubMenusToUI( const OUString& rBaseTitle,
434  SvxConfigEntry const * pParentData );
435 
436  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
437  int nPos, int nStartCol);
438  void InsertEntryIntoNotebookbarTabUI(OUString& sClassId ,OUString& sUIItemId, OUString& sUIItemCommand, int nPos,
439  int nStartCol);
440 
441  SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
442  SvxConfigEntry* pChildData );
443 
444  void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
445 
446 public:
447 
448  virtual ~SvxConfigPage() override;
449 
450  static bool CanConfig( const OUString& rModuleId );
451 
453 
454  int AddFunction(int nTarget,
455  bool bAllowDuplicates);
456 
457  virtual void MoveEntry( bool bMoveUp );
458 
459  bool MoveEntryData(int SourceEntry, int nTargetEntry);
460 
461  bool FillItemSet( SfxItemSet* ) override;
462  void Reset( const SfxItemSet* ) override;
463 
464  virtual void DeleteSelectedContent() = 0;
465  virtual void DeleteSelectedTopLevel() = 0;
466 
468  {
469  return reinterpret_cast<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id().toInt64());
470  }
471 
482  static OUString
483  GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
484 
485  OUString GetScriptURL() const;
486  OUString GetSelectedDisplayName();
487 };
488 
490 {
491  std::unique_ptr<SvxEntries> mpEntries;
493 
494  std::unique_ptr<weld::Widget> m_xMenuBox;
495  std::unique_ptr<weld::Entry> m_xMenuNameEdit;
496  std::unique_ptr<weld::TreeView> m_xMenuListBox;
497  std::unique_ptr<weld::Button> m_xMoveUpButton;
498  std::unique_ptr<weld::Button> m_xMoveDownButton;
499 
500  void UpdateButtonStates();
501 
502  DECL_LINK(MoveHdl, weld::Button&, void);
503  DECL_LINK(ModifyHdl, weld::Entry&, void);
504  DECL_LINK(SelectHdl, weld::TreeView&, void);
505 
506 public:
509  SvxConfigEntry const *, bool bCreateMenu);
510  virtual ~SvxMainMenuOrganizerDialog() override;
511 
512  std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
514 };
515 
517 {
518 private:
519 
520  std::unique_ptr<SvxConfigEntry> pRootEntry;
522 
523  css::uno::Reference
524  < css::container::XNameAccess > m_xPersistentWindowState;
525 
526  void LoadToolbar(
527  const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
528  SvxConfigEntry const * pParentData );
529 
530  void ApplyToolbar(
531  css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
532  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
533  SvxConfigEntry const *pToolbar );
534 
535 public:
536 
538  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
539  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
540  const OUString& aModuleId,
541  bool docConfig );
542 
543  virtual ~ToolbarSaveInData() override;
544 
545  void CreateToolbar( SvxConfigEntry* pToolbar );
546  void RestoreToolbar( SvxConfigEntry* pToolbar );
547  void RemoveToolbar( SvxConfigEntry* pToolbar );
548  void ApplyToolbar( SvxConfigEntry* pToolbar );
549 
550  OUString GetSystemUIName( const OUString& rResourceURL );
551 
552  sal_Int32 GetSystemStyle( const OUString& rResourceURL );
553 
554  void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
555 
556  void SetSystemStyle(
557  const css::uno::Reference< css::frame::XFrame >& xFrame,
558  const OUString& rResourceURL, sal_Int32 nStyle );
559 
560  SvxEntries* GetEntries() override;
561  void SetEntries( std::unique_ptr<SvxEntries> ) override;
562  bool HasSettings() override;
563  bool HasURL( const OUString& rURL ) override;
564  void Reset() override;
565  bool Apply() override;
566 };
567 
569 {
570 private:
571  std::unique_ptr<weld::Entry> m_xEdtName;
572  std::unique_ptr<weld::Button> m_xBtnOK;
573 public:
574  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
575 
576  SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
577  virtual ~SvxNewToolbarDialog() override;
578 
579  OUString GetName()
580  {
581  return m_xEdtName->get_text();
582  }
583 };
584 
586 {
587 private:
588  sal_Int32 m_nExpectedSize;
589 
590  css::uno::Reference<
591  css::ui::XImageManager > m_xImageManager;
592 
593  css::uno::Reference<
594  css::ui::XImageManager > m_xParentImageManager;
595 
596  css::uno::Reference<
597  css::ui::XImageManager > m_xImportedImageManager;
598 
599  css::uno::Reference<
600  css::graphic::XGraphicProvider > m_xGraphProvider;
601 
602  std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
603 
604  std::unique_ptr<SvtValueSet> m_xTbSymbol;
605  std::unique_ptr<weld::CustomWeld> m_xTbSymbolWin;
606  std::unique_ptr<weld::Label> m_xFtNote;
607  std::unique_ptr<weld::Button> m_xBtnImport;
608  std::unique_ptr<weld::Button> m_xBtnDelete;
609 
610  bool ReplaceGraphicItem( const OUString& aURL );
611 
612  bool ImportGraphic( const OUString& aURL );
613 
614  void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
615 
616 public:
617 
619  weld::Window *pWindow,
620  const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
621  const css::uno::Reference< css::ui::XImageManager >& rXParentImageManager);
622 
623  virtual ~SvxIconSelectorDialog() override;
624 
625  css::uno::Reference< css::graphic::XGraphic >
626  GetSelectedIcon();
627 
628  DECL_LINK(SelectHdl, SvtValueSet*, void);
629  DECL_LINK(ImportHdl, weld::Button&, void);
630  DECL_LINK(DeleteHdl, weld::Button&, void);
631 };
632 
633 //added for issue83555
635 {
636 private:
637  std::unique_ptr<weld::TextView> m_xLineEditDescription;
638 public:
639  SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
640 };
641 
642 #endif // INCLUDED_CUI_SOURCE_INC_CFG_HXX
643 
644 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bIsVisible
toolbar specific properties
Definition: cfg.hxx:243
void RemoveToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2457
bool ReplaceGraphicItem(const OUString &aURL)
Definition: cfg.cxx:2883
static const char ITEM_DESCRIPTOR_RESOURCEURL[]
Definition: cfg.hxx:48
bool bIsMain
Definition: cfg.hxx:238
OUString m_aDescriptorContainer
Definition: cfg.hxx:521
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:373
SvxEntries * GetEntries() const
Definition: cfg.hxx:287
virtual short QueryReset()=0
bool IsReadOnly()
Definition: cfg.hxx:126
static const char ITEM_DESCRIPTOR_TYPE[]
Definition: cfg.hxx:45
std::unique_ptr< weld::Entry > m_xEdtName
Definition: cfg.hxx:571
void InsertEntryIntoNotebookbarTabUI(OUString &sClassId, OUString &sUIItemId, OUString &sUIItemCommand, int nPos, int nStartCol)
std::unique_ptr< weld::Button > m_xResetBtn
Definition: cfg.hxx:400
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:498
const OUString & GetName() const
Definition: cfg.hxx:275
std::unique_ptr< weld::Widget > m_xMenuBox
Definition: cfg.hxx:494
std::unique_ptr< weld::MenuButton > m_xModifyBtn
Definition: cfg.hxx:398
bool IsVisible() const
Definition: cfg.hxx:304
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:372
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
Definition: cfg.hxx:366
std::unique_ptr< SvxEntries > ReleaseEntries()
Definition: cfg.hxx:512
const css::uno::Reference< css::ui::XImageManager > & GetParentImageManager()
Definition: cfg.hxx:143
OUString aLabel
Definition: cfg.hxx:232
static const char ITEM_DESCRIPTOR_UINAME[]
Definition: cfg.hxx:49
virtual ~SvxMainMenuOrganizerDialog() override
Definition: cfg.cxx:1773
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:524
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
Definition: cfg.cxx:228
void SetModified(bool bValue=true)
Definition: cfg.hxx:296
void Reset() override
Definition: cfg.cxx:662
static MenuSaveInData * GetDefaultData()
Definition: cfg.hxx:177
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:2040
bool bDocConfig
Definition: cfg.hxx:81
void Reset(const SfxItemSet *) override
Definition: cfg.cxx:1025
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:368
std::unique_ptr< weld::Button > m_xBtnImport
Definition: cfg.hxx:607
static MenuSaveInData * pDefaultData
static holder of the default menu data
Definition: cfg.hxx:174
SvxConfigEntry * GetTopLevelSelection()
Definition: cfg.hxx:467
Timer m_aUpdateDataTimer
Definition: cfg.hxx:357
std::unique_ptr< weld::Button > m_xRemoveCommandButton
Definition: cfg.hxx:404
bool IsPopup() const
Definition: cfg.hxx:279
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
Definition: cfg.hxx:600
void SetBackupGraphic(css::uno::Reference< css::graphic::XGraphic > const &graphic)
Definition: cfg.hxx:306
int get_selected_index() const
Definition: cfg.hxx:327
bool HasSettings() override
Definition: cfg.cxx:842
static void SetDefaultData(MenuSaveInData *pData)
Definition: cfg.hxx:176
css::uno::Reference< css::ui::XImageManager > m_xParentImageManager
Definition: cfg.hxx:594
virtual void MoveEntry(bool bMoveUp)
Definition: cfg.cxx:1628
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetConfigManager()
Definition: cfg.hxx:131
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:324
static const char ITEM_DESCRIPTOR_ISVISIBLE[]
Definition: cfg.hxx:47
void InsertEntryIntoUI(SvxConfigEntry *pNewEntryData, int nPos, int nStartCol)
Definition: cfg.cxx:1525
static const char CUSTOM_TOOLBAR_STR[]
Definition: cfg.hxx:54
std::unique_ptr< weld::Label > m_xCategoryLabel
Definition: cfg.hxx:375
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
Definition: cfg.hxx:390
void AddSubMenusToUI(const OUString &rBaseTitle, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:1367
SvxIconSelectorDialog(weld::Window *pWindow, const css::uno::Reference< css::ui::XImageManager > &rXImageManager, const css::uno::Reference< css::ui::XImageManager > &rXParentImageManager)
Definition: cfg.cxx:2639
void set_dropdown(int row, int col)
Definition: cfg.hxx:333
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
Definition: cfg.cxx:1333
std::unique_ptr< weld::ComboBox > m_xCategoryListBox
Definition: cfg.hxx:376
std::unique_ptr< weld::Entry > m_xMenuNameEdit
Definition: cfg.hxx:495
OUString m_aDescriptorContainer
Definition: cfg.hxx:166
static const char aMenuSeparatorStr[]
Definition: cfg.hxx:56
std::vector< SvxConfigEntry * > SvxEntries
Definition: cfg.hxx:59
void set_text(int row, const OUString &rText, int col)
Definition: cfg.hxx:331
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:832
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
Definition: cfg.hxx:387
const OUString & GetCommand() const
Definition: cfg.hxx:273
bool IsModified()
Definition: cfg.hxx:297
std::unique_ptr< weld::CustomWeld > m_xTbSymbolWin
Definition: cfg.hxx:605
sal_Int32 nStyle
Definition: cfg.hxx:244
css::uno::Reference< css::graphic::XGraphic > xBackupGraphic
Definition: cfg.hxx:247
bool FillItemSet(SfxItemSet *) override
Definition: cfg.cxx:1313
void LoadSubMenus(const css::uno::Reference< css::container::XIndexAccess > &xMenuSettings, const OUString &rBaseTitle, SvxConfigEntry const *pParentData, bool bContextMenu)
Definition: cfg.cxx:436
void ApplyMenu(css::uno::Reference< css::container::XIndexContainer > const &rMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry *pMenuData)
Definition: cfg.cxx:616
bool bIsUserDefined
Definition: cfg.hxx:237
bool IsBinding() const
Definition: cfg.hxx:284
void select(int pos)
Definition: cfg.hxx:338
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
Definition: cfg.hxx:377
virtual SvxEntries * GetEntries()=0
OUString get_id(int nPos) const
Definition: cfg.hxx:328
SvxEntries * GetEntries() override
Definition: cfg.cxx:2100
std::unique_ptr< weld::Label > m_xFtNote
Definition: cfg.hxx:606
std::unique_ptr< weld::TreeView > m_xControl
Definition: cfg.hxx:319
const css::uno::Reference< css::ui::XImageManager > & GetImageManager()
Definition: cfg.hxx:139
css::uno::Reference< css::ui::XImageManager > m_xImgMgr
Definition: cfg.hxx:91
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
ToolbarSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:1891
void SetName(const OUString &rStr)
Definition: cfg.hxx:276
void SetMain()
Definition: cfg.hxx:290
static bool CanConfig(const OUString &rModuleId)
Definition: cfg.cxx:159
bool IsParentData()
Definition: cfg.hxx:294
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:497
css::uno::Reference< css::ui::XUIConfigurationManager > m_xCfgMgr
Definition: cfg.hxx:85
OUString aCommand
Definition: cfg.hxx:233
bool IsMain()
Definition: cfg.hxx:291
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:171
DECL_LINK(SearchUpdateHdl, weld::Entry &, void)
static css::uno::Reference< css::ui::XImageManager > * xDefaultImgMgr
Definition: cfg.hxx:97
bool IsDeletable()
Definition: cfg.cxx:1881
OUString GetUIName(const OUString &rResourceURL)
Definition: cfg.cxx:701
VclPtr< SvxConfigPage > pPage
Definition: cfg.hxx:321
bool HasSettings() override
Definition: cfg.hxx:197
bool Apply() override
Definition: cfg.cxx:548
bool bModified
Definition: cfg.hxx:79
void LoadToolbar(const css::uno::Reference< css::container::XIndexAccess > &xToolBarSettings, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:2543
void SetEntries(std::unique_ptr< SvxEntries > entries)
Definition: cfg.hxx:288
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:2280
virtual bool Apply()=0
void SetParentData(bool bValue=true)
Definition: cfg.hxx:293
css::uno::Reference< css::container::XIndexAccess > m_xMenuSettings
Definition: cfg.hxx:169
void SetSystemStyle(const OUString &rResourceURL, sal_Int32 nStyle)
Definition: cfg.cxx:2001
SvxEntries * FindParentForChild(SvxEntries *pParentEntries, SvxConfigEntry *pChildData)
Definition: cfg.cxx:1384
virtual void DeleteSelectedTopLevel()=0
const css::uno::Reference< css::graphic::XGraphic > & GetBackupGraphic()
Definition: cfg.hxx:309
css::uno::Reference< css::container::XNameAccess > m_xCommandToLabelMap
Definition: cfg.hxx:143
static const char ITEM_DESCRIPTOR_STYLE[]
Definition: cfg.hxx:46
std::unique_ptr< SvxConfigEntry > m_pRootEntry
Definition: cfg.hxx:205
void SetUserDefined(bool bOn=true)
Definition: cfg.hxx:281
static const char ITEM_DESCRIPTOR_LABEL[]
Definition: cfg.hxx:44
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetParentConfigManager()
Definition: cfg.hxx:135
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
Definition: cfg.cxx:1704
weld::TreeView & get_widget()
Definition: cfg.hxx:340
bool bIsParentData
Definition: cfg.hxx:239
bool bInitialised
Definition: cfg.hxx:358
virtual ~ContextMenuSaveInData() override
Definition: cfg.cxx:697
SvxConfigPage(TabPageParent, const SfxItemSet &)
Definition: cfg.cxx:972
int InsertEntry(SvxConfigEntry *pNewEntryData, int nTarget, bool bFront=false)
Definition: cfg.cxx:1454
sal_uInt16 nId
common properties
Definition: cfg.hxx:231
virtual ~ToolbarSaveInData() override
Definition: cfg.cxx:1909
bool IsMovable()
Definition: cfg.cxx:1876
virtual ~SvxIconSelectorDialog() override
Definition: cfg.cxx:2796
virtual ~SvxNewToolbarDialog() override
Definition: cfg.cxx:2630
std::unique_ptr< weld::Label > m_xSearchLabel
Definition: cfg.hxx:381
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:206
void set_toggle(int row, TriState eState, int col)
Definition: cfg.hxx:336
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:574
css::uno::Reference< css::ui::XImageManager > m_xParentImgMgr
Definition: cfg.hxx:94
void SetVisible(bool b)
Definition: cfg.hxx:303
void SetStyle(sal_Int32 style)
Definition: cfg.hxx:313
virtual void Reset()=0
bool Apply() override
Definition: cfg.cxx:2334
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:686
static const char ITEM_TOOLBAR_URL[]
Definition: cfg.hxx:52
OUString GetScriptURL() const
Definition: cfg.cxx:1290
sal_Int32 m_nExpectedSize
Definition: cfg.hxx:588
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
Definition: cfg.cxx:337
virtual ~SaveInData()
Definition: cfg.hxx:118
virtual void DeleteSelectedContent()=0
bool bStrEdited
Definition: cfg.hxx:236
void ResetContextMenu(const SvxConfigEntry *pEntry)
Definition: cfg.cxx:895
SvxNewToolbarDialog(weld::Window *pWindow, const OUString &rName)
Definition: cfg.cxx:2620
std::unique_ptr< weld::Button > m_xBtnOK
Definition: cfg.hxx:572
std::unique_ptr< SvtValueSet > m_xTbSymbol
Definition: cfg.hxx:604
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
Definition: cfg.hxx:88
virtual ~MenuSaveInData() override
Definition: cfg.cxx:405
virtual ~SvxMenuEntriesListBox()
Definition: cfg.cxx:936
ScopedVclPtr< VirtualDevice > m_xDropDown
Definition: cfg.hxx:320
static const char ITEM_MENUBAR_URL[]
Definition: cfg.hxx:51
std::unique_ptr< weld::TextView > m_xLineEditDescription
Definition: cfg.hxx:637
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:269
bool ImportGraphic(const OUString &aURL)
Definition: cfg.cxx:3094
std::unique_ptr< weld::MenuButton > m_xInsertBtn
Definition: cfg.hxx:397
OUString GetName()
Definition: cfg.hxx:579
bool IsRenamable()
Definition: cfg.cxx:1886
std::unique_ptr< weld::Entry > m_xSearchEdit
Definition: cfg.hxx:380
OUString m_sNewMenuEntryId
Definition: cfg.hxx:492
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:249
DECL_LINK(SelectHdl, SvtValueSet *, void)
sal_Int32 GetStyle() const
Definition: cfg.hxx:312
bool IsUserDefined() const
Definition: cfg.hxx:282
SaveInData * pCurrentSaveInData
Definition: cfg.hxx:359
virtual ~SvxConfigPage() override
Definition: cfg.cxx:1020
void Reset() override
Definition: cfg.cxx:2298
void RestoreToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2480
static const char ITEM_DESCRIPTOR_CONTAINER[]
Definition: cfg.hxx:43
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:491
SvxMenuEntriesListBox(std::unique_ptr< weld::TreeView > xControl, SvxConfigPage *pPage)
Definition: cfg.cxx:927
bool MoveEntryData(int SourceEntry, int nTargetEntry)
Definition: cfg.cxx:1664
css::uno::Reference< css::ui::XImageManager > m_xImageManager
Definition: cfg.hxx:591
virtual void UpdateButtonStates()=0
bool Apply() override
Definition: cfg.cxx:847
DECL_LINK(MoveHdl, weld::Button &, void)
void set_id(int row, const OUString &rId)
Definition: cfg.hxx:334
void SetModified(bool bValue=true)
Definition: cfg.hxx:123
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:386
int AddFunction(int nTarget, bool bAllowDuplicates)
Definition: cfg.cxx:1408
~SvxConfigEntry()
Definition: cfg.cxx:1865
void SetEntries(std::unique_ptr< SvxEntries > pNewEntries) override
Definition: cfg.cxx:827
bool bPopUp
Definition: cfg.hxx:235
virtual bool HasSettings()=0
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
Definition: cfg.cxx:3166
int n_children() const
Definition: cfg.hxx:330
bool HasSettings() override
Definition: cfg.cxx:2292
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
Definition: cfg.hxx:379
virtual void Init()=0
SvxConfigDialog(weld::Window *, const SfxItemSet *)
Definition: cfg.cxx:202
void ImportGraphics(const css::uno::Sequence< OUString > &aURLs)
Definition: cfg.cxx:2995
bool IsDocConfig()
Definition: cfg.hxx:127
bool bIsModified
Definition: cfg.hxx:240
void set_image(int row, const css::uno::Reference< css::graphic::XGraphic > &rImage, int col)
Definition: cfg.hxx:332
void CreateToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2430
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:431
std::unique_ptr< weld::Button > m_xBtnDelete
Definition: cfg.hxx:608
SvxEntries * GetEntries() override
Definition: cfg.cxx:726
SvxEntries * GetEntries() override
methods inherited from SaveInData
Definition: cfg.cxx:410
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:395
virtual bool HasURL(const OUString &aURL)=0
static const char ITEM_DESCRIPTOR_COMMANDURL[]
Definition: cfg.hxx:42
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:337
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:2274
SvxConfigEntry * GetSelectedEntry()
Definition: cfg.cxx:1837
void Reset() override
Definition: cfg.cxx:877
std::unique_ptr< weld::TreeView > m_xMenuListBox
Definition: cfg.hxx:496
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:378
bool bReadOnly
Definition: cfg.hxx:82
OUString GetSelectedDisplayName()
Definition: cfg.cxx:1308
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:393
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
Definition: cfg.hxx:597
static OUString GetFrameWithDefaultAndIdentify(css::uno::Reference< css::frame::XFrame > &_inout_rxFrame)
identifies the module in the given frame.
Definition: cfg.cxx:1242
bool HasURL(const OUString &) override
Definition: cfg.hxx:196
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
Definition: cfg.cxx:2800
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
Definition: cfg.hxx:602
bool IsSeparator() const
Definition: cfg.hxx:285
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
Definition: cfg.hxx:149
void CreateDropDown()
Definition: cfg.cxx:909
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:392
TriState
std::unique_ptr< weld::MenuButton > m_xGearBtn
Definition: cfg.hxx:389
OUString m_aMenuResourceURL
Definition: cfg.hxx:165
bool IsModified()
Definition: cfg.hxx:124
void insert(int pos, const OUString &rId)
Definition: cfg.hxx:342
sal_Int32 nPos
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:66
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: cfg.cxx:246
SaveInData * GetSaveInData()
Definition: cfg.hxx:452
MenuSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:373
sal_Int32 GetSystemStyle(const OUString &rResourceURL)
Definition: cfg.cxx:1913
virtual void SelectElement()=0
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:520
std::unique_ptr< weld::Button > m_xAddCommandButton
Definition: cfg.hxx:403
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
bool HasChangedName() const
Definition: cfg.hxx:277
SvxConfigEntry()
Definition: cfg.hxx:258