22#include <osl/diagnose.h>
33#include <svx/svxids.hrc>
38using ::com::sun::star::uno::Reference;
39using ::com::sun::star::frame::XFrame;
49 , aRdOnlyForwarder ( SID_READONLY_MODE, *this )
64 if (!(eState == SfxItemState::DEFAULT &&
pParent))
69 case SID_HYPERLINK_GETLINK :
74 case SID_READONLY_MODE :
91 , maCtrl ( SID_HYPERLINK_GETLINK, *pBindings, this )
92 , mbIsHTMLDoc ( false )
93 , m_xIconCtrl(m_xBuilder->weld_notebook(
"tabcontrol"))
94 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
95 , m_xApplyBtn(m_xBuilder->weld_button(
"apply"))
96 , m_xCancelBtn(m_xBuilder->weld_button(
"cancel"))
97 , m_xHelpBtn(m_xBuilder->weld_button(
"help"))
98 , m_xResetBtn(m_xBuilder->weld_button(
"reset"))
159 SvtViewOptions aViewOpt( EViewType::TabDialog, OUString::number(SID_HYPERLINK_DIALOG) );
185 pViewFrame->ToggleChildWindow(SID_HYPERLINK_DIALOG);
198 if ( !aItem->
GetURL().isEmpty() )
200 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { aItem });
229 OUString sPageId(
"internet");
231 OUString aStrURL(pItem->
GetURL());
235 switch ( eProtocolTyp )
237 case INetProtocol::Http :
238 case INetProtocol::Ftp :
239 sPageId =
"internet";
241 case INetProtocol::File :
242 sPageId =
"document";
244 case INetProtocol::Mailto :
248 if (aStrURL.startsWith(
"#"))
249 sPageId =
"document";
268 aPageSet.
Put ( *pItem );
270 pCurrentPage->
Reset( aPageSet );
293 OSL_ENSURE( xDocumentFrame.is(),
"SvxHpLinkDlg::PageCreated: macro assignment functionality won't work with a proper frame!" );
SfxApplication * SfxGetpApp()
Reference< XExecutableDialog > m_xDialog
const SfxItemSet & GetItemSet() const
void Update(sal_uInt16 nId)
css::uno::Reference< css::frame::XFrame > GetActiveFrame() const
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
const WhichRangesContainer & GetRanges() const
SfxItemPool * GetPool() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxBindings & GetBindings() const
virtual void Activate() override
SfxItemPool & GetPool() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
SfxStatusForwarder aRdOnlyForwarder
SvxHlinkCtrl(sal_uInt16 nId, SfxBindings &rBindings, SvxHpLinkDlg *pDlg)
virtual void dispose() override
virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
IconChoicePage * GetTabPage(std::u16string_view rPageId)
std::unique_ptr< weld::Button > m_xCancelBtn
void PageCreated(IconChoicePage &rPage)
WhichRangesContainer pRanges
void SetPage(SvxHyperlinkItem const *pItem)
const OUString & GetCurPageId() const
std::unique_ptr< weld::Button > m_xApplyBtn
void SetReadOnlyMode(bool bReadOnly)
std::unique_ptr< weld::Button > m_xHelpBtn
SfxDispatcher * GetDispatcher() const
SvxHpLinkDlg(SfxBindings *pBindings, SfxChildWindow *pChild, weld::Window *pParent)
std::unique_ptr< weld::Button > m_xOKBtn
std::vector< std::unique_ptr< IconChoicePageData > > maPageList
virtual ~SvxHpLinkDlg() override
std::unique_ptr< SfxItemSet > pOutSet
virtual void Close() override
std::unique_ptr< SfxItemSet > pExampleSet
void AddTabPage(const OUString &rId, CreatePage pCreateFunc)
SvxHlinkCtrl maCtrl
Controller.
static OUString msRememberedPageId
std::unique_ptr< weld::Button > m_xResetBtn
std::unique_ptr< weld::Notebook > m_xIconCtrl
void SetInputSet(const SfxItemSet *pInSet)
void SetCurPageId(const OUString &rId)
void ShowPage(const OUString &rId)
std::unique_ptr< SfxItemSet > mpItemSet
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
SvxLinkInsertMode GetInsertMode() const
const OUString & GetURL() const
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
void SetDocumentFrame(const css::uno::Reference< css::frame::XFrame > &rxDocumentFrame)
virtual void Reset(const SfxItemSet &) override
virtual bool FillItemSet(SfxItemSet *) override
IMPL_LINK_NOARG(SvxHpLinkDlg, ClickOkHdl_Impl, weld::Button &, void)
Click on OK button.
OUString CuiResId(TranslateId aKey)
virtual tools::Long GetValue() const override
#define LINK(Instance, Class, Member)