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/transfer.hxx>
23 #include <vcl/weld.hxx>
24 #include <svtools/valueset.hxx>
25 
26 #include <com/sun/star/container/XIndexContainer.hpp>
27 #include <com/sun/star/container/XNameAccess.hpp>
28 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
29 #include <com/sun/star/ui/XImageManager.hpp>
30 #include <com/sun/star/graphic/XGraphicProvider.hpp>
31 #include <com/sun/star/frame/XFrame.hpp>
32 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
33 
34 #include <sfx2/tabdlg.hxx>
35 #include <memory>
36 #include <vector>
37 
38 #include "cfgutil.hxx"
40 
41 #define notebookbarTabScope "notebookbarTabScope"
42 
43 static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
44 static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
45 static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
46 static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
47 static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
48 static const char ITEM_DESCRIPTOR_ISVISIBLE[] = "IsVisible";
49 static const char ITEM_DESCRIPTOR_RESOURCEURL[] = "ResourceURL";
50 static const char ITEM_DESCRIPTOR_UINAME[] = "UIName";
51 
52 static const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
53 static const char ITEM_TOOLBAR_URL[] = "private:resource/toolbar/";
54 
55 static const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_";
56 
57 static const char aMenuSeparatorStr[] = " | ";
58 
59 class SvxConfigEntry;
61 
62 typedef std::vector< SvxConfigEntry* > SvxEntries;
63 
65 {
66 private:
67  css::uno::Reference< css::frame::XFrame > m_xFrame;
68 
69 public:
71 
72  virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
73  void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
74 };
75 
77 {
78 private:
79 
80  bool bModified;
81 
82  bool bDocConfig;
83  bool bReadOnly;
84 
85  css::uno::Reference
86  < css::ui::XUIConfigurationManager > m_xCfgMgr;
87 
88  css::uno::Reference
89  < css::ui::XUIConfigurationManager > m_xParentCfgMgr;
90 
91  css::uno::Reference
92  < css::ui::XImageManager > m_xImgMgr;
93 
94  css::uno::Reference
95  < css::ui::XImageManager > m_xParentImgMgr;
96 
97  static css::uno::Reference
98  < css::ui::XImageManager >* xDefaultImgMgr;
99 
100 protected:
101 
102  void ApplyMenu(
103  css::uno::Reference< css::container::XIndexContainer > const & rMenuBar,
104  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
105  SvxConfigEntry *pMenuData );
106 
107  void LoadSubMenus(
108  const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
109  const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool bContextMenu );
110 
111 public:
112 
113  SaveInData(
114  const css::uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr,
115  const css::uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr,
116  const OUString& aModuleId,
117  bool docConfig );
118 
119  virtual ~SaveInData() {}
120 
121  bool PersistChanges(
122  const css::uno::Reference< css::uno::XInterface >& xManager );
123 
124  void SetModified( bool bValue = true ) { bModified = bValue; }
125  bool IsModified( ) const { return bModified; }
126 
127  bool IsReadOnly( ) const { return bReadOnly; }
128  bool IsDocConfig( ) const { return bDocConfig; }
129 
130  const css::uno::Reference
131  < css::ui::XUIConfigurationManager >&
132  GetConfigManager() const { return m_xCfgMgr; };
133 
134  const css::uno::Reference
135  < css::ui::XUIConfigurationManager >&
137 
138  const css::uno::Reference
139  < css::ui::XImageManager >&
140  GetImageManager() const { return m_xImgMgr; };
141 
142  const css::uno::Reference
143  < css::ui::XImageManager >&
145 
146  css::uno::Reference
147  < css::container::XNameAccess > m_xCommandToLabelMap;
148 
149  css::uno::Sequence
150  < css::beans::PropertyValue > m_aSeparatorSeq;
151 
152  css::uno::Reference<css::graphic::XGraphic> GetImage(const OUString& rCommandURL);
153 
154  virtual bool HasURL( const OUString& aURL ) = 0;
155  virtual bool HasSettings() = 0;
156  virtual SvxEntries* GetEntries() = 0;
157  virtual void SetEntries( std::unique_ptr<SvxEntries> ) = 0;
158  virtual void Reset() = 0;
159  virtual bool Apply() = 0;
160 };
161 
163 {
164 private:
165 
168 
169  css::uno::Reference
170  < css::container::XIndexAccess > m_xMenuSettings;
171 
172  std::unique_ptr<SvxConfigEntry> pRootEntry;
173 
174 
176 
177  static void SetDefaultData( MenuSaveInData* pData ) {pDefaultData = pData;}
179 
180  void Apply(
181  css::uno::Reference< css::container::XIndexContainer > const & rNewMenuBar,
182  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
183 
184 public:
185 
187  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
188  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
189  const OUString& aModuleId,
190  bool docConfig );
191 
192  virtual ~MenuSaveInData() override;
193 
195  SvxEntries* GetEntries() override;
196  void SetEntries( std::unique_ptr<SvxEntries> ) override;
197  bool HasURL( const OUString& ) override { return false; }
198  bool HasSettings() override { return m_xMenuSettings.is(); }
199  void Reset() override;
200  bool Apply() override;
201 };
202 
204 {
205 private:
206  std::unique_ptr< SvxConfigEntry > m_pRootEntry;
207  css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState;
208  OUString GetUIName( const OUString& rResourceURL );
209 
210 public:
212  const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
213  const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
214  const OUString& aModuleId, bool bIsDocConfig );
215  virtual ~ContextMenuSaveInData() override;
216 
217  SvxEntries* GetEntries() override;
218  void SetEntries( std::unique_ptr<SvxEntries> pNewEntries ) override;
219  bool HasSettings() override;
220  bool HasURL( const OUString& rURL ) override;
221  void Reset() override;
222  bool Apply() override;
223 
224  void ResetContextMenu( const SvxConfigEntry* pEntry );
225 };
226 
228 {
229 private:
230 
232  sal_uInt16 nId;
233  OUString aLabel;
234  OUString aCommand;
235 
236  bool bPopUp;
239  bool bIsMain;
242 
245  sal_Int32 nStyle;
246 
247  css::uno::Reference<
248  css::graphic::XGraphic > xBackupGraphic;
249 
250  std::unique_ptr<SvxEntries> mpEntries;
251 
252 public:
253 
254  SvxConfigEntry( const OUString& rDisplayName,
255  const OUString& rCommandURL,
256  bool bPopup,
257  bool bParentData );
258 
260  :
261  nId( 0 ),
262  bPopUp( false ),
263  bStrEdited( false ),
264  bIsUserDefined( false ),
265  bIsMain( false ),
266  bIsParentData( false ),
267  bIsModified( false ),
268  bIsVisible( true ),
269  nStyle( 0 )
270  {}
271 
272  ~SvxConfigEntry();
273 
274  const OUString& GetCommand() const { return aCommand; }
275 
276  const OUString& GetName() const { return aLabel; }
277  void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
278  bool HasChangedName() const { return bStrEdited; }
279 
280  bool IsPopup() const { return bPopUp; }
281 
282  void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
283  bool IsUserDefined() const { return bIsUserDefined; }
284 
285  bool IsBinding() const { return !bPopUp; }
286  bool IsSeparator() const { return nId == 0; }
287 
288  SvxEntries* GetEntries() const { return mpEntries.get(); }
289  void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
290 
291  void SetMain() { bIsMain = true; }
292  bool IsMain() const { return bIsMain; }
293 
294  void SetParentData( bool bValue = true ) { bIsParentData = bValue; }
295  bool IsParentData() const { return bIsParentData; }
296 
297  void SetModified( bool bValue = true ) { bIsModified = bValue; }
298  bool IsModified() const { return bIsModified; }
299 
300  bool IsMovable() const;
301  bool IsDeletable() const;
302  bool IsRenamable() const;
303 
304  void SetVisible( bool b ) { bIsVisible = b; }
305  bool IsVisible() const { return bIsVisible; }
306 
307  void SetBackupGraphic( css::uno::Reference< css::graphic::XGraphic > const & graphic )
308  { xBackupGraphic = graphic; }
309 
310  const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic() const
311  { return xBackupGraphic; }
312 
313  sal_Int32 GetStyle() const { return nStyle; }
314  void SetStyle( sal_Int32 style ) { nStyle = style; }
315 };
316 
318 {
319 protected:
320  std::unique_ptr<weld::TreeView> m_xControl;
323 
324 public:
325  SvxMenuEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPage);
326  virtual ~SvxMenuEntriesListBox();
327 
329 
330  int get_selected_index() const { return m_xControl->get_selected_index(); }
331  OUString get_id(int nPos) const { return m_xControl->get_id(nPos); }
332  void remove(int nPos) { m_xControl->remove(nPos); }
333  int n_children() const { return m_xControl->n_children(); }
334  void set_text(int row, const OUString& rText, int col) { m_xControl->set_text(row, rText, col); }
335  OUString get_text(int row) { return m_xControl->get_text(row); }
336  void set_image(int row, const css::uno::Reference<css::graphic::XGraphic>& rImage, int col) { m_xControl->set_image(row, rImage, col); }
337  void set_dropdown(int row, int col) { m_xControl->set_image(row, *m_xDropDown, col); }
338  void set_id(int row, const OUString& rId) { m_xControl->set_id(row, rId); }
339  void clear() { m_xControl->clear(); } //need frees ?
340  void set_toggle(int row, TriState eState, int col) { m_xControl->set_toggle(row, eState, col); }
341  void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); }
342  void select(int pos) { m_xControl->select(pos); }
343 
345 
346  void insert(int pos, const OUString& rId)
347  {
348  m_xControl->insert(nullptr, pos, nullptr, &rId,
349  nullptr, nullptr, nullptr, false, nullptr);
350  }
351 
352  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
353 
354  void CreateDropDown();
355 };
356 
358 {
359 private:
362 
363  virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
364  virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
365 
366 public:
368 };
369 
370 class SvxConfigPage : public SfxTabPage
371 {
372 private:
373 
377 
378  DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
379 
380 protected:
381 
383  OUString m_aURLToSelect;
384 
385  css::uno::Reference< css::frame::XFrame > m_xFrame;
386  OUString m_aModuleId;
387 
388  // Left side of the dialog where command categories and the available
389  // commands in them are displayed as a searchable list
390  std::unique_ptr<CommandCategoryListBox> m_xCommandCategoryListBox;
391  std::unique_ptr<CuiConfigFunctionListBox> m_xFunctions;
392 
393  std::unique_ptr<weld::Label> m_xCategoryLabel;
394  std::unique_ptr<weld::Label> m_xDescriptionFieldLb;
395  std::unique_ptr<weld::TextView> m_xDescriptionField;
396  std::unique_ptr<weld::Label> m_xLeftFunctionLabel;
397  std::unique_ptr<weld::Entry> m_xSearchEdit;
398  std::unique_ptr<weld::Label> m_xSearchLabel;
399 
400 
401  // Right side of the dialog where the contents of the selected
402  // menu or toolbar are displayed
403  std::unique_ptr<weld::Label> m_xCustomizeLabel;
404  std::unique_ptr<weld::ComboBox> m_xTopLevelListBox;
405  // Used to add and remove toolbars/menus
406  std::unique_ptr<weld::MenuButton> m_xGearBtn;
407  std::unique_ptr<SvxMenuEntriesListBox> m_xContentsListBox;
408  std::unique_ptr<SvxConfigPageFunctionDropTarget> m_xDropTargetHelper;
409 
410  std::unique_ptr<weld::Button> m_xMoveUpButton;
411  std::unique_ptr<weld::Button> m_xMoveDownButton;
412 
413  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
414 
415  std::unique_ptr<weld::MenuButton> m_xInsertBtn;
416  std::unique_ptr<weld::MenuButton> m_xModifyBtn;
417  // Used to reset the selected toolbar/menu/context menu
418  std::unique_ptr<weld::Button> m_xResetBtn;
419 
420  // Middle buttons
421  std::unique_ptr<weld::Button> m_xAddCommandButton;
422  std::unique_ptr<weld::Button> m_xRemoveCommandButton;
423 
424  OUString m_sAppName;
425  OUString m_sFileName;
426 
427  SvxConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
428 
429  DECL_LINK(MoveHdl, weld::Button&, void);
430  DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
431  DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
432  DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
433  DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
434  DECL_LINK(ImplUpdateDataHdl, Timer*, void);
435  DECL_LINK(FocusOut_Impl, weld::Widget&, void);
436 
437  virtual SaveInData* CreateSaveInData(
438  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
439  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
440  const OUString& aModuleId,
441  bool docConfig ) = 0;
442 
443  virtual void Init() = 0;
444  virtual void UpdateButtonStates() = 0;
445  virtual short QueryReset() = 0;
446 
447  virtual void SelectElement() = 0;
448 
449  int AppendEntry(SvxConfigEntry* pNewEntryData,
450  int nTarget);
451 
452  void AddSubMenusToUI( const OUString& rBaseTitle,
453  SvxConfigEntry const * pParentData );
454 
455  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
456  weld::TreeView& rTreeView, int nPos,
457  int nStartCol);
458  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
459  weld::TreeView& rTreeView, weld::TreeIter& rIter,
460  int nStartCol);
461 
462  void InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, const OUString& sUIItemId,
463  const OUString& sUIItemCommand,
464  weld::TreeView& rTreeView, weld::TreeIter& rIter,
465  int nStartCol);
466 
467  SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
468  SvxConfigEntry* pChildData );
469 
470  void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
471 
472 public:
473 
474  virtual ~SvxConfigPage() override;
475 
476  static bool CanConfig( const OUString& 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 reinterpret_cast<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id().toInt64());
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<SvtValueSet> 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, SvtValueSet*, 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 #endif // INCLUDED_CUI_SOURCE_INC_CFG_HXX
673 
674 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool bIsVisible
toolbar specific properties
Definition: cfg.hxx:244
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:49
bool bIsMain
Definition: cfg.hxx:239
OUString m_aDescriptorContainer
Definition: cfg.hxx:551
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:391
SvxEntries * GetEntries() const
Definition: cfg.hxx:288
bool IsModified() const
Definition: cfg.hxx:298
virtual short QueryReset()=0
static const char ITEM_DESCRIPTOR_TYPE[]
Definition: cfg.hxx:46
std::unique_ptr< weld::Entry > m_xEdtName
Definition: cfg.hxx:601
std::unique_ptr< weld::Button > m_xResetBtn
Definition: cfg.hxx:418
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:140
const OUString & GetName() const
Definition: cfg.hxx:276
std::unique_ptr< weld::Widget > m_xMenuBox
Definition: cfg.hxx:524
std::unique_ptr< weld::MenuButton > m_xModifyBtn
Definition: cfg.hxx:416
bool IsVisible() const
Definition: cfg.hxx:305
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:390
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
Definition: cfg.hxx:383
std::unique_ptr< SvxEntries > ReleaseEntries()
Definition: cfg.hxx:542
OUString aLabel
Definition: cfg.hxx:233
static const char ITEM_DESCRIPTOR_UINAME[]
Definition: cfg.hxx:50
virtual ~SvxMainMenuOrganizerDialog() override
Definition: cfg.cxx:1773
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:228
void SetModified(bool bValue=true)
Definition: cfg.hxx:297
SvxConfigPage & m_rPage
Definition: cfg.hxx:360
void Reset() override
Definition: cfg.cxx:662
static MenuSaveInData * GetDefaultData()
Definition: cfg.hxx:178
signed char sal_Int8
std::unique_ptr< SvxConfigPageFunctionDropTarget > m_xDropTargetHelper
Definition: cfg.hxx:408
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:82
void Reset(const SfxItemSet *) override
Definition: cfg.cxx:1025
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:385
std::unique_ptr< weld::Button > m_xBtnImport
Definition: cfg.hxx:637
static MenuSaveInData * pDefaultData
static holder of the default menu data
Definition: cfg.hxx:175
SvxConfigEntry * GetTopLevelSelection()
Definition: cfg.hxx:497
Timer m_aUpdateDataTimer
Definition: cfg.hxx:374
std::unique_ptr< weld::Button > m_xRemoveCommandButton
Definition: cfg.hxx:422
bool IsPopup() const
Definition: cfg.hxx:280
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:307
int get_selected_index() const
Definition: cfg.hxx:330
bool HasSettings() override
Definition: cfg.cxx:842
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetConfigManager() const
Definition: cfg.hxx:132
static void SetDefaultData(MenuSaveInData *pData)
Definition: cfg.hxx:177
css::uno::Reference< css::ui::XImageManager > m_xParentImageManager
Definition: cfg.hxx:624
virtual void MoveEntry(bool bMoveUp)
Definition: cfg.cxx:1628
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:324
static const char ITEM_DESCRIPTOR_ISVISIBLE[]
Definition: cfg.hxx:48
static const char CUSTOM_TOOLBAR_STR[]
Definition: cfg.hxx:55
std::unique_ptr< weld::Label > m_xCategoryLabel
Definition: cfg.hxx:393
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
Definition: cfg.cxx:3182
bool IsReadOnly() const
Definition: cfg.hxx:127
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
Definition: cfg.hxx:407
void AddSubMenusToUI(const OUString &rBaseTitle, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:1357
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:337
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
Definition: cfg.cxx:1323
OUString m_sFileName
Definition: cfg.hxx:425
std::unique_ptr< weld::Entry > m_xMenuNameEdit
Definition: cfg.hxx:525
OUString m_aDescriptorContainer
Definition: cfg.hxx:167
OUString get_text(int row)
Definition: cfg.hxx:335
static const char aMenuSeparatorStr[]
Definition: cfg.hxx:57
std::vector< SvxConfigEntry * > SvxEntries
Definition: cfg.hxx:60
void set_text(int row, const OUString &rText, int col)
Definition: cfg.hxx:334
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:832
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
Definition: cfg.hxx:404
bool IsRenamable() const
Definition: cfg.cxx:1886
const OUString & GetCommand() const
Definition: cfg.hxx:274
std::unique_ptr< weld::CustomWeld > m_xTbSymbolWin
Definition: cfg.hxx:635
sal_Int32 nStyle
Definition: cfg.hxx:245
virtual void ListModified()
Definition: cfg.hxx:495
css::uno::Reference< css::graphic::XGraphic > xBackupGraphic
Definition: cfg.hxx:248
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: cfg.cxx:3189
bool FillItemSet(SfxItemSet *) override
Definition: cfg.cxx:1303
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:238
bool IsBinding() const
Definition: cfg.hxx:285
void select(int pos)
Definition: cfg.hxx:342
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
Definition: cfg.hxx:394
virtual SvxEntries * GetEntries()=0
OUString get_id(int nPos) const
Definition: cfg.hxx:331
SvxEntries * GetEntries() override
Definition: cfg.cxx:2100
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:320
css::uno::Reference< css::ui::XImageManager > m_xImgMgr
Definition: cfg.hxx:92
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
bool IsModified() const
Definition: cfg.hxx:125
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:277
void SetMain()
Definition: cfg.hxx:291
static bool CanConfig(const OUString &rModuleId)
Definition: cfg.cxx:159
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:527
bool IsParentData() const
Definition: cfg.hxx:295
css::uno::Reference< css::ui::XUIConfigurationManager > m_xCfgMgr
Definition: cfg.hxx:86
OUString aCommand
Definition: cfg.hxx:234
int AppendEntry(SvxConfigEntry *pNewEntryData, int nTarget)
Definition: cfg.cxx:1445
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:172
DECL_LINK(SearchUpdateHdl, weld::Entry &, void)
static css::uno::Reference< css::ui::XImageManager > * xDefaultImgMgr
Definition: cfg.hxx:98
OUString GetUIName(const OUString &rResourceURL)
Definition: cfg.cxx:701
bool HasSettings() override
Definition: cfg.hxx:198
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetParentConfigManager() const
Definition: cfg.hxx:136
bool Apply() override
Definition: cfg.cxx:548
bool bModified
Definition: cfg.hxx:80
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:289
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:2280
virtual bool Apply()=0
void SetParentData(bool bValue=true)
Definition: cfg.hxx:294
const css::uno::Reference< css::graphic::XGraphic > & GetBackupGraphic() const
Definition: cfg.hxx:310
css::uno::Reference< css::container::XIndexAccess > m_xMenuSettings
Definition: cfg.hxx:170
void SetSystemStyle(const OUString &rResourceURL, sal_Int32 nStyle)
Definition: cfg.cxx:2001
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:144
static const char ITEM_DESCRIPTOR_STYLE[]
Definition: cfg.hxx:47
std::unique_ptr< SvxConfigEntry > m_pRootEntry
Definition: cfg.hxx:206
void SetUserDefined(bool bOn=true)
Definition: cfg.hxx:282
static const char ITEM_DESCRIPTOR_LABEL[]
Definition: cfg.hxx:45
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
Definition: cfg.cxx:1704
weld::TreeView & get_widget()
Definition: cfg.hxx:344
bool bIsParentData
Definition: cfg.hxx:240
bool bInitialised
Definition: cfg.hxx:375
virtual ~ContextMenuSaveInData() override
Definition: cfg.cxx:697
const OUString & GetAppName() const
Definition: cfg.hxx:479
sal_uInt16 nId
common properties
Definition: cfg.hxx:232
virtual ~ToolbarSaveInData() override
Definition: cfg.cxx:1909
virtual ~SvxIconSelectorDialog() override
Definition: cfg.cxx:2796
virtual ~SvxNewToolbarDialog() override
Definition: cfg.cxx:2630
std::unique_ptr< weld::Label > m_xSearchLabel
Definition: cfg.hxx:398
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:207
void set_toggle(int row, TriState eState, int col)
Definition: cfg.hxx:340
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:604
css::uno::Reference< css::ui::XImageManager > m_xParentImgMgr
Definition: cfg.hxx:95
void SetVisible(bool b)
Definition: cfg.hxx:304
void SetStyle(sal_Int32 style)
Definition: cfg.hxx:314
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:53
OUString GetScriptURL() const
Definition: cfg.cxx:1280
sal_Int32 m_nExpectedSize
Definition: cfg.hxx:618
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
Definition: cfg.cxx:337
virtual ~SaveInData()
Definition: cfg.hxx:119
virtual void DeleteSelectedContent()=0
void InsertEntryIntoNotebookbarTabUI(const OUString &sClassId, const OUString &sUIItemId, const OUString &sUIItemCommand, weld::TreeView &rTreeView, weld::TreeIter &rIter, int nStartCol)
bool IsMovable() const
Definition: cfg.cxx:1876
VirtualDevice & get_dropdown_image() const
Definition: cfg.hxx:328
bool bStrEdited
Definition: cfg.hxx:237
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:602
std::unique_ptr< SvtValueSet > m_xTbSymbol
Definition: cfg.hxx:634
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
Definition: cfg.hxx:89
virtual ~MenuSaveInData() override
Definition: cfg.cxx:405
virtual ~SvxMenuEntriesListBox()
Definition: cfg.cxx:936
ScopedVclPtr< VirtualDevice > m_xDropDown
Definition: cfg.hxx:321
static const char ITEM_MENUBAR_URL[]
Definition: cfg.hxx:52
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:269
bool ImportGraphic(const OUString &aURL)
Definition: cfg.cxx:3094
OUString GetSelectedDisplayName() const
Definition: cfg.cxx:1298
std::unique_ptr< weld::MenuButton > m_xInsertBtn
Definition: cfg.hxx:415
std::unique_ptr< weld::Entry > m_xSearchEdit
Definition: cfg.hxx:397
OUString m_sNewMenuEntryId
Definition: cfg.hxx:522
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:250
DECL_LINK(SelectHdl, SvtValueSet *, void)
sal_Int32 GetStyle() const
Definition: cfg.hxx:313
bool IsUserDefined() const
Definition: cfg.hxx:283
SaveInData * pCurrentSaveInData
Definition: cfg.hxx:376
virtual ~SvxConfigPage() override
Definition: cfg.cxx:1021
void Reset() override
Definition: cfg.cxx:2298
const css::uno::Reference< css::ui::XImageManager > & GetParentImageManager() const
Definition: cfg.hxx:144
void RestoreToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2480
static const char ITEM_DESCRIPTOR_CONTAINER[]
Definition: cfg.hxx:44
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:521
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:621
virtual void UpdateButtonStates()=0
bool Apply() override
Definition: cfg.cxx:847
DECL_LINK(MoveHdl, weld::Button &, void)
bool IsMain() const
Definition: cfg.hxx:292
void set_id(int row, const OUString &rId)
Definition: cfg.hxx:338
void SetModified(bool bValue=true)
Definition: cfg.hxx:124
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:403
int AddFunction(int nTarget, bool bAllowDuplicates)
Definition: cfg.cxx:1398
~SvxConfigEntry()
Definition: cfg.cxx:1865
void SetEntries(std::unique_ptr< SvxEntries > pNewEntries) override
Definition: cfg.cxx:827
bool bPopUp
Definition: cfg.hxx:236
virtual bool HasSettings()=0
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
Definition: cfg.cxx:3166
int n_children() const
Definition: cfg.hxx:333
bool HasSettings() override
Definition: cfg.cxx:2292
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
Definition: cfg.hxx:396
bool IsDeletable() const
Definition: cfg.cxx:1881
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
SvxConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &)
Definition: cfg.cxx:972
bool bIsModified
Definition: cfg.hxx:241
void set_image(int row, const css::uno::Reference< css::graphic::XGraphic > &rImage, int col)
Definition: cfg.hxx:336
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:638
SvxEntries * GetEntries() override
Definition: cfg.cxx:726
SvxConfigPageFunctionDropTarget(SvxConfigPage &rPage, weld::TreeView &rTreeView)
Definition: cfg.cxx:3175
void InsertEntryIntoUI(SvxConfigEntry *pNewEntryData, weld::TreeView &rTreeView, int nPos, int nStartCol)
Definition: cfg.cxx:1540
SvxEntries * GetEntries() override
methods inherited from SaveInData
Definition: cfg.cxx:410
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:413
virtual bool HasURL(const OUString &aURL)=0
static const char ITEM_DESCRIPTOR_COMMANDURL[]
Definition: cfg.hxx:43
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:341
SvxConfigPage * m_pPage
Definition: cfg.hxx:322
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:526
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:395
bool bReadOnly
Definition: cfg.hxx:83
weld::TreeView & m_rTreeView
Definition: cfg.hxx:361
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:411
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:1242
bool HasURL(const OUString &) override
Definition: cfg.hxx:197
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
Definition: cfg.cxx:2800
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
Definition: cfg.hxx:632
bool IsSeparator() const
Definition: cfg.hxx:286
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
Definition: cfg.hxx:150
void CreateDropDown()
Definition: cfg.cxx:909
bool IsDocConfig() const
Definition: cfg.hxx:128
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:410
OUString m_aModuleId
Definition: cfg.hxx:386
TriState
std::unique_ptr< weld::MenuButton > m_xGearBtn
Definition: cfg.hxx:406
OUString m_aMenuResourceURL
Definition: cfg.hxx:166
void insert(int pos, const OUString &rId)
Definition: cfg.hxx:346
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:67
OUString m_sAppName
Definition: cfg.hxx:424
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: cfg.cxx:246
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:373
sal_uInt16 nPos
sal_Int32 GetSystemStyle(const OUString &rResourceURL)
Definition: cfg.cxx:1913
virtual void SelectElement()=0
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:550
std::unique_ptr< weld::Button > m_xAddCommandButton
Definition: cfg.hxx:421
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
bool HasChangedName() const
Definition: cfg.hxx:278
SvxConfigEntry()
Definition: cfg.hxx:259