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 :
88 , maCtrl ( SID_HYPERLINK_GETLINK, *pBindings, this )
89 , mbIsHTMLDoc ( false )
90 , m_xIconCtrl(m_xBuilder->weld_notebook(
"tabcontrol"))
91 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
92 , m_xApplyBtn(m_xBuilder->weld_button(
"apply"))
93 , m_xCancelBtn(m_xBuilder->weld_button(
"cancel"))
94 , m_xHelpBtn(m_xBuilder->weld_button(
"help"))
95 , m_xResetBtn(m_xBuilder->weld_button(
"reset"))
155 SvtViewOptions aViewOpt( EViewType::TabDialog, OUString::number(SID_HYPERLINK_DIALOG) );
181 pViewFrame->ToggleChildWindow(SID_HYPERLINK_DIALOG);
194 if ( !aItem->
GetURL().isEmpty() )
196 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { aItem });
225 OString sPageId(
"internet");
227 OUString aStrURL(pItem->
GetURL());
231 switch ( eProtocolTyp )
233 case INetProtocol::Http :
234 case INetProtocol::Ftp :
235 sPageId =
"internet";
237 case INetProtocol::File :
238 sPageId =
"document";
240 case INetProtocol::Mailto :
244 if (aStrURL.startsWith(
"#"))
245 sPageId =
"document";
264 aPageSet.
Put ( *pItem );
266 pCurrentPage->
Reset( aPageSet );
289 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
void AddTabPage(const OString &rId, CreatePage pCreateFunc)
std::unique_ptr< weld::Button > m_xCancelBtn
void PageCreated(IconChoicePage &rPage)
WhichRangesContainer pRanges
const OString & GetCurPageId() const
void SetPage(SvxHyperlinkItem const *pItem)
std::unique_ptr< weld::Button > m_xApplyBtn
void SetReadOnlyMode(bool bReadOnly)
std::unique_ptr< weld::Button > m_xHelpBtn
SfxDispatcher * GetDispatcher() const
void ShowPage(const OString &rId)
SvxHpLinkDlg(SfxBindings *pBindings, SfxChildWindow *pChild, weld::Window *pParent)
IconChoicePage * GetTabPage(std::string_view rPageId)
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 SetCurPageId(const OString &rId)
SvxHlinkCtrl maCtrl
Controller.
std::unique_ptr< weld::Button > m_xResetBtn
std::unique_ptr< weld::Notebook > m_xIconCtrl
void SetInputSet(const SfxItemSet *pInSet)
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)