diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-25 19:59:49 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-26 14:06:40 +0100 |
commit | f0bbafba9d490c2628f1f60070aee877b64f5520 (patch) | |
tree | ac569030df1061f8e603cf6aac3738b3c6f91d67 /dbaccess | |
parent | 9aebad8b58a7ee36284e465a40101d2a045d00dd (diff) |
Audit all PostUserEvent calls and instrument for VclPtr.
Hold a reference on the VclPtr while we're waiting for the UserEvent.
Change-Id: I55c2671ca12eb14761c6a7dffd551af71547ecbd
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/RelationControl.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/TableGrantCtrl.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/directsql.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 10 |
7 files changed, 14 insertions, 14 deletions
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 4988943f8af0..cfb56b67c323 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -193,9 +193,9 @@ namespace dbaui bool ORelationControl::PreNotify(NotifyEvent& rNEvt) { if (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() ) - PostUserEvent(LINK(this, ORelationControl, AsynchDeactivate)); + PostUserEvent(LINK(this, ORelationControl, AsynchDeactivate), NULL, true); else if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) - PostUserEvent(LINK(this, ORelationControl, AsynchActivate)); + PostUserEvent(LINK(this, ORelationControl, AsynchActivate), NULL, true); return EditBrowseBox::PreNotify(rNEvt); } diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index e370a91f4cb3..a23925ae254d 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -156,13 +156,13 @@ bool OTableGrantControl::PreNotify(NotifyEvent& rNEvt) { if (m_nDeactivateEvent) Application::RemoveUserEvent(m_nDeactivateEvent); - m_nDeactivateEvent = Application::PostUserEvent(LINK(this, OTableGrantControl, AsynchDeactivate)); + m_nDeactivateEvent = Application::PostUserEvent(LINK(this, OTableGrantControl, AsynchDeactivate), NULL, true); } if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) { if (m_nDeactivateEvent) Application::RemoveUserEvent(m_nDeactivateEvent); - m_nDeactivateEvent = Application::PostUserEvent(LINK(this, OTableGrantControl, AsynchActivate)); + m_nDeactivateEvent = Application::PostUserEvent(LINK(this, OTableGrantControl, AsynchActivate), NULL, true); } return EditBrowseBox::PreNotify(rNEvt); } diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 13a5565a55b6..d8346df0259f 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -133,7 +133,7 @@ void DBTreeListBox::RequestingChildren( SvTreeListEntry* pParent ) // an error occurred. The method calling us will reset the entry flags, so it can't be expanded again. // But we want that the user may do a second try (i.e. because he misstypes a password in this try), so // we have to reset these flags controlling the expand ability - PostUserEvent(LINK(this, DBTreeListBox, OnResetEntry), pParent); + PostUserEvent(LINK(this, DBTreeListBox, OnResetEntry), pParent, true); } } } diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index eddc0949f2cf..190d4a71c8d0 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -110,7 +110,7 @@ namespace dbaui aError->Execute(); } - PostUserEvent(LINK(this, DirectSQLDialog, OnClose)); + PostUserEvent(LINK(this, DirectSQLDialog, OnClose), NULL, true); } sal_Int32 DirectSQLDialog::getHistorySize() const diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 7abbb17ef6bb..72456c0d17e7 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -631,7 +631,7 @@ namespace dbaui updateToolbox(); m_bEditAgain = true; - PostUserEvent(LINK(this, DbaIndexDialog, OnEditIndexAgain), _pEntry); + PostUserEvent(LINK(this, DbaIndexDialog, OnEditIndexAgain), _pEntry, true); return 0L; } diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index 4db24a60cec6..173d85f0366c 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -63,7 +63,7 @@ void OTableWindowListBox::dragFinished( ) // second look for ui activities which should happen after d&d if (m_nUiEvent) Application::RemoveUserEvent(m_nUiEvent); - m_nUiEvent = Application::PostUserEvent(LINK(this, OTableWindowListBox, LookForUiHdl)); + m_nUiEvent = Application::PostUserEvent(LINK(this, OTableWindowListBox, LookForUiHdl), NULL, true); } OTableWindowListBox::~OTableWindowListBox() @@ -311,7 +311,7 @@ sal_Int8 OTableWindowListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) if (m_nDropEvent) Application::RemoveUserEvent(m_nDropEvent); - m_nDropEvent = Application::PostUserEvent(LINK(this, OTableWindowListBox, DropHdl)); + m_nDropEvent = Application::PostUserEvent(LINK(this, OTableWindowListBox, DropHdl), NULL, true); return DND_ACTION_LINK; } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index cc134b2872cc..eb0c16fb4d3c 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -665,7 +665,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) else pActRow->SetFieldType( GetView()->getController().getTypeInfoFallBack() ); - nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType) ); + nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType), NULL, true ); pActFieldDescr = pActRow->GetActFieldDescr(); pDescrWin->DisplayData( pActFieldDescr ); GetUndoManager().AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) ); @@ -1222,7 +1222,7 @@ void OTableEditorCtrl::cut() { if (nCutEvent) Application::RemoveUserEvent(nCutEvent); - nCutEvent = Application::PostUserEvent(LINK(this, OTableEditorCtrl, DelayedCut)); + nCutEvent = Application::PostUserEvent(LINK(this, OTableEditorCtrl, DelayedCut), NULL, true); } } @@ -1245,7 +1245,7 @@ void OTableEditorCtrl::paste() { if( nPasteEvent ) Application::RemoveUserEvent( nPasteEvent ); - nPasteEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedPaste) ); + nPasteEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedPaste), NULL, true ); } else if(m_eChildFocus == NAME) { @@ -1433,12 +1433,12 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) case SID_DELETE: if( nDeleteEvent ) Application::RemoveUserEvent( nDeleteEvent ); - nDeleteEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedDelete) ); + nDeleteEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedDelete), NULL, true ); break; case SID_TABLEDESIGN_INSERTROWS: if( nInsNewRowsEvent ) Application::RemoveUserEvent( nInsNewRowsEvent ); - nInsNewRowsEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedInsNewRows) ); + nInsNewRowsEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, DelayedInsNewRows), NULL, true ); break; case SID_TABLEDESIGN_TABED_PRIMARYKEY: SetPrimaryKey( !IsPrimaryKey() ); |