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/timer.hxx>
23#include <vcl/weld.hxx>
24#include <vcl/weldutils.hxx>
25#include <svtools/valueset.hxx>
26
27#include <com/sun/star/container/XIndexContainer.hpp>
28#include <com/sun/star/container/XNameAccess.hpp>
29#include <com/sun/star/ui/XUIConfigurationManager.hpp>
30#include <com/sun/star/ui/XImageManager.hpp>
31#include <com/sun/star/graphic/XGraphicProvider.hpp>
32#include <com/sun/star/frame/XFrame.hpp>
33#include <com/sun/star/lang/XSingleComponentFactory.hpp>
34
35#include <sfx2/tabdlg.hxx>
36#include <memory>
37#include <string_view>
38#include <vector>
39
40#include "cfgutil.hxx"
42
43inline constexpr OUStringLiteral notebookbarTabScope = u"notebookbarTabScope";
44
45inline constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
46inline constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
47inline constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
48inline constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
49inline constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
50inline constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE = u"IsVisible";
51inline constexpr OUStringLiteral ITEM_DESCRIPTOR_RESOURCEURL = u"ResourceURL";
52inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
53
54inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
55inline constexpr OUStringLiteral ITEM_TOOLBAR_URL = u"private:resource/toolbar/";
56inline constexpr OUStringLiteral ITEM_EVENT_URL = u"private:resource/event/";
57
58inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
59
60inline constexpr OUStringLiteral aMenuSeparatorStr = u" | ";
61
62class SvxConfigEntry;
63class SvxConfigPage;
64
65typedef std::vector< SvxConfigEntry* > SvxEntries;
66
68{
69private:
70 css::uno::Reference< css::frame::XFrame > m_xFrame;
71
72 virtual void ActivatePage(const OString& rPage) override;
73
74public:
76
77 virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
78 void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
79};
80
82{
83private:
84
86
89
90 css::uno::Reference
91 < css::ui::XUIConfigurationManager > m_xCfgMgr;
92
93 css::uno::Reference
94 < css::ui::XUIConfigurationManager > m_xParentCfgMgr;
95
96 css::uno::Reference
97 < css::ui::XImageManager > m_xImgMgr;
98
99 css::uno::Reference
100 < css::ui::XImageManager > m_xParentImgMgr;
101
102 static css::uno::Reference
103 < css::ui::XImageManager >* xDefaultImgMgr;
104
105protected:
106
107 void ApplyMenu(
108 css::uno::Reference< css::container::XIndexContainer > const & rMenuBar,
109 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
110 SvxConfigEntry *pMenuData );
111
112 void LoadSubMenus(
113 const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
114 const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool bContextMenu );
115
116public:
117
119 css::uno::Reference < css::ui::XUIConfigurationManager > xCfgMgr,
120 css::uno::Reference < css::ui::XUIConfigurationManager > xParentCfgMgr,
121 const OUString& aModuleId,
122 bool docConfig );
123
124 virtual ~SaveInData() {}
125
126 bool PersistChanges(
127 const css::uno::Reference< css::uno::XInterface >& xManager );
128
129 void SetModified( bool bValue = true ) { bModified = bValue; }
130 bool IsModified( ) const { return bModified; }
131
132 bool IsReadOnly( ) const { return bReadOnly; }
133 bool IsDocConfig( ) const { return bDocConfig; }
134
135 const css::uno::Reference
136 < css::ui::XUIConfigurationManager >&
137 GetConfigManager() const { return m_xCfgMgr; };
138
139 const css::uno::Reference
140 < css::ui::XUIConfigurationManager >&
142
143 const css::uno::Reference
144 < css::ui::XImageManager >&
145 GetImageManager() const { return m_xImgMgr; };
146
147 const css::uno::Reference
148 < css::ui::XImageManager >&
150
151 css::uno::Reference
152 < css::container::XNameAccess > m_xCommandToLabelMap;
153
154 css::uno::Sequence
155 < css::beans::PropertyValue > m_aSeparatorSeq;
156
157 css::uno::Reference<css::graphic::XGraphic> GetImage(const OUString& rCommandURL);
158
159 virtual bool HasURL( const OUString& aURL ) = 0;
160 virtual bool HasSettings() = 0;
161 virtual SvxEntries* GetEntries() = 0;
162 virtual void SetEntries( std::unique_ptr<SvxEntries> ) = 0;
163 virtual void Reset() = 0;
164 virtual bool Apply() = 0;
165};
166
168{
169private:
170
173
174 css::uno::Reference
175 < css::container::XIndexAccess > m_xMenuSettings;
176
177 std::unique_ptr<SvxConfigEntry> pRootEntry;
178
179
181
184
185 void Apply(
186 css::uno::Reference< css::container::XIndexContainer > const & rNewMenuBar,
187 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
188
189public:
190
192 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
193 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
194 const OUString& aModuleId,
195 bool docConfig );
196
197 virtual ~MenuSaveInData() override;
198
200 SvxEntries* GetEntries() override;
201 void SetEntries( std::unique_ptr<SvxEntries> ) override;
202 bool HasURL( const OUString& ) override { return false; }
203 bool HasSettings() override { return m_xMenuSettings.is(); }
204 void Reset() override;
205 bool Apply() override;
206};
207
209{
210private:
211 std::unique_ptr< SvxConfigEntry > m_pRootEntry;
212 css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState;
213 OUString GetUIName( const OUString& rResourceURL );
214
215public:
217 const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
218 const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
219 const OUString& aModuleId, bool bIsDocConfig );
220 virtual ~ContextMenuSaveInData() override;
221
222 SvxEntries* GetEntries() override;
223 void SetEntries( std::unique_ptr<SvxEntries> pNewEntries ) override;
224 bool HasSettings() override;
225 bool HasURL( const OUString& rURL ) override;
226 void Reset() override;
227 bool Apply() override;
228
229 void ResetContextMenu( const SvxConfigEntry* pEntry );
230};
231
233{
234private:
235
237 sal_uInt16 nId;
238 OUString aLabel;
239 OUString aCommand;
240
241 bool bPopUp;
247
250 sal_Int32 nStyle;
251
252 css::uno::Reference<
253 css::graphic::XGraphic > xBackupGraphic;
254
255 std::unique_ptr<SvxEntries> mpEntries;
256
257public:
258
259 SvxConfigEntry( OUString aDisplayName,
260 OUString aCommandURL,
261 bool bPopup,
262 bool bParentData );
263
265 :
266 nId( 0 ),
267 bPopUp( false ),
268 bStrEdited( false ),
269 bIsUserDefined( false ),
270 bIsMain( false ),
271 bIsParentData( false ),
272 bIsModified( false ),
273 bIsVisible( true ),
274 nStyle( 0 )
275 {}
276
278
279 const OUString& GetCommand() const { return aCommand; }
280
281 const OUString& GetName() const { return aLabel; }
282 void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
283 bool HasChangedName() const { return bStrEdited; }
284
285 bool IsPopup() const { return bPopUp; }
286
287 void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
288 bool IsUserDefined() const { return bIsUserDefined; }
289
290 bool IsBinding() const { return !bPopUp; }
291 bool IsSeparator() const { return nId == 0; }
292
293 SvxEntries* GetEntries() const { return mpEntries.get(); }
294 void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
295
296 void SetMain() { bIsMain = true; }
297 bool IsMain() const { return bIsMain; }
298
299 void SetParentData( bool bValue = true ) { bIsParentData = bValue; }
300 bool IsParentData() const { return bIsParentData; }
301
302 void SetModified( bool bValue = true ) { bIsModified = bValue; }
303 bool IsModified() const { return bIsModified; }
304
305 bool IsMovable() const;
306 bool IsDeletable() const;
307 bool IsRenamable() const;
308
309 void SetVisible( bool b ) { bIsVisible = b; }
310 bool IsVisible() const { return bIsVisible; }
311
312 void SetBackupGraphic( css::uno::Reference< css::graphic::XGraphic > const & graphic )
314
315 const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic() const
316 { return xBackupGraphic; }
317
318 sal_Int32 GetStyle() const { return nStyle; }
319 void SetStyle( sal_Int32 style ) { nStyle = style; }
320};
321
323{
324protected:
325 std::unique_ptr<weld::TreeView> m_xControl;
328
329public:
330 SvxMenuEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPage);
331 virtual ~SvxMenuEntriesListBox();
332
334
335 int get_selected_index() const { return m_xControl->get_selected_index(); }
336 OUString get_id(int nPos) const { return m_xControl->get_id(nPos); }
337 void remove(int nPos) { m_xControl->remove(nPos); }
338 int n_children() const { return m_xControl->n_children(); }
339 void set_text(int row, const OUString& rText, int col) { m_xControl->set_text(row, rText, col); }
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 DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
355
356 void CreateDropDown();
357};
358
360{
361private:
363
364 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
365
366public:
368};
369
371{
372private:
373
377
378 DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
379
380protected:
381
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::Widget> m_xCustomizeBox;
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::Widget> m_xCommandButtons;
423 std::unique_ptr<weld::Button> m_xAddCommandButton;
424 std::unique_ptr<weld::Button> m_xRemoveCommandButton;
425
426 OUString m_sAppName;
427 OUString m_sFileName;
428
430
431 DECL_LINK(MoveHdl, weld::Button&, void);
432 DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
433 DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
434 DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
435 DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
436 DECL_LINK(ImplUpdateDataHdl, Timer*, void);
437 DECL_LINK(FocusOut_Impl, weld::Widget&, void);
438
440 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
441 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
442 const OUString& aModuleId,
443 bool docConfig ) = 0;
444
445 virtual void Init() = 0;
446 virtual void UpdateButtonStates() = 0;
447 virtual short QueryReset() = 0;
448
449 virtual void SelectElement() = 0;
450
451 int AppendEntry(SvxConfigEntry* pNewEntryData,
452 int nTarget);
453
454 void AddSubMenusToUI( std::u16string_view rBaseTitle,
455 SvxConfigEntry const * pParentData );
456
457 void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
458 weld::TreeView& rTreeView, int nPos,
459 bool bMenu = false);
460 void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
461 weld::TreeView& rTreeView, weld::TreeIter& rIter,
462 bool bMenu = false);
463
464 void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString& sUIItemId,
465 const OUString& sUIItemCommand,
466 weld::TreeView& rTreeView, const weld::TreeIter& rIter);
467
468 SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
469 SvxConfigEntry* pChildData );
470
471 void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
472
473 static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData,
474 const SvxEntries *pEntries);
475
476 SvxConfigEntry *CreateCommandFromSelection(const OUString &aURL);
477
478public:
479
480 virtual ~SvxConfigPage() override;
481
482 static bool CanConfig( std::u16string_view rModuleId );
483
485 const OUString& GetAppName() const { return m_sAppName; }
486 const OUString& GetFileName() const { return m_sFileName; }
487
488 int AddFunction(int nTarget,
489 bool bAllowDuplicates);
490
491 virtual void MoveEntry( bool bMoveUp );
492
493 bool MoveEntryData(int SourceEntry, int nTargetEntry);
494
495 bool FillItemSet( SfxItemSet* ) override;
496 void Reset( const SfxItemSet* ) override;
497
498 virtual void DeleteSelectedContent() = 0;
499 virtual void DeleteSelectedTopLevel() = 0;
500
501 virtual void ListModified() {}
502
504 {
505 return weld::fromId<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id());
506 }
507
518 static OUString
519 GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
520
521 OUString GetScriptURL() const;
522 OUString GetSelectedDisplayName() const;
523};
524
526{
527 std::unique_ptr<SvxEntries> mpEntries;
529
530 std::unique_ptr<weld::Widget> m_xMenuBox;
531 std::unique_ptr<weld::Entry> m_xMenuNameEdit;
532 std::unique_ptr<weld::TreeView> m_xMenuListBox;
533 std::unique_ptr<weld::Button> m_xMoveUpButton;
534 std::unique_ptr<weld::Button> m_xMoveDownButton;
535
536 void UpdateButtonStates();
537
538 DECL_LINK(MoveHdl, weld::Button&, void);
539 DECL_LINK(ModifyHdl, weld::Entry&, void);
540 DECL_LINK(SelectHdl, weld::TreeView&, void);
541
542public:
545 SvxConfigEntry const *, bool bCreateMenu);
546 virtual ~SvxMainMenuOrganizerDialog() override;
547
548 std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
550};
551
553{
554private:
555
556 std::unique_ptr<SvxConfigEntry> pRootEntry;
558
559 css::uno::Reference
560 < css::container::XNameAccess > m_xPersistentWindowState;
561
562 void LoadToolbar(
563 const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
564 SvxConfigEntry const * pParentData );
565
567 css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
568 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
569 SvxConfigEntry const *pToolbar );
570
571public:
572
574 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
575 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
576 const OUString& aModuleId,
577 bool docConfig );
578
579 virtual ~ToolbarSaveInData() override;
580
581 void CreateToolbar( SvxConfigEntry* pToolbar );
582 void RestoreToolbar( SvxConfigEntry* pToolbar );
583 void RemoveToolbar( SvxConfigEntry* pToolbar );
584 void ApplyToolbar( SvxConfigEntry* pToolbar );
585
586 OUString GetSystemUIName( const OUString& rResourceURL );
587
588 sal_Int32 GetSystemStyle( const OUString& rResourceURL );
589
590 void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
591
593 const css::uno::Reference< css::frame::XFrame >& xFrame,
594 const OUString& rResourceURL, sal_Int32 nStyle );
595
596 SvxEntries* GetEntries() override;
597 void SetEntries( std::unique_ptr<SvxEntries> ) override;
598 bool HasSettings() override;
599 bool HasURL( const OUString& rURL ) override;
600 void Reset() override;
601 bool Apply() override;
602};
603
605{
606private:
607 std::unique_ptr<weld::Entry> m_xEdtName;
608public:
609 std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
610
611 SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
612 virtual ~SvxNewToolbarDialog() override;
613
614 OUString GetName() const
615 {
616 return m_xEdtName->get_text();
617 }
618};
619
621{
622private:
624
625 css::uno::Reference<
626 css::ui::XImageManager > m_xImageManager;
627
628 css::uno::Reference<
629 css::ui::XImageManager > m_xParentImageManager;
630
631 css::uno::Reference<
632 css::ui::XImageManager > m_xImportedImageManager;
633
634 css::uno::Reference<
635 css::graphic::XGraphicProvider > m_xGraphProvider;
636
637 std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
638
639 std::unique_ptr<ValueSet> m_xTbSymbol;
640 std::unique_ptr<weld::CustomWeld> m_xTbSymbolWin;
641 std::unique_ptr<weld::Label> m_xFtNote;
642 std::unique_ptr<weld::Button> m_xBtnImport;
643 std::unique_ptr<weld::Button> m_xBtnDelete;
644
645 bool ReplaceGraphicItem( const OUString& aURL );
646
647 bool ImportGraphic( const OUString& aURL );
648
649 void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
650
651public:
652
654 weld::Window *pWindow,
655 css::uno::Reference< css::ui::XImageManager > xImageManager,
656 css::uno::Reference< css::ui::XImageManager > xParentImageManager);
657
658 virtual ~SvxIconSelectorDialog() override;
659
660 css::uno::Reference< css::graphic::XGraphic >
662
663 DECL_LINK(SelectHdl, ValueSet*, void);
664 DECL_LINK(ImportHdl, weld::Button&, void);
665 DECL_LINK(DeleteHdl, weld::Button&, void);
666};
667
668//added for issue83555
670{
671private:
672 std::unique_ptr<weld::TextView> m_xLineEditDescription;
673public:
674 SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
675};
676
677/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE
Definition: cfg.hxx:50
constexpr OUStringLiteral CUSTOM_TOOLBAR_STR
Definition: cfg.hxx:58
constexpr OUStringLiteral ITEM_TOOLBAR_URL
Definition: cfg.hxx:55
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE
Definition: cfg.hxx:49
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL
Definition: cfg.hxx:45
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE
Definition: cfg.hxx:48
constexpr OUStringLiteral ITEM_DESCRIPTOR_RESOURCEURL
Definition: cfg.hxx:51
constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME
Definition: cfg.hxx:52
constexpr OUStringLiteral aMenuSeparatorStr
Definition: cfg.hxx:60
std::vector< SvxConfigEntry * > SvxEntries
Definition: cfg.hxx:63
constexpr OUStringLiteral notebookbarTabScope
Definition: cfg.hxx:43
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL
Definition: cfg.hxx:47
constexpr OUStringLiteral ITEM_MENUBAR_URL
Definition: cfg.hxx:54
constexpr OUStringLiteral ITEM_EVENT_URL
Definition: cfg.hxx:56
constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER
Definition: cfg.hxx:46
OUString GetUIName(const OUString &rResourceURL)
Definition: cfg.cxx:714
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:699
std::unique_ptr< SvxConfigEntry > m_pRootEntry
Definition: cfg.hxx:211
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:845
void ResetContextMenu(const SvxConfigEntry *pEntry)
Definition: cfg.cxx:908
void SetEntries(std::unique_ptr< SvxEntries > pNewEntries) override
Definition: cfg.cxx:840
bool HasSettings() override
Definition: cfg.cxx:855
bool Apply() override
Definition: cfg.cxx:860
void Reset() override
Definition: cfg.cxx:890
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:212
SvxEntries * GetEntries() override
Definition: cfg.cxx:739
virtual ~ContextMenuSaveInData() override
Definition: cfg.cxx:710
static void SetDefaultData(MenuSaveInData *pData)
Definition: cfg.hxx:182
bool HasURL(const OUString &) override
Definition: cfg.hxx:202
void Apply(css::uno::Reference< css::container::XIndexContainer > const &rNewMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory)
bool HasSettings() override
Definition: cfg.hxx:203
bool Apply() override
Definition: cfg.cxx:559
static MenuSaveInData * pDefaultData
static holder of the default menu data
Definition: cfg.hxx:180
OUString m_aDescriptorContainer
Definition: cfg.hxx:172
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:442
void Reset() override
Definition: cfg.cxx:675
css::uno::Reference< css::container::XIndexAccess > m_xMenuSettings
Definition: cfg.hxx:175
static MenuSaveInData * GetDefaultData()
Definition: cfg.hxx:183
MenuSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:385
OUString m_aMenuResourceURL
Definition: cfg.hxx:171
virtual ~MenuSaveInData() override
Definition: cfg.cxx:416
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:177
SvxEntries * GetEntries() override
methods inherited from SaveInData
Definition: cfg.cxx:421
css::uno::Reference< css::ui::XUIConfigurationManager > m_xCfgMgr
Definition: cfg.hxx:91
virtual ~SaveInData()
Definition: cfg.hxx:124
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:336
void LoadSubMenus(const css::uno::Reference< css::container::XIndexAccess > &xMenuSettings, const OUString &rBaseTitle, SvxConfigEntry const *pParentData, bool bContextMenu)
Definition: cfg.cxx:447
css::uno::Reference< css::ui::XImageManager > m_xParentImgMgr
Definition: cfg.hxx:100
virtual SvxEntries * GetEntries()=0
bool IsDocConfig() const
Definition: cfg.hxx:133
bool IsReadOnly() const
Definition: cfg.hxx:132
virtual bool HasSettings()=0
bool bReadOnly
Definition: cfg.hxx:88
const css::uno::Reference< css::ui::XImageManager > & GetImageManager() const
Definition: cfg.hxx:145
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
virtual bool Apply()=0
css::uno::Reference< css::container::XNameAccess > m_xCommandToLabelMap
Definition: cfg.hxx:149
bool bModified
Definition: cfg.hxx:85
virtual void Reset()=0
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetConfigManager() const
Definition: cfg.hxx:137
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
Definition: cfg.hxx:155
virtual bool HasURL(const OUString &aURL)=0
void ApplyMenu(css::uno::Reference< css::container::XIndexContainer > const &rMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry *pMenuData)
Definition: cfg.cxx:628
void SetModified(bool bValue=true)
Definition: cfg.hxx:129
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
Definition: cfg.hxx:94
bool bDocConfig
Definition: cfg.hxx:87
bool IsModified() const
Definition: cfg.hxx:130
static css::uno::Reference< css::ui::XImageManager > * xDefaultImgMgr
Definition: cfg.hxx:103
const css::uno::Reference< css::ui::XImageManager > & GetParentImageManager() const
Definition: cfg.hxx:149
SaveInData(css::uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr, css::uno::Reference< css::ui::XUIConfigurationManager > xParentCfgMgr, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:283
css::uno::Reference< css::ui::XImageManager > m_xImgMgr
Definition: cfg.hxx:97
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
Definition: cfg.cxx:349
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetParentConfigManager() const
Definition: cfg.hxx:141
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:70
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
Definition: cfg.cxx:245
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: cfg.cxx:260
virtual void ActivatePage(const OString &rPage) override
Definition: cfg.cxx:239
SvxConfigDialog(weld::Window *, const SfxItemSet *)
Definition: cfg.cxx:208
sal_Int32 GetStyle() const
Definition: cfg.hxx:318
const OUString & GetCommand() const
Definition: cfg.hxx:279
sal_Int32 nStyle
Definition: cfg.hxx:250
bool IsDeletable() const
Definition: cfg.cxx:1957
void SetStyle(sal_Int32 style)
Definition: cfg.hxx:319
bool IsParentData() const
Definition: cfg.hxx:300
void SetParentData(bool bValue=true)
Definition: cfg.hxx:299
void SetEntries(std::unique_ptr< SvxEntries > entries)
Definition: cfg.hxx:294
SvxEntries * GetEntries() const
Definition: cfg.hxx:293
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:255
bool IsMovable() const
Definition: cfg.cxx:1952
css::uno::Reference< css::graphic::XGraphic > xBackupGraphic
Definition: cfg.hxx:253
bool bIsParentData
Definition: cfg.hxx:245
bool IsPopup() const
Definition: cfg.hxx:285
bool bIsModified
Definition: cfg.hxx:246
bool bIsVisible
toolbar specific properties
Definition: cfg.hxx:249
const css::uno::Reference< css::graphic::XGraphic > & GetBackupGraphic() const
Definition: cfg.hxx:315
bool bIsUserDefined
Definition: cfg.hxx:243
SvxConfigEntry()
Definition: cfg.hxx:264
bool IsVisible() const
Definition: cfg.hxx:310
void SetMain()
Definition: cfg.hxx:296
void SetBackupGraphic(css::uno::Reference< css::graphic::XGraphic > const &graphic)
Definition: cfg.hxx:312
OUString aLabel
Definition: cfg.hxx:238
bool bIsMain
Definition: cfg.hxx:244
void SetName(const OUString &rStr)
Definition: cfg.hxx:282
void SetModified(bool bValue=true)
Definition: cfg.hxx:302
bool IsUserDefined() const
Definition: cfg.hxx:288
OUString aCommand
Definition: cfg.hxx:239
bool bPopUp
Definition: cfg.hxx:241
void SetUserDefined(bool bOn=true)
Definition: cfg.hxx:287
void SetVisible(bool b)
Definition: cfg.hxx:309
bool IsRenamable() const
Definition: cfg.cxx:1962
bool IsModified() const
Definition: cfg.hxx:303
const OUString & GetName() const
Definition: cfg.hxx:281
bool bStrEdited
Definition: cfg.hxx:242
bool HasChangedName() const
Definition: cfg.hxx:283
bool IsSeparator() const
Definition: cfg.hxx:291
sal_uInt16 nId
common properties
Definition: cfg.hxx:237
bool IsMain() const
Definition: cfg.hxx:297
bool IsBinding() const
Definition: cfg.hxx:290
~SvxConfigEntry()
Definition: cfg.cxx:1941
SvxConfigPage & m_rPage
Definition: cfg.hxx:362
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: cfg.cxx:3242
SvxConfigPageFunctionDropTarget(SvxConfigPage &rPage, weld::TreeView &rTreeView)
Definition: cfg.cxx:3236
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
Definition: cfg.cxx:1365
void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString &sUIItemId, const OUString &sUIItemCommand, weld::TreeView &rTreeView, const weld::TreeIter &rIter)
void InsertEntryIntoUI(SvxConfigEntry *pNewEntryData, weld::TreeView &rTreeView, int nPos, bool bMenu=false)
Definition: cfg.cxx:1613
OUString GetScriptURL() const
Definition: cfg.cxx:1318
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:410
OUString m_aModuleId
Definition: cfg.hxx:386
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
Definition: cfg.hxx:404
static bool CanConfig(std::u16string_view rModuleId)
Definition: cfg.cxx:165
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
Definition: cfg.hxx:394
virtual void ListModified()
Definition: cfg.hxx:501
virtual ~SvxConfigPage() override
Definition: cfg.cxx:1052
void Reset(const SfxItemSet *) override
Definition: cfg.cxx:1062
DECL_LINK(SearchUpdateHdl, weld::Entry &, void)
std::unique_ptr< weld::MenuButton > m_xGearBtn
Definition: cfg.hxx:406
std::unique_ptr< SvxConfigPageFunctionDropTarget > m_xDropTargetHelper
Definition: cfg.hxx:408
std::unique_ptr< weld::Widget > m_xCommandButtons
Definition: cfg.hxx:422
SvxConfigEntry * GetTopLevelSelection()
Definition: cfg.hxx:503
int AppendEntry(SvxConfigEntry *pNewEntryData, int nTarget)
Definition: cfg.cxx:1517
static OUString GetFrameWithDefaultAndIdentify(css::uno::Reference< css::frame::XFrame > &_inout_rxFrame)
identifies the module in the given frame.
Definition: cfg.cxx:1277
std::unique_ptr< weld::Label > m_xCategoryLabel
Definition: cfg.hxx:393
virtual void SelectElement()=0
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:391
DECL_LINK(SelectSaveInLocation, weld::ComboBox &, void)
DECL_LINK(ImplUpdateDataHdl, Timer *, void)
virtual void UpdateButtonStates()=0
DECL_LINK(MoveHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xRemoveCommandButton
Definition: cfg.hxx:424
DECL_LINK(SelectElementHdl, weld::ComboBox &, void)
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:390
std::unique_ptr< weld::Widget > m_xCustomizeBox
Definition: cfg.hxx:415
virtual SaveInData * CreateSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)=0
std::unique_ptr< weld::Entry > m_xSearchEdit
Definition: cfg.hxx:397
int AddFunction(int nTarget, bool bAllowDuplicates)
Definition: cfg.cxx:1489
const OUString & GetFileName() const
Definition: cfg.hxx:486
bool bInitialised
Definition: cfg.hxx:375
virtual void DeleteSelectedContent()=0
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
Definition: cfg.hxx:383
void AddSubMenusToUI(std::u16string_view rBaseTitle, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:1399
DECL_LINK(FocusOut_Impl, weld::Widget &, void)
std::unique_ptr< weld::Button > m_xResetBtn
Definition: cfg.hxx:419
static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData, const SvxEntries *pEntries)
Definition: cfg.cxx:1468
virtual void DeleteSelectedTopLevel()=0
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:395
OUString GetSelectedDisplayName() const
Definition: cfg.cxx:1336
std::unique_ptr< weld::MenuButton > m_xInsertBtn
Definition: cfg.hxx:416
SvxConfigEntry * CreateCommandFromSelection(const OUString &aURL)
Definition: cfg.cxx:1440
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
Definition: cfg.hxx:396
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:411
OUString m_sAppName
Definition: cfg.hxx:426
DECL_LINK(SelectFunctionHdl, weld::TreeView &, void)
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:385
Timer m_aUpdateDataTimer
Definition: cfg.hxx:374
virtual void Init()=0
DECL_LINK(FunctionDoubleClickHdl, weld::TreeView &, bool)
bool MoveEntryData(int SourceEntry, int nTargetEntry)
Definition: cfg.cxx:1742
OUString m_sFileName
Definition: cfg.hxx:427
std::unique_ptr< weld::MenuButton > m_xModifyBtn
Definition: cfg.hxx:417
bool FillItemSet(SfxItemSet *) override
Definition: cfg.cxx:1341
std::unique_ptr< weld::Label > m_xSearchLabel
Definition: cfg.hxx:398
virtual void MoveEntry(bool bMoveUp)
Definition: cfg.cxx:1706
std::unique_ptr< weld::Button > m_xAddCommandButton
Definition: cfg.hxx:423
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:403
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:413
const OUString & GetAppName() const
Definition: cfg.hxx:485
SaveInData * GetSaveInData()
Definition: cfg.hxx:484
SaveInData * pCurrentSaveInData
Definition: cfg.hxx:376
SvxConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &)
Definition: cfg.cxx:1002
SvxEntries * FindParentForChild(SvxEntries *pParentEntries, SvxConfigEntry *pChildData)
Definition: cfg.cxx:1416
virtual short QueryReset()=0
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
Definition: cfg.hxx:407
std::unique_ptr< weld::TextView > m_xLineEditDescription
Definition: cfg.hxx:672
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
Definition: cfg.cxx:3227
void ImportGraphics(const css::uno::Sequence< OUString > &aURLs)
Definition: cfg.cxx:3060
bool ReplaceGraphicItem(const OUString &aURL)
Definition: cfg.cxx:2956
std::unique_ptr< weld::Button > m_xBtnImport
Definition: cfg.hxx:642
DECL_LINK(ImportHdl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xFtNote
Definition: cfg.hxx:641
std::unique_ptr< weld::Button > m_xBtnDelete
Definition: cfg.hxx:643
SvxIconSelectorDialog(weld::Window *pWindow, css::uno::Reference< css::ui::XImageManager > xImageManager, css::uno::Reference< css::ui::XImageManager > xParentImageManager)
Definition: cfg.cxx:2711
virtual ~SvxIconSelectorDialog() override
Definition: cfg.cxx:2867
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
Definition: cfg.hxx:637
sal_Int32 m_nExpectedSize
Definition: cfg.hxx:623
std::unique_ptr< weld::CustomWeld > m_xTbSymbolWin
Definition: cfg.hxx:640
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
Definition: cfg.cxx:2871
DECL_LINK(DeleteHdl, weld::Button &, void)
bool ImportGraphic(const OUString &aURL)
Definition: cfg.cxx:3159
std::unique_ptr< ValueSet > m_xTbSymbol
Definition: cfg.hxx:639
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
Definition: cfg.hxx:632
DECL_LINK(SelectHdl, ValueSet *, void)
css::uno::Reference< css::ui::XImageManager > m_xParentImageManager
Definition: cfg.hxx:629
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
Definition: cfg.hxx:635
css::uno::Reference< css::ui::XImageManager > m_xImageManager
Definition: cfg.hxx:626
DECL_LINK(ModifyHdl, weld::Entry &, void)
std::unique_ptr< SvxEntries > ReleaseEntries()
Definition: cfg.hxx:548
OUString m_sNewMenuEntryId
Definition: cfg.hxx:528
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
Definition: cfg.cxx:1780
virtual ~SvxMainMenuOrganizerDialog() override
Definition: cfg.cxx:1849
DECL_LINK(MoveHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:533
SvxConfigEntry * GetSelectedEntry()
Definition: cfg.cxx:1913
std::unique_ptr< weld::Widget > m_xMenuBox
Definition: cfg.hxx:530
std::unique_ptr< weld::TreeView > m_xMenuListBox
Definition: cfg.hxx:532
std::unique_ptr< weld::Entry > m_xMenuNameEdit
Definition: cfg.hxx:531
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:534
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:527
DECL_LINK(SelectHdl, weld::TreeView &, void)
void remove(int nPos)
Definition: cfg.hxx:337
int n_children() const
Definition: cfg.hxx:338
void scroll_to_row(int pos)
Definition: cfg.hxx:342
SvxMenuEntriesListBox(std::unique_ptr< weld::TreeView > xControl, SvxConfigPage *pPage)
Definition: cfg.cxx:940
void select(int pos)
Definition: cfg.hxx:343
void set_toggle(int row, TriState eState)
Definition: cfg.hxx:341
void insert(int pos, const OUString &rId)
Definition: cfg.hxx:347
VirtualDevice & get_dropdown_image() const
Definition: cfg.hxx:333
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
DECL_LINK(QueryTooltip, const weld::TreeIter &rIter, OUString)
OUString get_id(int nPos) const
Definition: cfg.hxx:336
void set_text(int row, const OUString &rText, int col)
Definition: cfg.hxx:339
weld::TreeView & get_widget()
Definition: cfg.hxx:345
std::unique_ptr< weld::TreeView > m_xControl
Definition: cfg.hxx:325
ScopedVclPtr< VirtualDevice > m_xDropDown
Definition: cfg.hxx:326
virtual ~SvxMenuEntriesListBox()
Definition: cfg.cxx:951
void CreateDropDown()
Definition: cfg.cxx:922
SvxConfigPage * m_pPage
Definition: cfg.hxx:327
int get_selected_index() const
Definition: cfg.hxx:335
virtual ~SvxNewToolbarDialog() override
Definition: cfg.cxx:2702
SvxNewToolbarDialog(weld::Window *pWindow, const OUString &rName)
Definition: cfg.cxx:2693
std::unique_ptr< weld::Entry > m_xEdtName
Definition: cfg.hxx:607
OUString GetName() const
Definition: cfg.hxx:614
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:609
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:2345
void SetSystemStyle(const OUString &rResourceURL, sal_Int32 nStyle)
Definition: cfg.cxx:2077
void SetSystemStyle(const css::uno::Reference< css::frame::XFrame > &xFrame, const OUString &rResourceURL, sal_Int32 nStyle)
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:556
SvxEntries * GetEntries() override
Definition: cfg.cxx:2176
void RestoreToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2552
sal_Int32 GetSystemStyle(const OUString &rResourceURL)
Definition: cfg.cxx:1989
void CreateToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2502
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:2351
void ApplyToolbar(css::uno::Reference< css::container::XIndexContainer > const &rNewToolbarBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry const *pToolbar)
virtual ~ToolbarSaveInData() override
Definition: cfg.cxx:1985
void LoadToolbar(const css::uno::Reference< css::container::XIndexAccess > &xToolBarSettings, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:2616
bool Apply() override
Definition: cfg.cxx:2405
void RemoveToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2529
OUString m_aDescriptorContainer
Definition: cfg.hxx:557
bool HasSettings() override
Definition: cfg.cxx:2363
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:560
void Reset() override
Definition: cfg.cxx:2369
ToolbarSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:1967
OUString GetSystemUIName(const OUString &rResourceURL)
Definition: cfg.cxx:2116
float u
TriState
sal_uInt16 nPos
std::unique_ptr< sal_Int32[]> pData
RttiCompleteObjectLocator col
signed char sal_Int8
size_t pos