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 , 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) );
195 if ( !aItem->
GetURL().isEmpty() )
197 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { aItem });
226 OString sPageId(
"internet");
228 OUString aStrURL(pItem->
GetURL());
232 switch ( eProtocolTyp )
234 case INetProtocol::Http :
235 case INetProtocol::Ftp :
236 sPageId =
"internet";
238 case INetProtocol::File :
239 sPageId =
"document";
241 case INetProtocol::Mailto :
245 if (aStrURL.startsWith(
"#"))
246 sPageId =
"document";
265 aPageSet.
Put ( *pItem );
267 pCurrentPage->
Reset( aPageSet );
290 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 dispose() override
virtual bool FillItemSet(SfxItemSet *) override
css::uno::Reference< css::frame::XFrame > GetActiveFrame() const
virtual void Close() override
const WhichRangesContainer & GetRanges() const
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
virtual tools::Long GetValue() const override
OUString CuiResId(TranslateId aKey)
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
virtual void StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem *pState) override
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
const OString & GetCurPageId() const
const SfxItemSet & GetItemSet() const
SfxDispatcher * GetDispatcher() const
void Update(sal_uInt16 nId)
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
std::unique_ptr< SfxItemSet > pExampleSet
Reference< XExecutableDialog > m_xDialog
std::unique_ptr< SfxItemSet > mpItemSet
void ShowPage(const OString &rId)
SvxLinkInsertMode GetInsertMode() const
std::unique_ptr< weld::Button > m_xApplyBtn
virtual void Reset(const SfxItemSet &) override
void SetInputSet(const SfxItemSet *pInSet)
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
void AddTabPage(const OString &rId, CreatePage pCreateFunc)
void SetReadOnlyMode(bool bReadOnly)
WhichRangesContainer pRanges
std::unique_ptr< weld::Button > m_xResetBtn
bool m_bDetectedRangeSegmentation false