summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-25 19:59:49 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-25 21:38:08 +0100
commite4097762dd48eb2bc3a3e0dc83a3b81766b1c65a (patch)
treeca3caabea0f1f0f955c344a4af4afb7fc5b8f10f /svx
parent039eb8c314fe24e7855980dcefd90e164c3b51eb (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 'svx')
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx2
-rw-r--r--svx/source/fmcomp/gridctrl.cxx6
-rw-r--r--svx/source/form/delayedevent.cxx14
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/fmPropBrw.cxx2
-rw-r--r--svx/source/form/navigatortree.cxx2
-rw-r--r--svx/source/gallery2/galbrws1.cxx4
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
8 files changed, 10 insertions, 24 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 71290f056130..413bae057c39 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -363,7 +363,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt )
m_pImpl->xDroppedStatement = xStatement;
m_pImpl->xDroppedResultSet = xResultSet;
- PostUserEvent(LINK(this, FmGridHeader, OnAsyncExecuteDrop));
+ PostUserEvent(LINK(this, FmGridHeader, OnAsyncExecuteDrop), NULL, true);
}
catch (Exception&)
{
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index df26ebbc65f6..76920e17650c 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2679,7 +2679,7 @@ void DbGridControl::PostExecuteRowContextMenu(sal_uInt16 /*nRow*/, const PopupMe
// delete asynchronously
if (m_nDeleteEvent)
Application::RemoveUserEvent(m_nDeleteEvent);
- m_nDeleteEvent = Application::PostUserEvent(LINK(this,DbGridControl,OnDelete));
+ m_nDeleteEvent = Application::PostUserEvent(LINK(this,DbGridControl,OnDelete), NULL, true);
break;
case SID_FM_RECORD_UNDO:
Undo();
@@ -3258,7 +3258,7 @@ bool DbGridControl::PreNotify(NotifyEvent& rEvt)
// delete asynchronously
if (m_nDeleteEvent)
Application::RemoveUserEvent(m_nDeleteEvent);
- m_nDeleteEvent = Application::PostUserEvent(LINK(this,DbGridControl,OnDelete));
+ m_nDeleteEvent = Application::PostUserEvent(LINK(this,DbGridControl,OnDelete), NULL, true);
return true;
}
}
@@ -3434,7 +3434,7 @@ void DbGridControl::implAdjustInSolarThread(bool _bRows)
::osl::MutexGuard aGuard(m_aAdjustSafety);
if (::osl::Thread::getCurrentIdentifier() != Application::GetMainThreadIdentifier())
{
- m_nAsynAdjustEvent = PostUserEvent(LINK(this, DbGridControl, OnAsyncAdjust), reinterpret_cast< void* >( _bRows ));
+ m_nAsynAdjustEvent = PostUserEvent(LINK(this, DbGridControl, OnAsyncAdjust), reinterpret_cast< void* >( _bRows ), true);
m_bPendingAdjustRows = _bRows;
if (_bRows)
SAL_INFO("svx.fmcomp", "posting an AdjustRows");
diff --git a/svx/source/form/delayedevent.cxx b/svx/source/form/delayedevent.cxx
index f06fc1d0c3ea..1063d0fc526e 100644
--- a/svx/source/form/delayedevent.cxx
+++ b/svx/source/form/delayedevent.cxx
@@ -17,20 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "delayedevent.hxx"
-
#include <vcl/svapp.hxx>
-
namespace svxform
{
-
-
-
- //= DelayedEvent
-
-
void DelayedEvent::Call( void* _pArg )
{
CancelPendingCall();
@@ -39,7 +30,6 @@ namespace svxform
m_nEventId = Application::PostUserEvent( LINK( this, DelayedEvent, OnCall ), _pArg );
}
-
void DelayedEvent::CancelPendingCall()
{
if ( m_nEventId )
@@ -47,15 +37,11 @@ namespace svxform
m_nEventId = 0;
}
-
IMPL_LINK( DelayedEvent, OnCall, void*, _pArg )
{
m_nEventId = 0;
return m_aHandler.Call( _pArg );
}
-
-
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 98e1f45a3277..0ac78dfb6d07 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1212,7 +1212,7 @@ bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const OUString& rN
if (aText.isEmpty())
{
// deleting the entry asynchron
- PostUserEvent(LINK(this, FmFilterNavigator, OnRemove), pEntry);
+ PostUserEvent(LINK(this, FmFilterNavigator, OnRemove), pEntry, true);
}
else
{
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 3d86527ba7f8..427a16a9c6aa 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -648,7 +648,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
if ( m_bInitialStateChange )
{
// if we're just newly created, we want to have the focus
- PostUserEvent( LINK( this, FmPropBrw, OnAsyncGetFocus ) );
+ PostUserEvent( LINK( this, FmPropBrw, OnAsyncGetFocus ), NULL, true );
// and additionally, we want to show the page which was active during
// our previous incarnation
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 938c166b6156..95152e42cfb9 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1473,7 +1473,7 @@ namespace svxform
if( !bRes )
{
m_pEditEntry = pEntry;
- nEditEvent = Application::PostUserEvent( LINK(this, NavigatorTree, OnEdit) );
+ nEditEvent = Application::PostUserEvent( LINK(this, NavigatorTree, OnEdit), NULL, true );
} else
SetCursor(pEntry, true);
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 854ce84c2f3b..24c20e4a9cbc 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -324,7 +324,7 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog
}
// destroy mpThemeProps asynchronously
- Application::PostUserEvent( LINK( this, GalleryBrowser1, DestroyThemePropertiesDlgHdl ), pDialog );
+ Application::PostUserEvent( LINK( this, GalleryBrowser1, DestroyThemePropertiesDlgHdl ), pDialog, true );
}
IMPL_LINK( GalleryBrowser1, EndNewThemePropertiesDlgHdl, VclAbstractDialog2*, pDialog )
@@ -509,7 +509,7 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint )
void GalleryBrowser1::ShowContextMenu()
{
- Application::PostUserEvent( LINK( this, GalleryBrowser1, ShowContextMenuHdl ), this );
+ Application::PostUserEvent( LINK( this, GalleryBrowser1, ShowContextMenuHdl ), this, true );
}
bool GalleryBrowser1::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow )
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 0796f53e7b0d..54f7260d9af0 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -150,7 +150,7 @@ void SvxColorValueSet_docking::Command(const CommandEvent& rCEvt)
void SvxColorValueSet_docking::StartDrag( sal_Int8 , const Point& )
{
- Application::PostUserEvent(LINK(this, SvxColorValueSet_docking, ExecDragHdl));
+ Application::PostUserEvent(LINK(this, SvxColorValueSet_docking, ExecDragHdl), NULL, true);
}
void SvxColorValueSet_docking::DoDrag()