summaryrefslogtreecommitdiff
path: root/svtools
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-26 14:06:40 +0100
commitf0bbafba9d490c2628f1f60070aee877b64f5520 (patch)
treeac569030df1061f8e603cf6aac3738b3c6f91d67 /svtools
parent9aebad8b58a7ee36284e465a40101d2a045d00dd (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 'svtools')
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx6
-rw-r--r--svtools/source/contnr/imivctl1.cxx4
-rw-r--r--svtools/source/contnr/svimpbox.cxx3
-rw-r--r--svtools/source/control/ruler.cxx6
-rw-r--r--svtools/source/control/tabbar.cxx6
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx2
6 files changed, 14 insertions, 13 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 66cc84aae519..4957b3b35710 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -1072,7 +1072,7 @@ namespace svt
// release the controller (asynchronously)
if (nEndEvent)
Application::RemoveUserEvent(nEndEvent);
- nEndEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,EndEditHdl));
+ nEndEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,EndEditHdl), NULL, true);
}
}
@@ -1106,7 +1106,7 @@ namespace svt
{
if (nCellModifiedEvent)
Application::RemoveUserEvent(nCellModifiedEvent);
- nCellModifiedEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,CellModifiedHdl));
+ nCellModifiedEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,CellModifiedHdl), NULL, true);
return 0;
}
@@ -1293,7 +1293,7 @@ namespace svt
Application::RemoveUserEvent(nStartEvent);
m_pFocusWhileRequest = Application::GetFocusWindow();
- nStartEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,StartEditHdl));
+ nStartEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,StartEditHdl), NULL, true);
}
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 5459f49ca873..51dc4bbf4441 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -1385,7 +1385,7 @@ void SvxIconChoiceCtrl_Impl::Resize()
if ( ! nUserEventAdjustScrBars )
nUserEventAdjustScrBars =
Application::PostUserEvent( LINK( this, SvxIconChoiceCtrl_Impl, UserEventHdl),
- EVENTID_ADJUST_SCROLLBARS);
+ EVENTID_ADJUST_SCROLLBARS);
VisRectChanged();
}
@@ -2088,7 +2088,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, bool bSy
if( !nUserEventShowCursor )
nUserEventShowCursor =
Application::PostUserEvent( LINK( this, SvxIconChoiceCtrl_Impl, UserEventHdl),
- EVENTID_SHOW_CURSOR );
+ EVENTID_SHOW_CURSOR );
}
}
}
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 9431266717df..56f9cbae9055 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -902,7 +902,8 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
aVerSBar->SetThumbPos( 0 );
StopUserEvent();
ShowCursor(true);
- nCurUserEvent = Application::PostUserEvent(LINK(this, SvImpLBox, MyUserEvent), reinterpret_cast<void*>(1));
+ nCurUserEvent = Application::PostUserEvent(LINK(this, SvImpLBox, MyUserEvent),
+ reinterpret_cast<void*>(1));
return;
}
}
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index b6ff5aaf9ae4..eec2e3947fea 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1483,7 +1483,7 @@ void Ruler::ImplUpdate( bool bMustCalc )
{
mnUpdateFlags |= RULER_UPDATE_DRAW;
if (!mnUpdateEvtId)
- mnUpdateEvtId = Application::PostUserEvent(LINK( this, Ruler, ImplUpdateHdl), NULL );
+ mnUpdateEvtId = Application::PostUserEvent(LINK( this, Ruler, ImplUpdateHdl), NULL, true);
}
}
@@ -2196,7 +2196,7 @@ void Ruler::Resize()
Invalidate();
mnUpdateFlags |= RULER_UPDATE_LINES;
if ( !mnUpdateEvtId )
- mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL );
+ mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL, true );
}
mbFormat = true;
@@ -2340,7 +2340,7 @@ void Ruler::Activate()
// update positionlies - draw is delayed
mnUpdateFlags |= RULER_UPDATE_LINES;
if ( !mnUpdateEvtId )
- mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL );
+ mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL, true );
}
void Ruler::Deactivate()
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 7df57d144e67..09c5442c283d 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -427,7 +427,7 @@ bool TabBarEdit::PreNotify( NotifyEvent& rNEvt )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_False) ) )
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_False), true ) )
mbPostEvt = true;
}
return true;
@@ -436,7 +436,7 @@ bool TabBarEdit::PreNotify( NotifyEvent& rNEvt )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_True) ) )
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_True), true ) )
mbPostEvt = true;
}
return true;
@@ -451,7 +451,7 @@ void TabBarEdit::LoseFocus()
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_False) ) )
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), reinterpret_cast<void*>(sal_False), true ) )
mbPostEvt = true;
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index fdcb5251dea0..88f079a38274 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -655,7 +655,7 @@ void AssignmentPersistentData::ImplCommit()
for (sal_Int32 i = 0; i<nAdjustedTokenCount; ++i)
m_pImpl->aLogicalFieldNames.push_back(sLogicalFieldNames.getToken(i, ';'));
- PostUserEvent(LINK(this, AddressBookSourceDialog, OnDelayedInitialize));
+ PostUserEvent(LINK(this, AddressBookSourceDialog, OnDelayedInitialize), NULL, true);
// so the dialog will at least show up before we do the loading of the
// configuration data and the (maybe time consuming) analysis of the data source/table to select