summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs/simpref.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2000-11-09 18:56:06 +0000
committerNiklas Nebel <nn@openoffice.org>2000-11-09 18:56:06 +0000
commitc7eb1252fc8eebea33eb780bf2cb6cd9274cf847 (patch)
tree36912c819c1d5ff9c7dac671c70df84fbd0bb2bf /sc/source/ui/miscdlgs/simpref.cxx
parentc70eb2d73c992edb0f46ce2366f38cdcbcf7f2aa (diff)
#80170# links / flags for use with api
Diffstat (limited to 'sc/source/ui/miscdlgs/simpref.cxx')
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx30
1 files changed, 26 insertions, 4 deletions
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index efe0e450975c..0be201a66f0c 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: simpref.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:45:03 $
+ * last change: $Author: nn $ $Date: 2000-11-09 19:56:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -121,7 +121,8 @@ ScSimpleRefDlg::ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP
pViewData ( ptrViewData ),
pDoc ( ptrViewData->GetDocument() ),
bRefInputMode ( FALSE ),
- bAutoReOpen ( TRUE )
+ bAutoReOpen ( TRUE ),
+ bCloseOnButtonUp( FALSE )
{
// damit die Strings in der Resource bei den FixedTexten bleiben koennen:
Init();
@@ -175,6 +176,8 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDoc )
String aRefStr;
theCurArea.Format( aRefStr, ABS_DREF3D, pDoc );
aEdAssign.SetRefString( aRefStr );
+
+ aChangeHdl.Call( &aRefStr );
}
}
@@ -218,6 +221,19 @@ void ScSimpleRefDlg::SetCloseHdl( const Link& rLink )
aCloseHdl=rLink;
}
+void ScSimpleRefDlg::SetUnoLinks( const Link& rDone, const Link& rAbort,
+ const Link& rChange )
+{
+ aDoneHdl = rDone;
+ aAbortedHdl = rAbort;
+ aChangeHdl = rChange;
+}
+
+void ScSimpleRefDlg::SetFlags( BOOL bSetCloseOnButtonUp )
+{
+ bCloseOnButtonUp = bSetCloseOnButtonUp;
+}
+
void ScSimpleRefDlg::StartRefInput()
{
aRbAssign.DoRef();
@@ -227,7 +243,8 @@ void ScSimpleRefDlg::StartRefInput()
void ScSimpleRefDlg::RefInputDone( BOOL bForced)
{
ScAnyRefDlg::RefInputDone(bForced);
- if(bForced && bCloseFlag) OkBtnHdl(&aBtnOk);
+ if ( (bForced || bCloseOnButtonUp) && bCloseFlag )
+ OkBtnHdl(&aBtnOk);
}
//------------------------------------------------------------------------
// Handler:
@@ -237,7 +254,9 @@ IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG )
bAutoReOpen=FALSE;
String aResult=aEdAssign.GetText();
aCloseHdl.Call(&aResult);
+ Link aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose
DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
+ aUnoLink.Call( &aResult );
return 0;
}
@@ -245,8 +264,11 @@ IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG )
IMPL_LINK( ScSimpleRefDlg, CancelBtnHdl, void *, EMPTYARG )
{
bAutoReOpen=FALSE;
+ String aResult=aEdAssign.GetText();
aCloseHdl.Call(NULL);
+ Link aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose
DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() );
+ aUnoLink.Call( &aResult );
return 0;
}