summaryrefslogtreecommitdiff
path: root/vcl/source/window/dialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/dialog.cxx')
-rw-r--r--vcl/source/window/dialog.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 1f6ebd658c84..1ed9fd002289 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -557,7 +557,18 @@ BOOL Dialog::Close()
{
ImplDelData aDelData;
ImplAddDel( &aDelData );
+ //liuchen 2009-7-22, support Excel VBA UserForm_QueryClose event
+ mnCancelClose = 0;
ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE );
+ // basic boolean ( and what the user might use in the event handler) can
+ // be ambiguous ( e.g. basic true = -1 )
+ // test agains 0 ( false ) and assume anything else is true
+ // ( Note: ) this used to work ( something changes somewhere )
+ if (mnCancelClose != 0)
+ {
+ return FALSE;
+ }
+ //liuchen 2009-7-22
if ( aDelData.IsDelete() )
return FALSE;
ImplRemoveDel( &aDelData );