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 char16_t ITEM_TOOLBAR_URL[] = u"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  void clear() { m_xControl->clear(); } //need frees ?
337  void set_toggle(int row, TriState eState) { m_xControl->set_toggle(row, eState); }
338  void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); }
339  void select(int pos) { m_xControl->select(pos); }
340 
342 
343  void insert(int pos, const OUString& rId)
344  {
345  m_xControl->insert(nullptr, pos, nullptr, &rId,
346  nullptr, nullptr, false, nullptr);
347  }
348 
349  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
350 
351  void CreateDropDown();
352 };
353 
355 {
356 private:
359 
360  virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
361  virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
362 
363 public:
365 };
366 
367 class SvxConfigPage : public SfxTabPage
368 {
369 private:
370 
374 
375  DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
376 
377 protected:
378 
380  OUString m_aURLToSelect;
381 
382  css::uno::Reference< css::frame::XFrame > m_xFrame;
383  OUString m_aModuleId;
384 
385  // Left side of the dialog where command categories and the available
386  // commands in them are displayed as a searchable list
387  std::unique_ptr<CommandCategoryListBox> m_xCommandCategoryListBox;
388  std::unique_ptr<CuiConfigFunctionListBox> m_xFunctions;
389 
390  std::unique_ptr<weld::Label> m_xCategoryLabel;
391  std::unique_ptr<weld::Label> m_xDescriptionFieldLb;
392  std::unique_ptr<weld::TextView> m_xDescriptionField;
393  std::unique_ptr<weld::Label> m_xLeftFunctionLabel;
394  std::unique_ptr<weld::Entry> m_xSearchEdit;
395  std::unique_ptr<weld::Label> m_xSearchLabel;
396 
397 
398  // Right side of the dialog where the contents of the selected
399  // menu or toolbar are displayed
400  std::unique_ptr<weld::Label> m_xCustomizeLabel;
401  std::unique_ptr<weld::ComboBox> m_xTopLevelListBox;
402  // Used to add and remove toolbars/menus
403  std::unique_ptr<weld::MenuButton> m_xGearBtn;
404  std::unique_ptr<SvxMenuEntriesListBox> m_xContentsListBox;
405  std::unique_ptr<SvxConfigPageFunctionDropTarget> m_xDropTargetHelper;
406 
407  std::unique_ptr<weld::Button> m_xMoveUpButton;
408  std::unique_ptr<weld::Button> m_xMoveDownButton;
409 
410  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
411 
412  std::unique_ptr<weld::MenuButton> m_xInsertBtn;
413  std::unique_ptr<weld::MenuButton> m_xModifyBtn;
414  // Used to reset the selected toolbar/menu/context menu
415  std::unique_ptr<weld::Button> m_xResetBtn;
416 
417  // Middle buttons
418  std::unique_ptr<weld::Button> m_xAddCommandButton;
419  std::unique_ptr<weld::Button> m_xRemoveCommandButton;
420 
421  OUString m_sAppName;
422  OUString m_sFileName;
423 
424  SvxConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
425 
426  DECL_LINK(MoveHdl, weld::Button&, void);
427  DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
428  DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
429  DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
430  DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
431  DECL_LINK(ImplUpdateDataHdl, Timer*, void);
432  DECL_LINK(FocusOut_Impl, weld::Widget&, void);
433 
434  virtual SaveInData* CreateSaveInData(
435  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
436  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
437  const OUString& aModuleId,
438  bool docConfig ) = 0;
439 
440  virtual void Init() = 0;
441  virtual void UpdateButtonStates() = 0;
442  virtual short QueryReset() = 0;
443 
444  virtual void SelectElement() = 0;
445 
446  int AppendEntry(SvxConfigEntry* pNewEntryData,
447  int nTarget);
448 
449  void AddSubMenusToUI( const OUString& rBaseTitle,
450  SvxConfigEntry const * pParentData );
451 
452  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
453  weld::TreeView& rTreeView, int nPos,
454  bool bMenu = false);
455  void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
456  weld::TreeView& rTreeView, weld::TreeIter& rIter,
457  bool bMenu = false);
458 
459  void InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, const OUString& sUIItemId,
460  const OUString& sUIItemCommand,
461  weld::TreeView& rTreeView, weld::TreeIter& rIter);
462 
463  SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
464  SvxConfigEntry* pChildData );
465 
466  void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
467 
468 public:
469 
470  virtual ~SvxConfigPage() override;
471 
472  static bool CanConfig( const OUString& rModuleId );
473 
475  const OUString& GetAppName() const { return m_sAppName; }
476  const OUString& GetFileName() const { return m_sFileName; }
477 
478  int AddFunction(int nTarget,
479  bool bAllowDuplicates);
480 
481  virtual void MoveEntry( bool bMoveUp );
482 
483  bool MoveEntryData(int SourceEntry, int nTargetEntry);
484 
485  bool FillItemSet( SfxItemSet* ) override;
486  void Reset( const SfxItemSet* ) override;
487 
488  virtual void DeleteSelectedContent() = 0;
489  virtual void DeleteSelectedTopLevel() = 0;
490 
491  virtual void ListModified() {}
492 
494  {
495  return reinterpret_cast<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id().toInt64());
496  }
497 
508  static OUString
509  GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
510 
511  OUString GetScriptURL() const;
512  OUString GetSelectedDisplayName() const;
513 };
514 
516 {
517  std::unique_ptr<SvxEntries> mpEntries;
519 
520  std::unique_ptr<weld::Widget> m_xMenuBox;
521  std::unique_ptr<weld::Entry> m_xMenuNameEdit;
522  std::unique_ptr<weld::TreeView> m_xMenuListBox;
523  std::unique_ptr<weld::Button> m_xMoveUpButton;
524  std::unique_ptr<weld::Button> m_xMoveDownButton;
525 
526  void UpdateButtonStates();
527 
528  DECL_LINK(MoveHdl, weld::Button&, void);
529  DECL_LINK(ModifyHdl, weld::Entry&, void);
530  DECL_LINK(SelectHdl, weld::TreeView&, void);
531 
532 public:
535  SvxConfigEntry const *, bool bCreateMenu);
536  virtual ~SvxMainMenuOrganizerDialog() override;
537 
538  std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
540 };
541 
543 {
544 private:
545 
546  std::unique_ptr<SvxConfigEntry> pRootEntry;
548 
549  css::uno::Reference
550  < css::container::XNameAccess > m_xPersistentWindowState;
551 
552  void LoadToolbar(
553  const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
554  SvxConfigEntry const * pParentData );
555 
556  void ApplyToolbar(
557  css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
558  css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
559  SvxConfigEntry const *pToolbar );
560 
561 public:
562 
564  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
565  const css::uno::Reference< css::ui::XUIConfigurationManager >&,
566  const OUString& aModuleId,
567  bool docConfig );
568 
569  virtual ~ToolbarSaveInData() override;
570 
571  void CreateToolbar( SvxConfigEntry* pToolbar );
572  void RestoreToolbar( SvxConfigEntry* pToolbar );
573  void RemoveToolbar( SvxConfigEntry* pToolbar );
574  void ApplyToolbar( SvxConfigEntry* pToolbar );
575 
576  OUString GetSystemUIName( const OUString& rResourceURL );
577 
578  sal_Int32 GetSystemStyle( const OUString& rResourceURL );
579 
580  void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
581 
582  void SetSystemStyle(
583  const css::uno::Reference< css::frame::XFrame >& xFrame,
584  const OUString& rResourceURL, sal_Int32 nStyle );
585 
586  SvxEntries* GetEntries() override;
587  void SetEntries( std::unique_ptr<SvxEntries> ) override;
588  bool HasSettings() override;
589  bool HasURL( const OUString& rURL ) override;
590  void Reset() override;
591  bool Apply() override;
592 };
593 
595 {
596 private:
597  std::unique_ptr<weld::Entry> m_xEdtName;
598  std::unique_ptr<weld::Button> m_xBtnOK;
599 public:
600  std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
601 
602  SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
603  virtual ~SvxNewToolbarDialog() override;
604 
605  OUString GetName() const
606  {
607  return m_xEdtName->get_text();
608  }
609 };
610 
612 {
613 private:
614  sal_Int32 m_nExpectedSize;
615 
616  css::uno::Reference<
617  css::ui::XImageManager > m_xImageManager;
618 
619  css::uno::Reference<
620  css::ui::XImageManager > m_xParentImageManager;
621 
622  css::uno::Reference<
623  css::ui::XImageManager > m_xImportedImageManager;
624 
625  css::uno::Reference<
626  css::graphic::XGraphicProvider > m_xGraphProvider;
627 
628  std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
629 
630  std::unique_ptr<ValueSet> m_xTbSymbol;
631  std::unique_ptr<weld::CustomWeld> m_xTbSymbolWin;
632  std::unique_ptr<weld::Label> m_xFtNote;
633  std::unique_ptr<weld::Button> m_xBtnImport;
634  std::unique_ptr<weld::Button> m_xBtnDelete;
635 
636  bool ReplaceGraphicItem( const OUString& aURL );
637 
638  bool ImportGraphic( const OUString& aURL );
639 
640  void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
641 
642 public:
643 
645  weld::Window *pWindow,
646  const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
647  const css::uno::Reference< css::ui::XImageManager >& rXParentImageManager);
648 
649  virtual ~SvxIconSelectorDialog() override;
650 
651  css::uno::Reference< css::graphic::XGraphic >
652  GetSelectedIcon();
653 
654  DECL_LINK(SelectHdl, ValueSet*, void);
655  DECL_LINK(ImportHdl, weld::Button&, void);
656  DECL_LINK(DeleteHdl, weld::Button&, void);
657 };
658 
659 //added for issue83555
661 {
662 private:
663  std::unique_ptr<weld::TextView> m_xLineEditDescription;
664 public:
665  SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
666 };
667 
668 /* 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:547
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:388
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:597
std::unique_ptr< weld::Button > m_xResetBtn
Definition: cfg.hxx:415
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:524
const OUString & GetFileName() const
Definition: cfg.hxx:476
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:520
std::unique_ptr< weld::MenuButton > m_xModifyBtn
Definition: cfg.hxx:413
bool IsVisible() const
Definition: cfg.hxx:306
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:387
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
Definition: cfg.hxx:380
std::unique_ptr< SvxEntries > ReleaseEntries()
Definition: cfg.hxx:538
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:550
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:357
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:405
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:382
std::unique_ptr< weld::Button > m_xBtnImport
Definition: cfg.hxx:633
static MenuSaveInData * pDefaultData
static holder of the default menu data
Definition: cfg.hxx:176
SvxConfigEntry * GetTopLevelSelection()
Definition: cfg.hxx:493
Timer m_aUpdateDataTimer
Definition: cfg.hxx:371
std::unique_ptr< weld::Button > m_xRemoveCommandButton
Definition: cfg.hxx:419
bool IsPopup() const
Definition: cfg.hxx:281
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
Definition: cfg.hxx:626
void SetBackupGraphic(css::uno::Reference< css::graphic::XGraphic > const &graphic)
Definition: cfg.hxx:308
int get_selected_index() const
Definition: cfg.hxx:331
const char16_t ITEM_TOOLBAR_URL[]
Definition: cfg.hxx:54
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:620
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:390
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:404
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 ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
Definition: cfg.cxx:1323
OUString m_sFileName
Definition: cfg.hxx:422
std::unique_ptr< weld::Entry > m_xMenuNameEdit
Definition: cfg.hxx:521
OUString m_aDescriptorContainer
Definition: cfg.hxx:168
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:401
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:631
sal_Int32 nStyle
Definition: cfg.hxx:246
virtual void ListModified()
Definition: cfg.hxx:491
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:339
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
Definition: cfg.hxx:391
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:605
std::unique_ptr< weld::Label > m_xFtNote
Definition: cfg.hxx:632
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:523
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:337
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:341
bool bIsParentData
Definition: cfg.hxx:241
bool bInitialised
Definition: cfg.hxx:372
virtual ~ContextMenuSaveInData() override
Definition: cfg.cxx:694
const OUString & GetAppName() const
Definition: cfg.hxx:475
std::unique_ptr< ValueSet > m_xTbSymbol
Definition: cfg.hxx:630
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:395
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:208
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:600
float u
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
OUString GetScriptURL() const
Definition: cfg.cxx:1276
sal_Int32 m_nExpectedSize
Definition: cfg.hxx:614
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:598
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:663
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:412
std::unique_ptr< weld::Entry > m_xSearchEdit
Definition: cfg.hxx:394
OUString m_sNewMenuEntryId
Definition: cfg.hxx:518
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:373
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:517
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:617
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 SetModified(bool bValue=true)
Definition: cfg.hxx:125
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:400
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:393
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 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:634
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:410
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:338
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:522
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:392
bool bReadOnly
Definition: cfg.hxx:84
weld::TreeView & m_rTreeView
Definition: cfg.hxx:358
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:408
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
Definition: cfg.hxx:623
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:628
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:407
OUString m_aModuleId
Definition: cfg.hxx:383
TriState
std::unique_ptr< weld::MenuButton > m_xGearBtn
Definition: cfg.hxx:403
OUString m_aMenuResourceURL
Definition: cfg.hxx:167
void insert(int pos, const OUString &rId)
Definition: cfg.hxx:343
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:68
OUString m_sAppName
Definition: cfg.hxx:421
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: cfg.cxx:244
SaveInData * GetSaveInData()
Definition: cfg.hxx:474
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:546
std::unique_ptr< weld::Button > m_xAddCommandButton
Definition: cfg.hxx:418
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
bool HasChangedName() const
Definition: cfg.hxx:279
SvxConfigEntry()
Definition: cfg.hxx:260