diff options
author | Mathias Bauer <mba@openoffice.org> | 2002-07-01 08:12:07 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2002-07-01 08:12:07 +0000 |
commit | edf0ffeb0fc2e3b1e6cdb0bb02163b89db823761 (patch) | |
tree | 460bf979f9a974bb83b6fc458326a46f70974489 /sw/source/ui | |
parent | c30043893eef8852c516adf555b0341ba1c9a924 (diff) |
#100758#: recording
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/fldui/javaedit.cxx | 39 | ||||
-rw-r--r-- | sw/source/ui/inc/javaedit.hxx | 22 |
2 files changed, 32 insertions, 29 deletions
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 4957169132..b66ab40125 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -2,9 +2,9 @@ * * $RCSfile: javaedit.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: os $ $Date: 2001-06-08 13:47:31 $ + * last change: $Author: mba $ $Date: 2002-07-01 09:12:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -131,7 +131,8 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) : aHelpBtn ( this, SW_RES( BTN_POST_HELP ) ), pSh(pWrtSh), - bNew(TRUE) + bNew(TRUE), + bIsUrl(FALSE) { // Handler installieren aPrevBtn.SetClickHdl( LINK( this, SwJavaEditDialog, PrevHdl ) ); @@ -308,33 +309,25 @@ void SwJavaEditDialog::SetFld() if( !aOKBtn.IsEnabled() ) return ; - String sText; - String sType( aTypeED.GetText() ); - BOOL bIsUrl = aUrlRB.IsChecked(); + aType = aTypeED.GetText(); + bIsUrl = aUrlRB.IsChecked(); if( bIsUrl ) { - sText = aUrlED.GetText(); - if(sText.Len()) - sText = URIHelper::SmartRelToAbs(sText); + aText = aUrlED.GetText(); + if(aText.Len()) + aText = URIHelper::SmartRelToAbs(aText); } else - sText = aEditED.GetText(); + aText = aEditED.GetText(); - if( !sType.Len() ) - sType = String::CreateFromAscii("JavaScript"); + if( !aType.Len() ) + aType = String::CreateFromAscii("JavaScript"); +} - if( bNew ) - { - SwInsertFld_Data aData(TYP_SCRIPTFLD, 0, sType, sText, bIsUrl); - pMgr->InsertFld(aData); - } - else if( bIsUrl != pFld->GetFormat() || - pFld->GetPar2() != sType || pFld->GetPar1() != sText ) - { - pMgr->UpdateCurFld( bIsUrl, sType, sText ); - pSh->SetUndoNoResetModified(); - } +BOOL SwJavaEditDialog::IsUpdate() +{ + return bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText; } /*------------------------------------------------------------------------ diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx index 4e04e16c79..60d60c4df5 100644 --- a/sw/source/ui/inc/javaedit.hxx +++ b/sw/source/ui/inc/javaedit.hxx @@ -2,9 +2,9 @@ * * $RCSfile: javaedit.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: fme $ $Date: 2001-08-16 09:32:52 $ + * last change: $Author: mba $ $Date: 2002-07-01 09:11:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,10 +91,6 @@ class SwScriptField; class SwJavaEditDialog : public SvxStandardDialog { -public: - SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh); - ~SwJavaEditDialog(); - private: FixedText aTypeFT; Edit aTypeED; @@ -111,7 +107,11 @@ private: ImageButton aNextBtn; HelpButton aHelpBtn; + String aText; + String aType; + BOOL bNew; + BOOL bIsUrl; SwScriptField* pFld; SwFldMgr* pMgr; @@ -127,6 +127,16 @@ private: void CheckTravel(); void SetFld(); + +public: + SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh); + ~SwJavaEditDialog(); + + String GetText() { return aText; } + String GetType() { return aType; } + BOOL IsUrl() { return bIsUrl; } + BOOL IsNew() { return bNew; } + BOOL IsUpdate(); }; |