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