From 82fb4c66103073043d17b5cea845e35410b826f3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 16 Apr 2018 12:57:00 +0100 Subject: weld SwJavaEditDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I409e66ed7446ad56933bb806093aa7f7b1d62a4e Reviewed-on: https://gerrit.libreoffice.org/53000 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/uibase/inc/javaedit.hxx | 73 ++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 40 deletions(-) (limited to 'sw/source/uibase/inc/javaedit.hxx') diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx index 22b8c4ce7c4f..ccd83e3ecb9f 100644 --- a/sw/source/uibase/inc/javaedit.hxx +++ b/sw/source/uibase/inc/javaedit.hxx @@ -19,10 +19,7 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_JAVAEDIT_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_JAVAEDIT_HXX -#include -#include -#include -#include +#include class SwWrtShell; class SwFieldMgr; @@ -30,54 +27,50 @@ class SwScriptField; namespace sfx2 { class FileDialogHelper; } -class SwJavaEditDialog : public SvxStandardDialog +class SwJavaEditDialog : public weld::GenericDialogController { private: - VclPtr m_pTypeED; - VclPtr m_pUrlRB; - VclPtr m_pEditRB; - VclPtr m_pUrlPB; - VclPtr m_pUrlED; - VclPtr m_pEditED; - - VclPtr m_pOKBtn; - VclPtr m_pPrevBtn; - VclPtr m_pNextBtn; - - OUString aText; - OUString aType; - - bool bNew; - bool bIsUrl; - - SwScriptField* pField; - SwFieldMgr* pMgr; - SwWrtShell* pSh; - sfx2::FileDialogHelper* pFileDlg; - - DECL_LINK(OKHdl, Button*, void); - DECL_LINK(PrevHdl, Button*, void); - DECL_LINK(NextHdl, Button*, void); - DECL_LINK(RadioButtonHdl, Button*, void); - DECL_LINK(InsertFileHdl, Button *, void); + OUString m_aText; + OUString m_aType; + + bool m_bNew; + bool m_bIsUrl; + + SwScriptField* m_pField; + SwFieldMgr* m_pMgr; + SwWrtShell* m_pSh; + sfx2::FileDialogHelper* m_pFileDlg; + + std::unique_ptr m_xTypeED; + std::unique_ptr m_xUrlRB; + std::unique_ptr m_xEditRB; + std::unique_ptr m_xUrlPB; + std::unique_ptr m_xUrlED; + std::unique_ptr m_xEditED; + std::unique_ptr m_xOKBtn; + std::unique_ptr m_xPrevBtn; + std::unique_ptr m_xNextBtn; + + DECL_LINK(OKHdl, weld::Button&, void); + DECL_LINK(PrevHdl, weld::Button&, void); + DECL_LINK(NextHdl, weld::Button&, void); + DECL_LINK(RadioButtonHdl, weld::Button&, void); + DECL_LINK(InsertFileHdl, weld::Button&, void); DECL_LINK(DlgClosedHdl, sfx2::FileDialogHelper *, void); - virtual void Apply() override; - void CheckTravel(); void SetField(); public: - SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh); + SwJavaEditDialog(weld::Window* pParent, SwWrtShell* pWrtSh); virtual ~SwJavaEditDialog() override; - virtual void dispose() override; - const OUString& GetScriptText() const { return aText; } + const OUString& GetScriptText() const { return m_aText; } - const OUString& GetScriptType() const { return aType; } + const OUString& GetScriptType() const { return m_aType; } - bool IsUrl() const { return bIsUrl; } - bool IsNew() const { return bNew; } + bool IsUrl() const { return m_bIsUrl; } + bool IsNew() const { return m_bNew; } bool IsUpdate() const; }; -- cgit