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>
37 #include <string_view>
64 typedef std::vector< SvxConfigEntry* >
SvxEntries;
69 css::uno::Reference< css::frame::XFrame >
m_xFrame;
70 DECL_LINK(ActivatePageHdl,
const OString&,
void);
75 void SetFrame(
const css::uno::Reference< css::frame::XFrame >& xFrame);
99 static css::uno::Reference
105 css::uno::Reference< css::container::XIndexContainer >
const & rMenuBar,
106 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
110 const css::uno::Reference< css::container::XIndexAccess >& xMenuSettings,
111 const OUString& rBaseTitle,
SvxConfigEntry const * pParentData,
bool bContextMenu );
116 const css::uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr,
117 const css::uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr,
118 const OUString& aModuleId,
124 const css::uno::Reference< css::uno::XInterface >& xManager );
132 const css::uno::Reference
133 < css::ui::XUIConfigurationManager >&
136 const css::uno::Reference
137 < css::ui::XUIConfigurationManager >&
140 const css::uno::Reference
141 < css::ui::XImageManager >&
144 const css::uno::Reference
145 < css::ui::XImageManager >&
154 css::uno::Reference<css::graphic::XGraphic>
GetImage(
const OUString& rCommandURL);
156 virtual bool HasURL(
const OUString& aURL ) = 0;
159 virtual void SetEntries( std::unique_ptr<SvxEntries> ) = 0;
160 virtual void Reset() = 0;
161 virtual bool Apply() = 0;
183 css::uno::Reference< css::container::XIndexContainer >
const & rNewMenuBar,
184 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory );
189 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
190 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
191 const OUString& aModuleId,
198 void SetEntries( std::unique_ptr<SvxEntries> )
override;
199 bool HasURL(
const OUString& )
override {
return false; }
201 void Reset()
override;
202 bool Apply()
override;
210 OUString
GetUIName(
const OUString& rResourceURL );
214 const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
215 const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
216 const OUString& aModuleId,
bool bIsDocConfig );
220 void SetEntries( std::unique_ptr<SvxEntries> pNewEntries )
override;
222 bool HasURL(
const OUString& rURL )
override;
223 void Reset()
override;
224 bool Apply()
override;
257 const OUString& rCommandURL,
266 bIsUserDefined(
false ),
268 bIsParentData(
false ),
269 bIsModified(
false ),
279 void SetName(
const OUString& rStr ) { aLabel = rStr; bStrEdited =
true; }
291 void SetEntries( std::unique_ptr<SvxEntries> entries ) { mpEntries = std::move(entries); }
310 { xBackupGraphic = graphic; }
316 void SetStyle( sal_Int32 style ) { nStyle = style; }
333 OUString
get_id(
int nPos)
const {
return m_xControl->get_id(nPos); }
334 void remove(
int nPos) { m_xControl->remove(
nPos); }
336 void set_text(
int row,
const OUString& rText,
int col) { m_xControl->set_text(row, rText, col); }
337 void clear() { m_xControl->clear(); }
340 void select(
int pos) { m_xControl->select(pos); }
344 void insert(
int pos,
const OUString& rId)
346 m_xControl->insert(
nullptr, pos,
nullptr, &rId,
347 nullptr,
nullptr,
false,
nullptr);
381 css::uno::Reference< css::frame::XFrame >
m_xFrame;
434 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
435 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
436 const OUString& aModuleId,
437 bool docConfig ) = 0;
439 virtual void Init() = 0;
459 const OUString& sUIItemCommand,
476 static bool CanConfig( std::u16string_view rModuleId );
483 bool bAllowDuplicates);
499 return weld::fromId<SvxConfigEntry*>(m_xTopLevelListBox->get_active_id());
557 const css::uno::Reference< css::container::XIndexAccess >& xToolBarSettings,
561 css::uno::Reference< css::container::XIndexContainer >
const & rNewToolbarBar,
562 css::uno::Reference< css::lang::XSingleComponentFactory >& rFactory,
568 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
569 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
570 const OUString& aModuleId,
584 void SetSystemStyle(
const OUString& rResourceURL, sal_Int32 nStyle );
587 const css::uno::Reference< css::frame::XFrame >& xFrame,
588 const OUString& rResourceURL, sal_Int32 nStyle );
591 void SetEntries( std::unique_ptr<SvxEntries> )
override;
593 bool HasURL(
const OUString& rURL )
override;
594 void Reset()
override;
595 bool Apply()
override;
611 return m_xEdtName->get_text();
632 std::vector<css::uno::Reference<css::graphic::XGraphic>>
m_aGraphics;
644 void ImportGraphics(
const css::uno::Sequence< OUString >& aURLs );
650 const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
651 const css::uno::Reference< css::ui::XImageManager >& rXParentImageManager);
655 css::uno::Reference< css::graphic::XGraphic >
bool bIsVisible
toolbar specific properties
bool ReplaceGraphicItem(const OUString &aURL)
constexpr OUStringLiteral aMenuSeparatorStr
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
SvxEntries * GetEntries() const
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL
virtual short QueryReset()=0
std::unique_ptr< weld::Button > m_xResetBtn
std::unique_ptr< weld::Button > m_xMoveDownButton
const OUString & GetFileName() const
const css::uno::Reference< css::ui::XImageManager > & GetImageManager() const
const OUString & GetName() const
std::unique_ptr< weld::Widget > m_xMenuBox
std::unique_ptr< weld::MenuButton > m_xModifyBtn
std::unique_ptr< CommandCategoryListBox > m_xCommandCategoryListBox
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
std::unique_ptr< SvxEntries > ReleaseEntries()
virtual ~SvxMainMenuOrganizerDialog() override
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
void SetModified(bool bValue=true)
constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER
std::unique_ptr< SvxConfigPageFunctionDropTarget > m_xDropTargetHelper
virtual SaveInData * CreateSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)=0
void Reset(const SfxItemSet *) override
css::uno::Reference< css::frame::XFrame > m_xFrame
std::unique_ptr< weld::Button > m_xBtnImport
SvxConfigEntry * GetTopLevelSelection()
std::unique_ptr< weld::Button > m_xRemoveCommandButton
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
void SetBackupGraphic(css::uno::Reference< css::graphic::XGraphic > const &graphic)
constexpr OUStringLiteral ITEM_DESCRIPTOR_ISVISIBLE
constexpr OUStringLiteral notebookbarTabScope
DECL_LINK(SelectHdl, ValueSet *, void)
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetConfigManager() const
css::uno::Reference< css::ui::XImageManager > m_xParentImageManager
void UpdateButtonStates()
virtual void MoveEntry(bool bMoveUp)
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
constexpr OUStringLiteral CUSTOM_TOOLBAR_STR
std::unique_ptr< weld::Label > m_xCategoryLabel
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
constexpr OUStringLiteral ITEM_DESCRIPTOR_RESOURCEURL
SvxIconSelectorDialog(weld::Window *pWindow, const css::uno::Reference< css::ui::XImageManager > &rXImageManager, const css::uno::Reference< css::ui::XImageManager > &rXParentImageManager)
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
std::unique_ptr< weld::Entry > m_xMenuNameEdit
std::vector< SvxConfigEntry * > SvxEntries
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
const OUString & GetCommand() const
constexpr OUStringLiteral ITEM_MENUBAR_URL
std::unique_ptr< weld::CustomWeld > m_xTbSymbolWin
virtual void ListModified()
css::uno::Reference< css::graphic::XGraphic > xBackupGraphic
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
bool FillItemSet(SfxItemSet *) override
void LoadSubMenus(const css::uno::Reference< css::container::XIndexAccess > &xMenuSettings, const OUString &rBaseTitle, SvxConfigEntry const *pParentData, bool bContextMenu)
void ApplyMenu(css::uno::Reference< css::container::XIndexContainer > const &rMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry *pMenuData)
std::unique_ptr< weld::Label > m_xDescriptionFieldLb
virtual SvxEntries * GetEntries()=0
std::unique_ptr< weld::Label > m_xFtNote
void InsertEntryIntoNotebookbarTabUI(std::u16string_view sClassId, const OUString &sUIItemId, const OUString &sUIItemCommand, weld::TreeView &rTreeView, const weld::TreeIter &rIter)
css::uno::Reference< css::ui::XImageManager > m_xImgMgr
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE
void SetName(const OUString &rStr)
constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME
constexpr OUStringLiteral ITEM_TOOLBAR_URL
std::unique_ptr< weld::Button > m_xMoveUpButton
bool IsParentData() const
css::uno::Reference< css::ui::XUIConfigurationManager > m_xCfgMgr
static bool CanConfig(std::u16string_view rModuleId)
int AppendEntry(SvxConfigEntry *pNewEntryData, int nTarget)
DECL_LINK(SearchUpdateHdl, weld::Entry &, void)
static css::uno::Reference< css::ui::XImageManager > * xDefaultImgMgr
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetParentConfigManager() const
void SetEntries(std::unique_ptr< SvxEntries > entries)
void SetParentData(bool bValue=true)
const css::uno::Reference< css::graphic::XGraphic > & GetBackupGraphic() const
SvxEntries * FindParentForChild(SvxEntries *pParentEntries, SvxConfigEntry *pChildData)
virtual void DeleteSelectedTopLevel()=0
css::uno::Reference< css::container::XNameAccess > m_xCommandToLabelMap
void SetUserDefined(bool bOn=true)
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
SvxConfigEntry * CreateCommandFromSelection(const OUString &aURL)
const OUString & GetAppName() const
std::unique_ptr< ValueSet > m_xTbSymbol
sal_uInt16 nId
common properties
virtual ~SvxIconSelectorDialog() override
std::unique_ptr< weld::Label > m_xSearchLabel
css::uno::Reference< css::ui::XImageManager > m_xParentImgMgr
void SetStyle(sal_Int32 style)
OUString GetScriptURL() const
sal_Int32 m_nExpectedSize
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
virtual void DeleteSelectedContent()=0
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
std::unique_ptr< weld::TextView > m_xLineEditDescription
SaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &xCfgMgr, const css::uno::Reference< css::ui::XUIConfigurationManager > &xParentCfgMgr, const OUString &aModuleId, bool docConfig)
bool ImportGraphic(const OUString &aURL)
OUString GetSelectedDisplayName() const
std::unique_ptr< weld::MenuButton > m_xInsertBtn
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL
std::unique_ptr< weld::Entry > m_xSearchEdit
OUString m_sNewMenuEntryId
std::unique_ptr< SvxEntries > mpEntries
sal_Int32 GetStyle() const
bool IsUserDefined() const
SaveInData * pCurrentSaveInData
virtual ~SvxConfigPage() override
const css::uno::Reference< css::ui::XImageManager > & GetParentImageManager() const
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE
std::unique_ptr< SvxEntries > mpEntries
bool MoveEntryData(int SourceEntry, int nTargetEntry)
css::uno::Reference< css::ui::XImageManager > m_xImageManager
virtual void UpdateButtonStates()=0
DECL_LINK(ActivatePageHdl, const OString &, void)
void InsertEntryIntoUI(SvxConfigEntry *pNewEntryData, weld::TreeView &rTreeView, int nPos, bool bMenu=false)
DECL_LINK(MoveHdl, weld::Button &, void)
static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData, const SvxEntries *pEntries)
void SetModified(bool bValue=true)
std::unique_ptr< weld::Label > m_xCustomizeLabel
int AddFunction(int nTarget, bool bAllowDuplicates)
void AddSubMenusToUI(std::u16string_view rBaseTitle, SvxConfigEntry const *pParentData)
virtual bool HasSettings()=0
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
std::unique_ptr< weld::Label > m_xLeftFunctionLabel
SvxConfigDialog(weld::Window *, const SfxItemSet *)
void ImportGraphics(const css::uno::Sequence< OUString > &aURLs)
SvxConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &)
std::unique_ptr< weld::Button > m_xBtnDelete
SvxConfigPageFunctionDropTarget(SvxConfigPage &rPage, weld::TreeView &rTreeView)
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
virtual bool HasURL(const OUString &aURL)=0
SvxConfigEntry * GetSelectedEntry()
std::unique_ptr< weld::TreeView > m_xMenuListBox
std::unique_ptr< weld::TextView > m_xDescriptionField
std::unique_ptr< weld::Button > m_xMoveDownButton
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
static OUString GetFrameWithDefaultAndIdentify(css::uno::Reference< css::frame::XFrame > &_inout_rxFrame)
identifies the module in the given frame.
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
std::unique_ptr< weld::Button > m_xMoveUpButton
std::unique_ptr< weld::MenuButton > m_xGearBtn
css::uno::Reference< css::frame::XFrame > m_xFrame
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
SaveInData * GetSaveInData()
virtual void SelectElement()=0
std::unique_ptr< weld::Button > m_xAddCommandButton
bool m_bDetectedRangeSegmentation false
virtual void SetEntries(std::unique_ptr< SvxEntries >)=0
bool HasChangedName() const