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/";
56
57inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
58
59inline constexpr OUStringLiteral aMenuSeparatorStr = u" | ";
60
61class SvxConfigEntry;
62class SvxConfigPage;
63
64typedef std::vector< SvxConfigEntry* > SvxEntries;
65
67{
68private:
69 css::uno::Reference< css::frame::XFrame > m_xFrame;
70
71 virtual void ActivatePage(const OString& rPage) override;
72
73public:
75
76 virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
77 void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
78};
79
81{
82private:
83
85
88
89 css::uno::Reference
90 < css::ui::XUIConfigurationManager > m_xCfgMgr;
91
92 css::uno::Reference
93 < css::ui::XUIConfigurationManager > m_xParentCfgMgr;
94
95 css::uno::Reference
96 < css::ui::XImageManager > m_xImgMgr;
97
98 css::uno::Reference
99 < css::ui::XImageManager > m_xParentImgMgr;
100
101 static css::uno::Reference
102 < css::ui::XImageManager >* xDefaultImgMgr;
103
104protected:
105
106 void ApplyMenu(
107 css::uno::Reference< css::container::XIndexContainer > const & rMenuBar,
108 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
109 SvxConfigEntry *pMenuData );
110
111 void LoadSubMenus(
112 const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
113 const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool bContextMenu );
114
115public:
116
118 css::uno::Reference < css::ui::XUIConfigurationManager > xCfgMgr,
119 css::uno::Reference < css::ui::XUIConfigurationManager > xParentCfgMgr,
120 const OUString& aModuleId,
121 bool docConfig );
122
123 virtual ~SaveInData() {}
124
125 bool PersistChanges(
126 const css::uno::Reference< css::uno::XInterface >& xManager );
127
128 void SetModified( bool bValue = true ) { bModified = bValue; }
129 bool IsModified( ) const { return bModified; }
130
131 bool IsReadOnly( ) const { return bReadOnly; }
132 bool IsDocConfig( ) const { return bDocConfig; }
133
134 const css::uno::Reference
135 < css::ui::XUIConfigurationManager >&
136 GetConfigManager() const { return m_xCfgMgr; };
137
138 const css::uno::Reference
139 < css::ui::XUIConfigurationManager >&
141
142 const css::uno::Reference
143 < css::ui::XImageManager >&
144 GetImageManager() const { return m_xImgMgr; };
145
146 const css::uno::Reference
147 < css::ui::XImageManager >&
149
150 css::uno::Reference
151 < css::container::XNameAccess > m_xCommandToLabelMap;
152
153 css::uno::Sequence
154 < css::beans::PropertyValue > m_aSeparatorSeq;
155
156 css::uno::Reference<css::graphic::XGraphic> GetImage(const OUString& rCommandURL);
157
158 virtual bool HasURL( const OUString& aURL ) = 0;
159 virtual bool HasSettings() = 0;
160 virtual SvxEntries* GetEntries() = 0;
161 virtual void SetEntries( std::unique_ptr<SvxEntries> ) = 0;
162 virtual void Reset() = 0;
163 virtual bool Apply() = 0;
164};
165
167{
168private:
169
172
173 css::uno::Reference
174 < css::container::XIndexAccess > m_xMenuSettings;
175
176 std::unique_ptr<SvxConfigEntry> pRootEntry;
177
178
180
183
184 void Apply(
185 css::uno::Reference< css::container::XIndexContainer > const & rNewMenuBar,
186 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
187
188public:
189
191 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
192 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
193 const OUString& aModuleId,
194 bool docConfig );
195
196 virtual ~MenuSaveInData() override;
197
199 SvxEntries* GetEntries() override;
200 void SetEntries( std::unique_ptr<SvxEntries> ) override;
201 bool HasURL( const OUString& ) override { return false; }
202 bool HasSettings() override { return m_xMenuSettings.is(); }
203 void Reset() override;
204 bool Apply() override;
205};
206
208{
209private:
210 std::unique_ptr< SvxConfigEntry > m_pRootEntry;
211 css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState;
212 OUString GetUIName( const OUString& rResourceURL );
213
214public:
216 const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
217 const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
218 const OUString& aModuleId, bool bIsDocConfig );
219 virtual ~ContextMenuSaveInData() override;
220
221 SvxEntries* GetEntries() override;
222 void SetEntries( std::unique_ptr<SvxEntries> pNewEntries ) override;
223 bool HasSettings() override;
224 bool HasURL( const OUString& rURL ) override;
225 void Reset() override;
226 bool Apply() override;
227
228 void ResetContextMenu( const SvxConfigEntry* pEntry );
229};
230
232{
233private:
234
236 sal_uInt16 nId;
237 OUString aLabel;
238 OUString aCommand;
239
240 bool bPopUp;
246
249 sal_Int32 nStyle;
250
251 css::uno::Reference<
252 css::graphic::XGraphic > xBackupGraphic;
253
254 std::unique_ptr<SvxEntries> mpEntries;
255
256public:
257
258 SvxConfigEntry( OUString aDisplayName,
259 OUString aCommandURL,
260 bool bPopup,
261 bool bParentData );
262
264 :
265 nId( 0 ),
266 bPopUp( false ),
267 bStrEdited( false ),
268 bIsUserDefined( false ),
269 bIsMain( false ),
270 bIsParentData( false ),
271 bIsModified( false ),
272 bIsVisible( true ),
273 nStyle( 0 )
274 {}
275
277
278 const OUString& GetCommand() const { return aCommand; }
279
280 const OUString& GetName() const { return aLabel; }
281 void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
282 bool HasChangedName() const { return bStrEdited; }
283
284 bool IsPopup() const { return bPopUp; }
285
286 void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
287 bool IsUserDefined() const { return bIsUserDefined; }
288
289 bool IsBinding() const { return !bPopUp; }
290 bool IsSeparator() const { return nId == 0; }
291
292 SvxEntries* GetEntries() const { return mpEntries.get(); }
293 void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
294
295 void SetMain() { bIsMain = true; }
296 bool IsMain() const { return bIsMain; }
297
298 void SetParentData( bool bValue = true ) { bIsParentData = bValue; }
299 bool IsParentData() const { return bIsParentData; }
300
301 void SetModified( bool bValue = true ) { bIsModified = bValue; }
302 bool IsModified() const { return bIsModified; }
303
304 bool IsMovable() const;
305 bool IsDeletable() const;
306 bool IsRenamable() const;
307
308 void SetVisible( bool b ) { bIsVisible = b; }
309 bool IsVisible() const { return bIsVisible; }
310
311 void SetBackupGraphic( css::uno::Reference< css::graphic::XGraphic > const & graphic )
313
314 const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic() const
315 { return xBackupGraphic; }
316
317 sal_Int32 GetStyle() const { return nStyle; }
318 void SetStyle( sal_Int32 style ) { nStyle = style; }
319};
320
322{
323protected:
324 std::unique_ptr<weld::TreeView> m_xControl;
327
328public:
329 SvxMenuEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPage);
330 virtual ~SvxMenuEntriesListBox();
331
333
334 int get_selected_index() const { return m_xControl->get_selected_index(); }
335 OUString get_id(int nPos) const { return m_xControl->get_id(nPos); }
336 void remove(int nPos) { m_xControl->remove(nPos); }
337 int n_children() const { return m_xControl->n_children(); }
338 void set_text(int row, const OUString& rText, int col) { m_xControl->set_text(row, rText, col); }
339 void clear() { m_xControl->clear(); } //need frees ?
340 void set_toggle(int row, TriState eState) { m_xControl->set_toggle(row, eState); }
341 void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); }
342 void select(int pos) { m_xControl->select(pos); }
343
345
346 void insert(int pos, const OUString& rId)
347 {
348 m_xControl->insert(nullptr, pos, nullptr, &rId,
349 nullptr, nullptr, false, nullptr);
350 }
351
352 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
353 DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
354
355 void CreateDropDown();
356};
357
359{
360private:
362
363 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
364
365public:
367};
368
370{
371private:
372
376
377 DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
378
379protected:
380
383
384 css::uno::Reference< css::frame::XFrame > m_xFrame;
385 OUString m_aModuleId;
386
387 // Left side of the dialog where command categories and the available
388 // commands in them are displayed as a searchable list
389 std::unique_ptr<CommandCategoryListBox> m_xCommandCategoryListBox;
390 std::unique_ptr<CuiConfigFunctionListBox> m_xFunctions;
391
392 std::unique_ptr<weld::Label> m_xCategoryLabel;
393 std::unique_ptr<weld::Label> m_xDescriptionFieldLb;
394 std::unique_ptr<weld::TextView> m_xDescriptionField;
395 std::unique_ptr<weld::Label> m_xLeftFunctionLabel;
396 std::unique_ptr<weld::Entry> m_xSearchEdit;
397 std::unique_ptr<weld::Label> m_xSearchLabel;
398
399
400 // Right side of the dialog where the contents of the selected
401 // menu or toolbar are displayed
402 std::unique_ptr<weld::Label> m_xCustomizeLabel;
403 std::unique_ptr<weld::ComboBox> m_xTopLevelListBox;
404 // Used to add and remove toolbars/menus
405 std::unique_ptr<weld::MenuButton> m_xGearBtn;
406 std::unique_ptr<SvxMenuEntriesListBox> m_xContentsListBox;
407 std::unique_ptr<SvxConfigPageFunctionDropTarget> m_xDropTargetHelper;
408
409 std::unique_ptr<weld::Button> m_xMoveUpButton;
410 std::unique_ptr<weld::Button> m_xMoveDownButton;
411
412 std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
413
414 std::unique_ptr<weld::MenuButton> m_xInsertBtn;
415 std::unique_ptr<weld::MenuButton> m_xModifyBtn;
416 // Used to reset the selected toolbar/menu/context menu
417 std::unique_ptr<weld::Button> m_xResetBtn;
418
419 // Middle buttons
420 std::unique_ptr<weld::Button> m_xAddCommandButton;
421 std::unique_ptr<weld::Button> m_xRemoveCommandButton;
422
423 OUString m_sAppName;
424 OUString m_sFileName;
425
427
428 DECL_LINK(MoveHdl, weld::Button&, void);
429 DECL_LINK(SelectFunctionHdl, weld::TreeView&, void);
430 DECL_LINK(FunctionDoubleClickHdl, weld::TreeView&, bool);
431 DECL_LINK(SelectSaveInLocation, weld::ComboBox&, void);
432 DECL_LINK(SelectElementHdl, weld::ComboBox&, void);
433 DECL_LINK(ImplUpdateDataHdl, Timer*, void);
434 DECL_LINK(FocusOut_Impl, weld::Widget&, void);
435
437 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
438 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
439 const OUString& aModuleId,
440 bool docConfig ) = 0;
441
442 virtual void Init() = 0;
443 virtual void UpdateButtonStates() = 0;
444 virtual short QueryReset() = 0;
445
446 virtual void SelectElement() = 0;
447
448 int AppendEntry(SvxConfigEntry* pNewEntryData,
449 int nTarget);
450
451 void AddSubMenusToUI( std::u16string_view rBaseTitle,
452 SvxConfigEntry const * pParentData );
453
454 void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
455 weld::TreeView& rTreeView, int nPos,
456 bool bMenu = false);
457 void InsertEntryIntoUI(SvxConfigEntry* pNewEntryData,
458 weld::TreeView& rTreeView, weld::TreeIter& rIter,
459 bool bMenu = false);
460
461 void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString& sUIItemId,
462 const OUString& sUIItemCommand,
463 weld::TreeView& rTreeView, const weld::TreeIter& rIter);
464
465 SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
466 SvxConfigEntry* pChildData );
467
468 void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
469
470 static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData,
471 const SvxEntries *pEntries);
472
473 SvxConfigEntry *CreateCommandFromSelection(const OUString &aURL);
474
475public:
476
477 virtual ~SvxConfigPage() override;
478
479 static bool CanConfig( std::u16string_view rModuleId );
480
482 const OUString& GetAppName() const { return m_sAppName; }
483 const OUString& GetFileName() const { return m_sFileName; }
484
485 int AddFunction(int nTarget,
486 bool bAllowDuplicates);
487
488 virtual void MoveEntry( bool bMoveUp );
489
490 bool MoveEntryData(int SourceEntry, int nTargetEntry);
491
492 bool FillItemSet( SfxItemSet* ) override;
493 void Reset( const SfxItemSet* ) override;
494
495 virtual void DeleteSelectedContent() = 0;
496 virtual void DeleteSelectedTopLevel() = 0;
497
498 virtual void ListModified() {}
499
501 {
502 return weld::fromId<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id());
503 }
504
515 static OUString
516 GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
517
518 OUString GetScriptURL() const;
519 OUString GetSelectedDisplayName() const;
520};
521
523{
524 std::unique_ptr<SvxEntries> mpEntries;
526
527 std::unique_ptr<weld::Widget> m_xMenuBox;
528 std::unique_ptr<weld::Entry> m_xMenuNameEdit;
529 std::unique_ptr<weld::TreeView> m_xMenuListBox;
530 std::unique_ptr<weld::Button> m_xMoveUpButton;
531 std::unique_ptr<weld::Button> m_xMoveDownButton;
532
533 void UpdateButtonStates();
534
535 DECL_LINK(MoveHdl, weld::Button&, void);
536 DECL_LINK(ModifyHdl, weld::Entry&, void);
537 DECL_LINK(SelectHdl, weld::TreeView&, void);
538
539public:
542 SvxConfigEntry const *, bool bCreateMenu);
543 virtual ~SvxMainMenuOrganizerDialog() override;
544
545 std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
547};
548
550{
551private:
552
553 std::unique_ptr<SvxConfigEntry> pRootEntry;
555
556 css::uno::Reference
557 < css::container::XNameAccess > m_xPersistentWindowState;
558
559 void LoadToolbar(
560 const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
561 SvxConfigEntry const * pParentData );
562
564 css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
565 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
566 SvxConfigEntry const *pToolbar );
567
568public:
569
571 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
572 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
573 const OUString& aModuleId,
574 bool docConfig );
575
576 virtual ~ToolbarSaveInData() override;
577
578 void CreateToolbar( SvxConfigEntry* pToolbar );
579 void RestoreToolbar( SvxConfigEntry* pToolbar );
580 void RemoveToolbar( SvxConfigEntry* pToolbar );
581 void ApplyToolbar( SvxConfigEntry* pToolbar );
582
583 OUString GetSystemUIName( const OUString& rResourceURL );
584
585 sal_Int32 GetSystemStyle( const OUString& rResourceURL );
586
587 void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
588
590 const css::uno::Reference< css::frame::XFrame >& xFrame,
591 const OUString& rResourceURL, sal_Int32 nStyle );
592
593 SvxEntries* GetEntries() override;
594 void SetEntries( std::unique_ptr<SvxEntries> ) override;
595 bool HasSettings() override;
596 bool HasURL( const OUString& rURL ) override;
597 void Reset() override;
598 bool Apply() override;
599};
600
602{
603private:
604 std::unique_ptr<weld::Entry> m_xEdtName;
605 std::unique_ptr<weld::Button> m_xBtnOK;
606public:
607 std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
608
609 SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
610 virtual ~SvxNewToolbarDialog() override;
611
612 OUString GetName() const
613 {
614 return m_xEdtName->get_text();
615 }
616};
617
619{
620private:
622
623 css::uno::Reference<
624 css::ui::XImageManager > m_xImageManager;
625
626 css::uno::Reference<
627 css::ui::XImageManager > m_xParentImageManager;
628
629 css::uno::Reference<
630 css::ui::XImageManager > m_xImportedImageManager;
631
632 css::uno::Reference<
633 css::graphic::XGraphicProvider > m_xGraphProvider;
634
635 std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
636
637 std::unique_ptr<ValueSet> m_xTbSymbol;
638 std::unique_ptr<weld::CustomWeld> m_xTbSymbolWin;
639 std::unique_ptr<weld::Label> m_xFtNote;
640 std::unique_ptr<weld::Button> m_xBtnImport;
641 std::unique_ptr<weld::Button> m_xBtnDelete;
642
643 bool ReplaceGraphicItem( const OUString& aURL );
644
645 bool ImportGraphic( const OUString& aURL );
646
647 void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
648
649public:
650
652 weld::Window *pWindow,
653 css::uno::Reference< css::ui::XImageManager > xImageManager,
654 css::uno::Reference< css::ui::XImageManager > xParentImageManager);
655
656 virtual ~SvxIconSelectorDialog() override;
657
658 css::uno::Reference< css::graphic::XGraphic >
660
661 DECL_LINK(SelectHdl, ValueSet*, void);
662 DECL_LINK(ImportHdl, weld::Button&, void);
663 DECL_LINK(DeleteHdl, weld::Button&, void);
664};
665
666//added for issue83555
668{
669private:
670 std::unique_ptr<weld::TextView> m_xLineEditDescription;
671public:
672 SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
673};
674
675/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE
Definition: cfg.hxx:50
constexpr OUStringLiteral CUSTOM_TOOLBAR_STR
Definition: cfg.hxx:57
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:59
std::vector< SvxConfigEntry * > SvxEntries
Definition: cfg.hxx:62
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_DESCRIPTOR_CONTAINER
Definition: cfg.hxx:46
OUString GetUIName(const OUString &rResourceURL)
Definition: cfg.cxx:706
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:691
std::unique_ptr< SvxConfigEntry > m_pRootEntry
Definition: cfg.hxx:210
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:837
void ResetContextMenu(const SvxConfigEntry *pEntry)
Definition: cfg.cxx:900
void SetEntries(std::unique_ptr< SvxEntries > pNewEntries) override
Definition: cfg.cxx:832
bool HasSettings() override
Definition: cfg.cxx:847
bool Apply() override
Definition: cfg.cxx:852
void Reset() override
Definition: cfg.cxx:882
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:211
SvxEntries * GetEntries() override
Definition: cfg.cxx:731
virtual ~ContextMenuSaveInData() override
Definition: cfg.cxx:702
static void SetDefaultData(MenuSaveInData *pData)
Definition: cfg.hxx:181
bool HasURL(const OUString &) override
Definition: cfg.hxx:201
void Apply(css::uno::Reference< css::container::XIndexContainer > const &rNewMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory)
bool HasSettings() override
Definition: cfg.hxx:202
bool Apply() override
Definition: cfg.cxx:551
static MenuSaveInData * pDefaultData
static holder of the default menu data
Definition: cfg.hxx:179
OUString m_aDescriptorContainer
Definition: cfg.hxx:171
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:434
void Reset() override
Definition: cfg.cxx:667
css::uno::Reference< css::container::XIndexAccess > m_xMenuSettings
Definition: cfg.hxx:174
static MenuSaveInData * GetDefaultData()
Definition: cfg.hxx:182
MenuSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:377
OUString m_aMenuResourceURL
Definition: cfg.hxx:170
virtual ~MenuSaveInData() override
Definition: cfg.cxx:408
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:176
SvxEntries * GetEntries() override
methods inherited from SaveInData
Definition: cfg.cxx:413
css::uno::Reference< css::ui::XUIConfigurationManager > m_xCfgMgr
Definition: cfg.hxx:90
virtual ~SaveInData()
Definition: cfg.hxx:123
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
Definition: cfg.cxx:328
void LoadSubMenus(const css::uno::Reference< css::container::XIndexAccess > &xMenuSettings, const OUString &rBaseTitle, SvxConfigEntry const *pParentData, bool bContextMenu)
Definition: cfg.cxx:439
css::uno::Reference< css::ui::XImageManager > m_xParentImgMgr
Definition: cfg.hxx:99
virtual SvxEntries * GetEntries()=0
bool IsDocConfig() const
Definition: cfg.hxx:132
bool IsReadOnly() const
Definition: cfg.hxx:131
virtual bool HasSettings()=0
bool bReadOnly
Definition: cfg.hxx:87
const css::uno::Reference< css::ui::XImageManager > & GetImageManager() const
Definition: cfg.hxx:144
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
virtual bool Apply()=0
css::uno::Reference< css::container::XNameAccess > m_xCommandToLabelMap
Definition: cfg.hxx:148
bool bModified
Definition: cfg.hxx:84
virtual void Reset()=0
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetConfigManager() const
Definition: cfg.hxx:136
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
Definition: cfg.hxx:154
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:620
void SetModified(bool bValue=true)
Definition: cfg.hxx:128
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
Definition: cfg.hxx:93
bool bDocConfig
Definition: cfg.hxx:86
bool IsModified() const
Definition: cfg.hxx:129
static css::uno::Reference< css::ui::XImageManager > * xDefaultImgMgr
Definition: cfg.hxx:102
const css::uno::Reference< css::ui::XImageManager > & GetParentImageManager() const
Definition: cfg.hxx:148
SaveInData(css::uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr, css::uno::Reference< css::ui::XUIConfigurationManager > xParentCfgMgr, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:275
css::uno::Reference< css::ui::XImageManager > m_xImgMgr
Definition: cfg.hxx:96
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
Definition: cfg.cxx:341
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetParentConfigManager() const
Definition: cfg.hxx:140
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:69
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
Definition: cfg.cxx:237
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: cfg.cxx:252
virtual void ActivatePage(const OString &rPage) override
Definition: cfg.cxx:231
SvxConfigDialog(weld::Window *, const SfxItemSet *)
Definition: cfg.cxx:206
sal_Int32 GetStyle() const
Definition: cfg.hxx:317
const OUString & GetCommand() const
Definition: cfg.hxx:278
sal_Int32 nStyle
Definition: cfg.hxx:249
bool IsDeletable() const
Definition: cfg.cxx:1944
void SetStyle(sal_Int32 style)
Definition: cfg.hxx:318
bool IsParentData() const
Definition: cfg.hxx:299
void SetParentData(bool bValue=true)
Definition: cfg.hxx:298
void SetEntries(std::unique_ptr< SvxEntries > entries)
Definition: cfg.hxx:293
SvxEntries * GetEntries() const
Definition: cfg.hxx:292
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:254
bool IsMovable() const
Definition: cfg.cxx:1939
css::uno::Reference< css::graphic::XGraphic > xBackupGraphic
Definition: cfg.hxx:252
bool bIsParentData
Definition: cfg.hxx:244
bool IsPopup() const
Definition: cfg.hxx:284
bool bIsModified
Definition: cfg.hxx:245
bool bIsVisible
toolbar specific properties
Definition: cfg.hxx:248
const css::uno::Reference< css::graphic::XGraphic > & GetBackupGraphic() const
Definition: cfg.hxx:314
bool bIsUserDefined
Definition: cfg.hxx:242
SvxConfigEntry()
Definition: cfg.hxx:263
bool IsVisible() const
Definition: cfg.hxx:309
void SetMain()
Definition: cfg.hxx:295
void SetBackupGraphic(css::uno::Reference< css::graphic::XGraphic > const &graphic)
Definition: cfg.hxx:311
OUString aLabel
Definition: cfg.hxx:237
bool bIsMain
Definition: cfg.hxx:243
void SetName(const OUString &rStr)
Definition: cfg.hxx:281
void SetModified(bool bValue=true)
Definition: cfg.hxx:301
bool IsUserDefined() const
Definition: cfg.hxx:287
OUString aCommand
Definition: cfg.hxx:238
bool bPopUp
Definition: cfg.hxx:240
void SetUserDefined(bool bOn=true)
Definition: cfg.hxx:286
void SetVisible(bool b)
Definition: cfg.hxx:308
bool IsRenamable() const
Definition: cfg.cxx:1949
bool IsModified() const
Definition: cfg.hxx:302
const OUString & GetName() const
Definition: cfg.hxx:280
bool bStrEdited
Definition: cfg.hxx:241
bool HasChangedName() const
Definition: cfg.hxx:282
bool IsSeparator() const
Definition: cfg.hxx:290
sal_uInt16 nId
common properties
Definition: cfg.hxx:236
bool IsMain() const
Definition: cfg.hxx:296
bool IsBinding() const
Definition: cfg.hxx:289
~SvxConfigEntry()
Definition: cfg.cxx:1928
SvxConfigPage & m_rPage
Definition: cfg.hxx:361
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: cfg.cxx:3230
SvxConfigPageFunctionDropTarget(SvxConfigPage &rPage, weld::TreeView &rTreeView)
Definition: cfg.cxx:3224
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
Definition: cfg.cxx:1352
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:1600
OUString GetScriptURL() const
Definition: cfg.cxx:1305
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:409
OUString m_aModuleId
Definition: cfg.hxx:385
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
Definition: cfg.hxx:403
static bool CanConfig(std::u16string_view rModuleId)
Definition: cfg.cxx:163
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
Definition: cfg.hxx:393
virtual void ListModified()
Definition: cfg.hxx:498
virtual ~SvxConfigPage() override
Definition: cfg.cxx:1042
void Reset(const SfxItemSet *) override
Definition: cfg.cxx:1052
DECL_LINK(SearchUpdateHdl, weld::Entry &, void)
std::unique_ptr< weld::MenuButton > m_xGearBtn
Definition: cfg.hxx:405
std::unique_ptr< SvxConfigPageFunctionDropTarget > m_xDropTargetHelper
Definition: cfg.hxx:407
SvxConfigEntry * GetTopLevelSelection()
Definition: cfg.hxx:500
int AppendEntry(SvxConfigEntry *pNewEntryData, int nTarget)
Definition: cfg.cxx:1504
static OUString GetFrameWithDefaultAndIdentify(css::uno::Reference< css::frame::XFrame > &_inout_rxFrame)
identifies the module in the given frame.
Definition: cfg.cxx:1267
std::unique_ptr< weld::Label > m_xCategoryLabel
Definition: cfg.hxx:392
virtual void SelectElement()=0
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
Definition: cfg.hxx:390
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:421
DECL_LINK(SelectElementHdl, weld::ComboBox &, void)
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
Definition: cfg.hxx:389
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:396
int AddFunction(int nTarget, bool bAllowDuplicates)
Definition: cfg.cxx:1476
const OUString & GetFileName() const
Definition: cfg.hxx:483
bool bInitialised
Definition: cfg.hxx:374
virtual void DeleteSelectedContent()=0
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
Definition: cfg.hxx:382
void AddSubMenusToUI(std::u16string_view rBaseTitle, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:1386
DECL_LINK(FocusOut_Impl, weld::Widget &, void)
std::unique_ptr< weld::Button > m_xResetBtn
Definition: cfg.hxx:417
static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData, const SvxEntries *pEntries)
Definition: cfg.cxx:1455
virtual void DeleteSelectedTopLevel()=0
std::unique_ptr< weld::TextView > m_xDescriptionField
Definition: cfg.hxx:394
OUString GetSelectedDisplayName() const
Definition: cfg.cxx:1323
std::unique_ptr< weld::MenuButton > m_xInsertBtn
Definition: cfg.hxx:414
SvxConfigEntry * CreateCommandFromSelection(const OUString &aURL)
Definition: cfg.cxx:1427
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
Definition: cfg.hxx:395
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:410
OUString m_sAppName
Definition: cfg.hxx:423
DECL_LINK(SelectFunctionHdl, weld::TreeView &, void)
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: cfg.hxx:384
Timer m_aUpdateDataTimer
Definition: cfg.hxx:373
virtual void Init()=0
DECL_LINK(FunctionDoubleClickHdl, weld::TreeView &, bool)
bool MoveEntryData(int SourceEntry, int nTargetEntry)
Definition: cfg.cxx:1729
OUString m_sFileName
Definition: cfg.hxx:424
std::unique_ptr< weld::MenuButton > m_xModifyBtn
Definition: cfg.hxx:415
bool FillItemSet(SfxItemSet *) override
Definition: cfg.cxx:1328
std::unique_ptr< weld::Label > m_xSearchLabel
Definition: cfg.hxx:397
virtual void MoveEntry(bool bMoveUp)
Definition: cfg.cxx:1693
std::unique_ptr< weld::Button > m_xAddCommandButton
Definition: cfg.hxx:420
std::unique_ptr< weld::Label > m_xCustomizeLabel
Definition: cfg.hxx:402
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:412
const OUString & GetAppName() const
Definition: cfg.hxx:482
SaveInData * GetSaveInData()
Definition: cfg.hxx:481
SaveInData * pCurrentSaveInData
Definition: cfg.hxx:375
SvxConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &)
Definition: cfg.cxx:994
SvxEntries * FindParentForChild(SvxEntries *pParentEntries, SvxConfigEntry *pChildData)
Definition: cfg.cxx:1403
virtual short QueryReset()=0
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
Definition: cfg.hxx:406
std::unique_ptr< weld::TextView > m_xLineEditDescription
Definition: cfg.hxx:670
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
Definition: cfg.cxx:3215
void ImportGraphics(const css::uno::Sequence< OUString > &aURLs)
Definition: cfg.cxx:3048
bool ReplaceGraphicItem(const OUString &aURL)
Definition: cfg.cxx:2944
std::unique_ptr< weld::Button > m_xBtnImport
Definition: cfg.hxx:640
DECL_LINK(ImportHdl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xFtNote
Definition: cfg.hxx:639
std::unique_ptr< weld::Button > m_xBtnDelete
Definition: cfg.hxx:641
SvxIconSelectorDialog(weld::Window *pWindow, css::uno::Reference< css::ui::XImageManager > xImageManager, css::uno::Reference< css::ui::XImageManager > xParentImageManager)
Definition: cfg.cxx:2699
virtual ~SvxIconSelectorDialog() override
Definition: cfg.cxx:2855
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
Definition: cfg.hxx:635
sal_Int32 m_nExpectedSize
Definition: cfg.hxx:621
std::unique_ptr< weld::CustomWeld > m_xTbSymbolWin
Definition: cfg.hxx:638
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
Definition: cfg.cxx:2859
DECL_LINK(DeleteHdl, weld::Button &, void)
bool ImportGraphic(const OUString &aURL)
Definition: cfg.cxx:3147
std::unique_ptr< ValueSet > m_xTbSymbol
Definition: cfg.hxx:637
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
Definition: cfg.hxx:630
DECL_LINK(SelectHdl, ValueSet *, void)
css::uno::Reference< css::ui::XImageManager > m_xParentImageManager
Definition: cfg.hxx:627
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
Definition: cfg.hxx:633
css::uno::Reference< css::ui::XImageManager > m_xImageManager
Definition: cfg.hxx:624
DECL_LINK(ModifyHdl, weld::Entry &, void)
std::unique_ptr< SvxEntries > ReleaseEntries()
Definition: cfg.hxx:545
OUString m_sNewMenuEntryId
Definition: cfg.hxx:525
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
Definition: cfg.cxx:1767
virtual ~SvxMainMenuOrganizerDialog() override
Definition: cfg.cxx:1836
DECL_LINK(MoveHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xMoveUpButton
Definition: cfg.hxx:530
SvxConfigEntry * GetSelectedEntry()
Definition: cfg.cxx:1900
std::unique_ptr< weld::Widget > m_xMenuBox
Definition: cfg.hxx:527
std::unique_ptr< weld::TreeView > m_xMenuListBox
Definition: cfg.hxx:529
std::unique_ptr< weld::Entry > m_xMenuNameEdit
Definition: cfg.hxx:528
std::unique_ptr< weld::Button > m_xMoveDownButton
Definition: cfg.hxx:531
std::unique_ptr< SvxEntries > mpEntries
Definition: cfg.hxx:524
DECL_LINK(SelectHdl, weld::TreeView &, void)
void remove(int nPos)
Definition: cfg.hxx:336
int n_children() const
Definition: cfg.hxx:337
void scroll_to_row(int pos)
Definition: cfg.hxx:341
SvxMenuEntriesListBox(std::unique_ptr< weld::TreeView > xControl, SvxConfigPage *pPage)
Definition: cfg.cxx:932
void select(int pos)
Definition: cfg.hxx:342
void set_toggle(int row, TriState eState)
Definition: cfg.hxx:340
void insert(int pos, const OUString &rId)
Definition: cfg.hxx:346
VirtualDevice & get_dropdown_image() const
Definition: cfg.hxx:332
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
DECL_LINK(QueryTooltip, const weld::TreeIter &rIter, OUString)
OUString get_id(int nPos) const
Definition: cfg.hxx:335
void set_text(int row, const OUString &rText, int col)
Definition: cfg.hxx:338
weld::TreeView & get_widget()
Definition: cfg.hxx:344
std::unique_ptr< weld::TreeView > m_xControl
Definition: cfg.hxx:324
ScopedVclPtr< VirtualDevice > m_xDropDown
Definition: cfg.hxx:325
virtual ~SvxMenuEntriesListBox()
Definition: cfg.cxx:943
void CreateDropDown()
Definition: cfg.cxx:914
SvxConfigPage * m_pPage
Definition: cfg.hxx:326
int get_selected_index() const
Definition: cfg.hxx:334
virtual ~SvxNewToolbarDialog() override
Definition: cfg.cxx:2690
SvxNewToolbarDialog(weld::Window *pWindow, const OUString &rName)
Definition: cfg.cxx:2680
std::unique_ptr< weld::Entry > m_xEdtName
Definition: cfg.hxx:604
std::unique_ptr< weld::Button > m_xBtnOK
Definition: cfg.hxx:605
OUString GetName() const
Definition: cfg.hxx:612
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
Definition: cfg.hxx:607
void SetEntries(std::unique_ptr< SvxEntries >) override
Definition: cfg.cxx:2332
void SetSystemStyle(const OUString &rResourceURL, sal_Int32 nStyle)
Definition: cfg.cxx:2064
void SetSystemStyle(const css::uno::Reference< css::frame::XFrame > &xFrame, const OUString &rResourceURL, sal_Int32 nStyle)
std::unique_ptr< SvxConfigEntry > pRootEntry
Definition: cfg.hxx:553
SvxEntries * GetEntries() override
Definition: cfg.cxx:2163
void RestoreToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2539
sal_Int32 GetSystemStyle(const OUString &rResourceURL)
Definition: cfg.cxx:1976
void CreateToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2489
bool HasURL(const OUString &rURL) override
Definition: cfg.cxx:2338
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:1972
void LoadToolbar(const css::uno::Reference< css::container::XIndexAccess > &xToolBarSettings, SvxConfigEntry const *pParentData)
Definition: cfg.cxx:2603
bool Apply() override
Definition: cfg.cxx:2392
void RemoveToolbar(SvxConfigEntry *pToolbar)
Definition: cfg.cxx:2516
OUString m_aDescriptorContainer
Definition: cfg.hxx:554
bool HasSettings() override
Definition: cfg.cxx:2350
css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState
Definition: cfg.hxx:557
void Reset() override
Definition: cfg.cxx:2356
ToolbarSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)
Definition: cfg.cxx:1954
OUString GetSystemUIName(const OUString &rResourceURL)
Definition: cfg.cxx:2103
float u
TriState
sal_uInt16 nPos
std::unique_ptr< sal_Int32[]> pData
signed char sal_Int8
size_t pos