summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-07 11:49:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-07 11:49:46 +0200
commit93f5d5a9190e0e03bf4822663652a4b068c44f75 (patch)
tree9ac61601b056acad6a6c83d728c684661d3f3271 /svtools
parentc6fdd34c16f415629222348631141c3e13af6d4a (diff)
The opaque PostUserEvent IDs are actually pointers
...so declare them as such. This avoids the recurring mistake of storing such IDs as sal_uInt32, truncating in 64 bit environments, causing RemoveUserEvent to potentially not remove the event, it thus firing "too late" and probably causing a crash. While at it, consolidate the trivially unnecessary overloads of both Application::PostUserEvent and Window::PostUserEvent. And in each of them, it looks like deleting the mpLink member was missing from the failure branch. Change-Id: Iab13afbb06e12ac15dec6a6b5b85a7e402a3c654
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/imivctl.hxx4
-rw-r--r--svtools/source/contnr/svimpbox.cxx10
-rw-r--r--svtools/source/control/asynclink.cxx2
-rw-r--r--svtools/source/inc/svimpbox.hxx2
4 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index b787c9cf6569..13a1c3e2ec11 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -189,8 +189,8 @@ class SvxIconChoiceCtrl_Impl
long nMaxBoundHeight; // height of highest BoundRects
sal_uInt16 nFlags;
sal_uInt16 nCurTextDrawFlags;
- sal_uLong nUserEventAdjustScrBars;
- sal_uLong nUserEventShowCursor;
+ ImplSVEvent * nUserEventAdjustScrBars;
+ ImplSVEvent * nUserEventShowCursor;
SvxIconChoiceCtrlEntry* pCurHighlightFrame;
sal_Bool bHighlightFramePressed;
SvxIconChoiceCtrlEntry* pHead; // top left entry
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 34609f8a3300..3ce62da31299 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -104,7 +104,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
nMostRight = -1;
pMostRightEntry = 0;
- nCurUserEvent = 0xffffffff;
+ nCurUserEvent = 0;
bUpdateMode = true;
bInVScrollHdl = false;
@@ -3336,7 +3336,7 @@ void SvImpLBox::FindMostRight_Impl( SvTreeListEntry* pParent, SvTreeListEntry* p
void SvImpLBox::NotifyTabsChanged()
{
if( GetUpdateMode() && !(nFlags & F_IGNORE_CHANGED_TABS ) &&
- nCurUserEvent == 0xffffffff )
+ nCurUserEvent == 0 )
{
nCurUserEvent = Application::PostUserEvent(LINK(this,SvImpLBox,MyUserEvent),(void*)0);
}
@@ -3354,7 +3354,7 @@ bool SvImpLBox::IsNowExpandable() const
IMPL_LINK(SvImpLBox,MyUserEvent,void*, pArg )
{
- nCurUserEvent = 0xffffffff;
+ nCurUserEvent = 0;
if( !pArg )
{
pView->Invalidate();
@@ -3372,10 +3372,10 @@ IMPL_LINK(SvImpLBox,MyUserEvent,void*, pArg )
void SvImpLBox::StopUserEvent()
{
- if( nCurUserEvent != 0xffffffff )
+ if( nCurUserEvent != 0 )
{
Application::RemoveUserEvent( nCurUserEvent );
- nCurUserEvent = 0xffffffff;
+ nCurUserEvent = 0;
}
}
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx
index cdc18888cfe9..57550e851deb 100644
--- a/svtools/source/control/asynclink.cxx
+++ b/svtools/source/control/asynclink.cxx
@@ -69,7 +69,7 @@ bAllowDoubles
else
{
if( _pMutex ) _pMutex->acquire();
- Application::PostUserEvent( _nEventId, STATIC_LINK( this, AsynchronLink, HandleCall), 0 );
+ _nEventId = Application::PostUserEvent( STATIC_LINK( this, AsynchronLink, HandleCall), 0 );
if( _pMutex ) _pMutex->release();
}
}
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index 85a95404c879..a897aa3320a7 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -135,7 +135,7 @@ private:
long nNextVerVisSize;
long nMostRight;
sal_uLong nVisibleCount; // Anzahl Zeilen im Control
- sal_uLong nCurUserEvent; //-1 == kein Userevent amn Laufen
+ ImplSVEvent * nCurUserEvent;
short nHorSBarHeight, nVerSBarWidth;
sal_uInt16 nFlags;
sal_uInt16 nCurTabPos;