19#ifndef INCLUDED_SFX2_TABDLG_HXX
20#define INCLUDED_SFX2_TABDLG_HXX
23#include <unordered_map>
48#define RET_USER_CANCEL 101
115 const SfxItemSet * =
nullptr,
bool bEditFmt =
false);
123 sal_uInt16 nPageCreateId);
126 const OUString& rLabel,
130 const OUString& rLabel,
131 sal_uInt16 nPageCreateId);
154 virtual short run()
override;
155 static bool runAsync(
const std::shared_ptr<SfxTabDialogController>& rController,
156 const std::function<
void(sal_Int32)>&);
164 void Applied() { m_xExampleSet->Put(*GetInputSetImpl()); }
187friend class SfxTabDialog;
201 sal_uInt16
GetWhich( sal_uInt16 nSlot,
bool bDeep =
true )
const
214 return static_cast<const T*
>(GetOldItem(
rSet, sal_uInt16(nSlot), bDeep));
236 virtual bool DeferResetToFirstActivation();
240 return mbHasExchangeSupport;
245 mbHasExchangeSupport =
true;
252 maUserString = rString;
258 virtual void FillUserData();
261 virtual void ChangesApplied();
265 return static_cast<const T*
>(
GetItem(
rSet, sal_uInt16(nSlot), bDeep));
268 void SetFrame(
const css::uno::Reference< css::frame::XFrame >& xFrame);
269 css::uno::Reference< css::frame::XFrame > GetFrame()
const;
271 const SfxItemSet* GetDialogExampleSet()
const;
273 OUString GetHelpId()
const;
281 return maAdditionalProperties;
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SfxItemPool * GetPool() const
virtual SfxSetItem * Clone(SfxItemPool *pPool=nullptr) const override=0
std::unique_ptr< SfxItemSet > m_pSet
DECL_DLLPRIVATE_LINK(BaseFmtHdl, weld::Button &, void)
DECL_LINK(OkHdl, weld::Button &, void)
void AddTabPage(const OUString &rName, sal_uInt16 nPageCreateId)
bool PrepareLeaveCurrentPage()
prepare to leave the current page.
void AddTabPage(const OUString &rName, const OUString &rLabel, sal_uInt16 nPageCreateId)
DECL_DLLPRIVATE_LINK(CancelHdl, weld::Button &, void)
SfxTabPage * GetTabPage(std::u16string_view rPageId) const
void SetCurPageId(const OUString &rName)
OUString GetCurPageId() const
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
void SetInputSet(const SfxItemSet *pInSet)
std::unique_ptr< TabDlg_Impl > m_pImpl
virtual const SfxItemSet * GetExampleSet() const override
void SavePosAndId()
save the position of the TabDialog and which tab page is the currently active one
weld::Button * GetUserButton() const
std::unique_ptr< weld::Button > m_xCancelBtn
weld::Button & GetCancelButton() const
DECL_DLLPRIVATE_LINK(DeactivatePageHdl, const OUString &, bool)
SfxTabPage * GetCurTabPage() const
DECL_DLLPRIVATE_LINK(ResetHdl, weld::Button &, void)
SAL_DLLPRIVATE void Start_Impl()
std::unique_ptr< weld::Button > m_xResetBtn
std::unique_ptr< SfxItemSet > m_pOutSet
void RemoveTabPage(const OUString &rName)
std::unique_ptr< SfxAllItemSet > m_xItemSet
std::unique_ptr< weld::Button > m_xUserBtn
virtual short run() override
std::unique_ptr< SfxItemSet > m_xExampleSet
OUString GetScreenshotId() const
void RemoveStandardButton()
std::unique_ptr< weld::Button > m_xBaseFmtBtn
virtual weld::Button & GetOKButton() const override
WhichRangesContainer m_pRanges
DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OUString &, void)
std::unique_ptr< weld::Notebook > m_xTabCtrl
virtual void ActivatePage(const OUString &rPage)
std::unique_ptr< weld::Button > m_xOKBtn
virtual SfxItemSet * CreateInputItemSet(const OUString &rName)
virtual void PageCreated(const OUString &rName, SfxTabPage &rPage)
void AddTabPage(const OUString &rName, const OUString &rLabel, CreateTabPage pCreateFunc)
SAL_DLLPRIVATE void setPreviewsToSamePlace()
virtual void RefreshInputSet()
std::vector< OUString > getAllPageUIXMLDescriptions() const
weld::Button * GetResetButton() const
void SetApplyHandler(const Link< weld::Button &, void > &_rHdl)
const SfxItemSet * GetOutputItemSet() const
BitmapEx createScreenshot() const
void ShowPage(const OUString &rName)
std::unique_ptr< weld::Button > m_xApplyBtn
weld::Button * GetStandardButton() const
const WhichRangesContainer & GetInputRanges(const SfxItemPool &)
std::unique_ptr< weld::SizeGroup > m_xSizeGroup
DECL_DLLPRIVATE_LINK(UserHdl, weld::Button &, void)
SAL_DLLPRIVATE void CreatePages()
static bool runAsync(const std::shared_ptr< SfxTabDialogController > &rController, const std::function< void(sal_Int32)> &)
SfxItemSet * GetInputSetImpl()
weld::Button * GetApplyButton() const
virtual ~SfxTabDialogController() override
bool selectPageByUIXMLDescription(const OUString &rUIXMLDescription)
bool DeactivatePage(std::u16string_view aPage)
bool HasExchangeSupport() const
const T * GetOldItem(const SfxItemSet &rSet, TypedWhichId< T > nSlot, bool bDeep=true)
std::unordered_map< OUString, css::uno::Any > maAdditionalProperties
static const T * GetItem(const SfxItemSet &rSet, TypedWhichId< T > nSlot, bool bDeep=true)
void set_visible(bool bVisible)
std::unique_ptr< TabPageImpl > mpImpl
const SfxItemSet & GetItemSet() const
void SetExchangeSupport()
void SetUserData(const OUString &rString)
OUString GetConfigId() const
std::unordered_map< OUString, css::uno::Any > & getAdditionalProperties()
const OUString & GetUserData() const
bool mbHasExchangeSupport
TypedWhichId< T > GetWhich(TypedWhichId< T > nSlot, bool bDeep=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
Reference< XNameAccess > m_xContainer
std::unique_ptr< SfxTabPage >(* CreateTabPage)(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
WhichRangesContainer(* GetTabPageRanges)()