Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / cui / source / inc / cfg.hxx
blobaaf15b5a870c9af4bb7193cf4f5201c2e542df3b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <vcl/timer.hxx>
23 #include <vcl/weld.hxx>
24 #include <vcl/weldutils.hxx>
25 #include <svtools/valueset.hxx>
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>
35 #include <sfx2/tabdlg.hxx>
36 #include <memory>
37 #include <string_view>
38 #include <vector>
40 #include "cfgutil.hxx"
41 #include "CommandCategoryListBox.hxx"
43 inline constexpr OUStringLiteral notebookbarTabScope = u"notebookbarTabScope";
45 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
46 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer";
47 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
48 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
49 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
50 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE = u"IsVisible";
51 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_RESOURCEURL = u"ResourceURL";
52 inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
54 inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
55 inline constexpr OUStringLiteral ITEM_TOOLBAR_URL = u"private:resource/toolbar/";
56 inline constexpr OUStringLiteral ITEM_EVENT_URL = u"private:resource/event/";
58 inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
60 inline constexpr OUStringLiteral aMenuSeparatorStr = u" | ";
62 class SvxConfigEntry;
63 class SvxConfigPage;
65 typedef std::vector< SvxConfigEntry* > SvxEntries;
67 class SvxConfigDialog : public SfxTabDialogController
69 private:
70 css::uno::Reference< css::frame::XFrame > m_xFrame;
72 virtual void ActivatePage(const OUString& rPage) override;
74 public:
75 SvxConfigDialog(weld::Window*, const SfxItemSet*);
77 virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
78 void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame);
81 class SaveInData
83 private:
85 bool bModified;
87 bool bDocConfig;
88 bool bReadOnly;
90 css::uno::Reference
91 < css::ui::XUIConfigurationManager > m_xCfgMgr;
93 css::uno::Reference
94 < css::ui::XUIConfigurationManager > m_xParentCfgMgr;
96 css::uno::Reference
97 < css::ui::XImageManager > m_xImgMgr;
99 css::uno::Reference
100 < css::ui::XImageManager > m_xParentImgMgr;
102 static css::uno::Reference
103 < css::ui::XImageManager >* xDefaultImgMgr;
105 protected:
107 void ApplyMenu(
108 css::uno::Reference< css::container::XIndexContainer > const & rMenuBar,
109 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
110 SvxConfigEntry *pMenuData );
112 void LoadSubMenus(
113 const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
114 const OUString& rBaseTitle, SvxConfigEntry const * pParentData, bool bContextMenu );
116 public:
118 SaveInData(
119 css::uno::Reference < css::ui::XUIConfigurationManager > xCfgMgr,
120 css::uno::Reference < css::ui::XUIConfigurationManager > xParentCfgMgr,
121 const OUString& aModuleId,
122 bool docConfig );
124 virtual ~SaveInData() {}
126 bool PersistChanges(
127 const css::uno::Reference< css::uno::XInterface >& xManager );
129 void SetModified( bool bValue = true ) { bModified = bValue; }
130 bool IsModified( ) const { return bModified; }
132 bool IsReadOnly( ) const { return bReadOnly; }
133 bool IsDocConfig( ) const { return bDocConfig; }
135 const css::uno::Reference
136 < css::ui::XUIConfigurationManager >&
137 GetConfigManager() const { return m_xCfgMgr; };
139 const css::uno::Reference
140 < css::ui::XUIConfigurationManager >&
141 GetParentConfigManager() const { return m_xParentCfgMgr; };
143 const css::uno::Reference
144 < css::ui::XImageManager >&
145 GetImageManager() const { return m_xImgMgr; };
147 const css::uno::Reference
148 < css::ui::XImageManager >&
149 GetParentImageManager() const { return m_xParentImgMgr; };
151 css::uno::Reference
152 < css::container::XNameAccess > m_xCommandToLabelMap;
154 css::uno::Sequence
155 < css::beans::PropertyValue > m_aSeparatorSeq;
157 css::uno::Reference<css::graphic::XGraphic> GetImage(const OUString& rCommandURL);
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;
167 class MenuSaveInData : public SaveInData
169 private:
171 OUString m_aMenuResourceURL;
172 OUString m_aDescriptorContainer;
174 css::uno::Reference
175 < css::container::XIndexAccess > m_xMenuSettings;
177 std::unique_ptr<SvxConfigEntry> pRootEntry;
180 static MenuSaveInData* pDefaultData; ///< static holder of the default menu data
182 static void SetDefaultData( MenuSaveInData* pData ) {pDefaultData = pData;}
183 static MenuSaveInData* GetDefaultData() { return pDefaultData; }
185 void Apply(
186 css::uno::Reference< css::container::XIndexContainer > const & rNewMenuBar,
187 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
189 public:
191 MenuSaveInData(
192 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
193 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
194 const OUString& aModuleId,
195 bool docConfig );
197 virtual ~MenuSaveInData() override;
199 /// methods inherited from SaveInData
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;
208 class ContextMenuSaveInData : public SaveInData
210 private:
211 std::unique_ptr< SvxConfigEntry > m_pRootEntry;
212 css::uno::Reference< css::container::XNameAccess > m_xPersistentWindowState;
213 OUString GetUIName( const OUString& rResourceURL );
215 public:
216 ContextMenuSaveInData(
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;
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;
229 void ResetContextMenu( const SvxConfigEntry* pEntry );
232 class SvxConfigEntry
234 private:
236 /// common properties
237 sal_uInt16 nId;
238 OUString aLabel;
239 OUString aCommand;
241 bool bPopUp;
242 bool bStrEdited;
243 bool bIsUserDefined;
244 bool bIsMain;
245 bool bIsParentData;
246 bool bIsModified;
248 /// toolbar specific properties
249 bool bIsVisible;
250 sal_Int32 nStyle;
252 css::uno::Reference<
253 css::graphic::XGraphic > xBackupGraphic;
255 std::unique_ptr<SvxEntries> mpEntries;
257 public:
259 SvxConfigEntry( OUString aDisplayName,
260 OUString aCommandURL,
261 bool bPopup,
262 bool bParentData );
264 SvxConfigEntry()
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 )
277 ~SvxConfigEntry();
279 const OUString& GetCommand() const { return aCommand; }
281 const OUString& GetName() const { return aLabel; }
282 void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; }
283 bool HasChangedName() const { return bStrEdited; }
285 bool IsPopup() const { return bPopUp; }
287 void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; }
288 bool IsUserDefined() const { return bIsUserDefined; }
290 bool IsBinding() const { return !bPopUp; }
291 bool IsSeparator() const { return nId == 0; }
293 SvxEntries* GetEntries() const { return mpEntries.get(); }
294 void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
296 void SetMain() { bIsMain = true; }
297 bool IsMain() const { return bIsMain; }
299 void SetParentData( bool bValue = true ) { bIsParentData = bValue; }
300 bool IsParentData() const { return bIsParentData; }
302 void SetModified( bool bValue = true ) { bIsModified = bValue; }
303 bool IsModified() const { return bIsModified; }
305 bool IsMovable() const;
306 bool IsDeletable() const;
307 bool IsRenamable() const;
309 void SetVisible( bool b ) { bIsVisible = b; }
310 bool IsVisible() const { return bIsVisible; }
312 void SetBackupGraphic( css::uno::Reference< css::graphic::XGraphic > const & graphic )
313 { xBackupGraphic = graphic; }
315 const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic() const
316 { return xBackupGraphic; }
318 sal_Int32 GetStyle() const { return nStyle; }
319 void SetStyle( sal_Int32 style ) { nStyle = style; }
322 class SvxMenuEntriesListBox
324 protected:
325 std::unique_ptr<weld::TreeView> m_xControl;
326 ScopedVclPtr<VirtualDevice> m_xDropDown;
327 SvxConfigPage* m_pPage;
329 public:
330 SvxMenuEntriesListBox(std::unique_ptr<weld::TreeView> xControl, SvxConfigPage* pPage);
331 virtual ~SvxMenuEntriesListBox();
333 VirtualDevice& get_dropdown_image() const { return *m_xDropDown; }
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); }
345 weld::TreeView& get_widget() { return *m_xControl; }
347 void insert(int pos, const OUString& rId)
349 m_xControl->insert(nullptr, pos, nullptr, &rId,
350 nullptr, nullptr, false, nullptr);
353 DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
354 DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
356 void CreateDropDown();
359 class SvxConfigPageFunctionDropTarget : public weld::ReorderingDropTarget
361 private:
362 SvxConfigPage& m_rPage;
364 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
366 public:
367 SvxConfigPageFunctionDropTarget(SvxConfigPage&rPage, weld::TreeView& rTreeView);
370 class SvxConfigPage : public SfxTabPage
372 private:
374 Timer m_aUpdateDataTimer;
375 bool bInitialised;
376 SaveInData* pCurrentSaveInData;
378 DECL_LINK(SearchUpdateHdl, weld::Entry&, void);
380 protected:
382 /// the ResourceURL to select when opening the dialog
383 OUString m_aURLToSelect;
385 css::uno::Reference< css::frame::XFrame > m_xFrame;
386 OUString m_aModuleId;
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;
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;
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;
410 std::unique_ptr<weld::Button> m_xMoveUpButton;
411 std::unique_ptr<weld::Button> m_xMoveDownButton;
413 std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
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;
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;
426 OUString m_sAppName;
427 OUString m_sFileName;
429 SvxConfigPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
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);
439 virtual SaveInData* CreateSaveInData(
440 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
441 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
442 const OUString& aModuleId,
443 bool docConfig ) = 0;
445 virtual void Init() = 0;
446 virtual void UpdateButtonStates() = 0;
447 virtual short QueryReset() = 0;
449 virtual void SelectElement() = 0;
451 int AppendEntry(SvxConfigEntry* pNewEntryData,
452 int nTarget);
454 void AddSubMenusToUI( std::u16string_view rBaseTitle,
455 SvxConfigEntry const * pParentData );
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);
464 void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString& sUIItemId,
465 const OUString& sUIItemCommand,
466 weld::TreeView& rTreeView, const weld::TreeIter& rIter);
468 SvxEntries* FindParentForChild( SvxEntries* pParentEntries,
469 SvxConfigEntry* pChildData );
471 void ReloadTopLevelListBox( SvxConfigEntry const * pSelection = nullptr );
473 static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData,
474 const SvxEntries *pEntries);
476 SvxConfigEntry *CreateCommandFromSelection(const OUString &aURL);
478 public:
480 virtual ~SvxConfigPage() override;
482 static bool CanConfig( std::u16string_view rModuleId );
484 SaveInData* GetSaveInData() { return pCurrentSaveInData; }
485 const OUString& GetAppName() const { return m_sAppName; }
486 const OUString& GetFileName() const { return m_sFileName; }
488 int AddFunction(int nTarget,
489 bool bAllowDuplicates);
491 virtual void MoveEntry( bool bMoveUp );
493 bool MoveEntryData(int SourceEntry, int nTargetEntry);
495 bool FillItemSet( SfxItemSet* ) override;
496 void Reset( const SfxItemSet* ) override;
498 virtual void DeleteSelectedContent() = 0;
499 virtual void DeleteSelectedTopLevel() = 0;
501 virtual void ListModified() {}
503 SvxConfigEntry* GetTopLevelSelection()
505 return weld::fromId<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id());
508 /** identifies the module in the given frame. If the frame is <NULL/>, a default
509 frame will be determined beforehand.
511 If the given frame is <NULL/>, a default frame will be used: The method the active
512 frame of the desktop, then the current frame. If both are <NULL/>,
513 the SfxViewFrame::Current's XFrame is used. If this is <NULL/>, too, an empty string is returned.
515 If the given frame is not <NULL/>, or a default frame could be successfully determined, then
516 the ModuleManager is asked for the module ID of the component in the frame.
518 static OUString
519 GetFrameWithDefaultAndIdentify( css::uno::Reference< css::frame::XFrame >& _inout_rxFrame );
521 OUString GetScriptURL() const;
522 OUString GetSelectedDisplayName() const;
525 class SvxMainMenuOrganizerDialog : public weld::GenericDialogController
527 std::unique_ptr<SvxEntries> mpEntries;
528 OUString m_sNewMenuEntryId;
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;
536 void UpdateButtonStates();
538 DECL_LINK(MoveHdl, weld::Button&, void);
539 DECL_LINK(ModifyHdl, weld::Entry&, void);
540 DECL_LINK(SelectHdl, weld::TreeView&, void);
542 public:
543 SvxMainMenuOrganizerDialog(
544 weld::Window*, SvxEntries*,
545 SvxConfigEntry const *, bool bCreateMenu);
546 virtual ~SvxMainMenuOrganizerDialog() override;
548 std::unique_ptr<SvxEntries> ReleaseEntries() { return std::move(mpEntries);}
549 SvxConfigEntry* GetSelectedEntry();
552 class ToolbarSaveInData : public SaveInData
554 private:
556 std::unique_ptr<SvxConfigEntry> pRootEntry;
557 OUString m_aDescriptorContainer;
559 css::uno::Reference
560 < css::container::XNameAccess > m_xPersistentWindowState;
562 void LoadToolbar(
563 const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
564 SvxConfigEntry const * pParentData );
566 void ApplyToolbar(
567 css::uno::Reference< css::container::XIndexContainer > const & rNewToolbarBar,
568 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
569 SvxConfigEntry const *pToolbar );
571 public:
573 ToolbarSaveInData(
574 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
575 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
576 const OUString& aModuleId,
577 bool docConfig );
579 virtual ~ToolbarSaveInData() override;
581 void CreateToolbar( SvxConfigEntry* pToolbar );
582 void RestoreToolbar( SvxConfigEntry* pToolbar );
583 void RemoveToolbar( SvxConfigEntry* pToolbar );
584 void ApplyToolbar( SvxConfigEntry* pToolbar );
586 OUString GetSystemUIName( const OUString& rResourceURL );
588 sal_Int32 GetSystemStyle( const OUString& rResourceURL );
590 void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle );
592 void SetSystemStyle(
593 const css::uno::Reference< css::frame::XFrame >& xFrame,
594 const OUString& rResourceURL, sal_Int32 nStyle );
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;
604 class SvxNewToolbarDialog : public weld::GenericDialogController
606 private:
607 std::unique_ptr<weld::Entry> m_xEdtName;
608 public:
609 std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
611 SvxNewToolbarDialog(weld::Window* pWindow, const OUString& rName);
612 virtual ~SvxNewToolbarDialog() override;
614 OUString GetName() const
616 return m_xEdtName->get_text();
620 class SvxIconSelectorDialog : public weld::GenericDialogController
622 private:
623 sal_Int32 m_nExpectedSize;
625 css::uno::Reference<
626 css::ui::XImageManager > m_xImageManager;
628 css::uno::Reference<
629 css::ui::XImageManager > m_xParentImageManager;
631 css::uno::Reference<
632 css::ui::XImageManager > m_xImportedImageManager;
634 css::uno::Reference<
635 css::graphic::XGraphicProvider > m_xGraphProvider;
637 std::vector<css::uno::Reference<css::graphic::XGraphic>> m_aGraphics;
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;
645 bool ReplaceGraphicItem( const OUString& aURL );
647 bool ImportGraphic( const OUString& aURL );
649 void ImportGraphics( const css::uno::Sequence< OUString >& aURLs );
651 public:
653 SvxIconSelectorDialog(
654 weld::Window *pWindow,
655 css::uno::Reference< css::ui::XImageManager > xImageManager,
656 css::uno::Reference< css::ui::XImageManager > xParentImageManager);
658 virtual ~SvxIconSelectorDialog() override;
660 css::uno::Reference< css::graphic::XGraphic >
661 GetSelectedIcon();
663 DECL_LINK(SelectHdl, ValueSet*, void);
664 DECL_LINK(ImportHdl, weld::Button&, void);
665 DECL_LINK(DeleteHdl, weld::Button&, void);
668 //added for issue83555
669 class SvxIconChangeDialog : public weld::MessageDialogController
671 private:
672 std::unique_ptr<weld::TextView> m_xLineEditDescription;
673 public:
674 SvxIconChangeDialog(weld::Window *pWindow, const OUString& rMessage);
677 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */