22 #include <osl/diagnose.h>
33 #include <svx/svxids.hrc>
34 #include <dialmgr.hxx>
35 #include <strings.hrc>
38 using ::com::sun::star::uno::Reference;
39 using ::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 , pExampleSet ( nullptr )
89 , maCtrl ( SID_HYPERLINK_GETLINK, *pBindings, this )
90 , mbIsHTMLDoc ( false )
91 , m_xIconCtrl(m_xBuilder->weld_notebook(
"tabcontrol"))
92 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
93 , m_xApplyBtn(m_xBuilder->weld_button(
"apply"))
94 , m_xCancelBtn(m_xBuilder->weld_button(
"cancel"))
95 , m_xHelpBtn(m_xBuilder->weld_button(
"help"))
96 , m_xResetBtn(m_xBuilder->weld_button(
"reset"))
122 SID_HYPERLINK_SETLINK>{} );
154 SvtViewOptions aViewOpt( EViewType::TabDialog, OUString::number(SID_HYPERLINK_DIALOG) );
187 SID_HYPERLINK_SETLINK>{} );
192 if ( pCurrentPage->AskApply() )
197 if ( !aItem->
GetURL().isEmpty() )
199 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { aItem });
229 OString 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!" );
#define LINK(Instance, Class, Member)
SvxHlinkCtrl maCtrl
Controller.
void SetPage(SvxHyperlinkItem const *pItem)
std::unique_ptr< weld::Button > m_xHelpBtn
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 * >())
void SetCurPageId(const OString &rId)
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
virtual void dispose() override
OString GetCurPageId() const
virtual bool FillItemSet(SfxItemSet *) override
css::uno::Reference< css::frame::XFrame > GetActiveFrame() const
virtual void Close() override
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
void PageCreated(IconChoicePage &rPage)
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)
IMPL_LINK_NOARG(SvxHpLinkDlg, ClickOkHdl_Impl, weld::Button &, void)
Click on OK button.
SfxStatusForwarder aRdOnlyForwarder
SfxApplication * SfxGetpApp()
void ToggleChildWindow(sal_uInt16)
std::unique_ptr< weld::Button > m_xOKBtn
SfxItemPool & GetPool() const
SvxHpLinkDlg(SfxBindings *pBindings, SfxChildWindow *pChild, weld::Window *pParent)
SvxHlinkCtrl(sal_uInt16 nId, SfxBindings &rBindings, SvxHpLinkDlg *pDlg)
virtual ~SvxHpLinkDlg() override
const OUString & GetURL() const
static std::unique_ptr< IconChoicePage > Create(weld::Container *pWindow, SvxHpLinkDlg *pDlg, const SfxItemSet *pItemSet)
std::unique_ptr< weld::Notebook > m_xIconCtrl
IconChoicePage * GetTabPage(std::string_view rPageId)
std::vector< std::unique_ptr< IconChoicePageData > > maPageList
std::unique_ptr< weld::Button > m_xCancelBtn
std::unique_ptr< SfxItemSet > pOutSet
SfxItemPool * GetPool() const
OUString CuiResId(const char *pKey)
const SfxItemSet & GetItemSet() const
SfxDispatcher * GetDispatcher() const
void Update(sal_uInt16 nId)
std::unique_ptr< sal_uInt16[]> pRanges
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual void Activate() override
void SetDocumentFrame(const css::uno::Reference< css::frame::XFrame > &rxDocumentFrame)
static SfxViewFrame * Current()
SfxBindings & GetBindings() const
Reference< XExecutableDialog > m_xDialog
std::unique_ptr< SfxItemSet > mpItemSet
void ShowPage(const OString &rId)
const sal_uInt16 * GetRanges() const
SvxLinkInsertMode GetInsertMode() const
std::unique_ptr< weld::Button > m_xApplyBtn
virtual void Reset(const SfxItemSet &) override
void SetInputSet(const SfxItemSet *pInSet)
void AddTabPage(const OString &rId, CreatePage pCreateFunc)
void SetReadOnlyMode(bool bReadOnly)
std::unique_ptr< weld::Button > m_xResetBtn