summaryrefslogtreecommitdiff
path: root/sw/source/ui/fldui/javaedit.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2002-07-01 08:12:07 +0000
committerMathias Bauer <mba@openoffice.org>2002-07-01 08:12:07 +0000
commitedf0ffeb0fc2e3b1e6cdb0bb02163b89db823761 (patch)
tree460bf979f9a974bb83b6fc458326a46f70974489 /sw/source/ui/fldui/javaedit.cxx
parentc30043893eef8852c516adf555b0341ba1c9a924 (diff)
#100758#: recording
Diffstat (limited to 'sw/source/ui/fldui/javaedit.cxx')
-rw-r--r--sw/source/ui/fldui/javaedit.cxx39
1 files changed, 16 insertions, 23 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;
}
/*------------------------------------------------------------------------