Kaydet (Commit) 5f273ff9 authored tarafından Caolán McNamara's avatar Caolán McNamara

CID#703893 SwJavaEditDialog::Get[Text|Type] orthogonal to Dialog::Get*

and const up

Change-Id: I9bb363b26efaf83e36187df4bf762d64b3956ed1
üst 7715f7e6
...@@ -130,11 +130,11 @@ public: ...@@ -130,11 +130,11 @@ public:
class AbstractJavaEditDialog : public VclAbstractDialog class AbstractJavaEditDialog : public VclAbstractDialog
{ {
public: public:
virtual OUString GetText() = 0; virtual OUString GetScriptText() const = 0;
virtual OUString GetType() = 0; virtual OUString GetScriptType() const = 0;
virtual sal_Bool IsUrl() = 0; virtual sal_Bool IsUrl() const = 0;
virtual sal_Bool IsNew() = 0; virtual sal_Bool IsNew() const = 0;
virtual bool IsUpdate() = 0; virtual bool IsUpdate() const = 0;
}; };
class AbstractMailMergeDlg : public VclAbstractDialog class AbstractMailMergeDlg : public VclAbstractDialog
......
...@@ -451,27 +451,27 @@ void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal ...@@ -451,27 +451,27 @@ void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal
pDlg->GetValues( rName, rRow, rCol, rInsTblFlags, rTableAutoFmtName, prTAFmt); pDlg->GetValues( rName, rRow, rCol, rInsTblFlags, rTableAutoFmtName, prTAFmt);
} }
OUString AbstractJavaEditDialog_Impl::GetText() OUString AbstractJavaEditDialog_Impl::GetScriptText() const
{ {
return pDlg->GetText(); return pDlg->GetScriptText();
} }
OUString AbstractJavaEditDialog_Impl::GetType() OUString AbstractJavaEditDialog_Impl::GetScriptType() const
{ {
return pDlg->GetType(); return pDlg->GetScriptType();
} }
sal_Bool AbstractJavaEditDialog_Impl::IsUrl() sal_Bool AbstractJavaEditDialog_Impl::IsUrl() const
{ {
return pDlg->IsUrl(); return pDlg->IsUrl();
} }
sal_Bool AbstractJavaEditDialog_Impl::IsNew() sal_Bool AbstractJavaEditDialog_Impl::IsNew() const
{ {
return pDlg->IsNew(); return pDlg->IsNew();
} }
bool AbstractJavaEditDialog_Impl::IsUpdate() bool AbstractJavaEditDialog_Impl::IsUpdate() const
{ {
return pDlg->IsUpdate(); return pDlg->IsUpdate();
} }
......
...@@ -273,11 +273,11 @@ class SwJavaEditDialog; ...@@ -273,11 +273,11 @@ class SwJavaEditDialog;
class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog
{ {
DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog) DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog)
virtual OUString GetText(); virtual OUString GetScriptText() const;
virtual OUString GetType(); virtual OUString GetScriptType() const;
virtual sal_Bool IsUrl(); virtual sal_Bool IsUrl() const;
virtual sal_Bool IsNew(); virtual sal_Bool IsNew() const;
virtual bool IsUpdate(); virtual bool IsUpdate() const;
}; };
class SwMailMergeDlg; class SwMailMergeDlg;
......
...@@ -220,7 +220,7 @@ void SwJavaEditDialog::SetFld() ...@@ -220,7 +220,7 @@ void SwJavaEditDialog::SetFld()
aType = "JavaScript"; aType = "JavaScript";
} }
bool SwJavaEditDialog::IsUpdate() bool SwJavaEditDialog::IsUpdate() const
{ {
return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText ); return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText );
} }
......
...@@ -70,23 +70,19 @@ private: ...@@ -70,23 +70,19 @@ private:
void CheckTravel(); void CheckTravel();
void SetFld(); void SetFld();
using Dialog::GetText;
using Window::GetType;
public: public:
SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh); SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh);
~SwJavaEditDialog(); ~SwJavaEditDialog();
OUString GetText() { return aText; } OUString GetScriptText() const { return aText; }
OUString GetType() { return aType; } OUString GetScriptType() const { return aType; }
sal_Bool IsUrl() { return bIsUrl; } sal_Bool IsUrl() const { return bIsUrl; }
sal_Bool IsNew() { return bNew; } sal_Bool IsNew() const { return bNew; }
bool IsUpdate(); bool IsUpdate() const;
}; };
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -535,8 +535,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) ...@@ -535,8 +535,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
OSL_ENSURE(pDlg, "Dialogdiet fail!"); OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( pDlg->Execute() ) if ( pDlg->Execute() )
{ {
aType = pDlg->GetType(); aType = pDlg->GetScriptType();
aText = pDlg->GetText(); aText = pDlg->GetScriptText();
bIsUrl = pDlg->IsUrl(); bIsUrl = pDlg->IsUrl();
bNew = pDlg->IsNew(); bNew = pDlg->IsNew();
bUpdate = pDlg->IsUpdate(); bUpdate = pDlg->IsUpdate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment