diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-07 11:49:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-07 11:49:46 +0200 |
commit | 93f5d5a9190e0e03bf4822663652a4b068c44f75 (patch) | |
tree | 9ac61601b056acad6a6c83d728c684661d3f3271 /svx/source | |
parent | c6fdd34c16f415629222348631141c3e13af6d4a (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 'svx/source')
-rw-r--r-- | svx/source/form/filtnav.cxx | 3 | ||||
-rw-r--r-- | svx/source/inc/delayedevent.hxx | 3 | ||||
-rw-r--r-- | svx/source/inc/fmexpl.hxx | 2 | ||||
-rw-r--r-- | svx/source/inc/fmshimp.hxx | 8 | ||||
-rw-r--r-- | svx/source/inc/fmvwimp.hxx | 9 |
5 files changed, 13 insertions, 12 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index f3124dffe657..e00206986d1e 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1234,8 +1234,7 @@ bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const OUString& rN if (aText.isEmpty()) { // deleting the entry asynchron - sal_uLong nEvent; - PostUserEvent(nEvent, LINK(this, FmFilterNavigator, OnRemove), pEntry); + PostUserEvent(LINK(this, FmFilterNavigator, OnRemove), pEntry); } else { diff --git a/svx/source/inc/delayedevent.hxx b/svx/source/inc/delayedevent.hxx index 20eb2e27dd40..9f4a12a1b533 100644 --- a/svx/source/inc/delayedevent.hxx +++ b/svx/source/inc/delayedevent.hxx @@ -22,6 +22,7 @@ #include <tools/link.hxx> +struct ImplSVEvent; namespace svxform { @@ -62,7 +63,7 @@ namespace svxform private: Link m_aHandler; - sal_uLong m_nEventId; + ImplSVEvent * m_nEventId; private: DECL_LINK( OnCall, void* ); diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 18b9a187eb23..b76fc1e098ae 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -434,7 +434,7 @@ namespace svxform SvTreeListEntry* m_pRootEntry; SvTreeListEntry* m_pEditEntry; - sal_uLong nEditEvent; + ImplSVEvent * nEditEvent; SELDATA_ITEMS m_sdiState; Point m_aTimerTriggered; // die Position, an der der DropTimer angeschaltet wurde diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 7279edfe5bc8..906b9aa6c93f 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -103,11 +103,11 @@ class FmFormPage; struct FmLoadAction { FmFormPage* pPage; - sal_uLong nEventId; + ImplSVEvent * nEventId; sal_uInt16 nFlags; FmLoadAction( ) : pPage( NULL ), nEventId( 0 ), nFlags( 0 ) { } - FmLoadAction( FmFormPage* _pPage, sal_uInt16 _nFlags, sal_uLong _nEventId ) + FmLoadAction( FmFormPage* _pPage, sal_uInt16 _nFlags, ImplSVEvent * _nEventId ) :pPage( _pPage ), nEventId( _nEventId ), nFlags( _nFlags ) { } @@ -183,8 +183,8 @@ class FmXFormShell :public FmXFormShell_BASE std::vector<long> m_arrRelativeGridColumn; ::osl::Mutex m_aMutex; - sal_uLong m_nInvalidationEvent; - sal_uLong m_nActivationEvent; + ImplSVEvent * m_nInvalidationEvent; + ImplSVEvent * m_nActivationEvent; ::std::queue< FmLoadAction > m_aLoadingPages; diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx index a9ce1ba04cda..86e216585825 100644 --- a/svx/source/inc/fmvwimp.hxx +++ b/svx/source/inc/fmvwimp.hxx @@ -56,6 +56,7 @@ class FmFormShell; class Window; class OutputDevice; class SdrUnoObj; +struct ImplSVEvent; namespace com { namespace sun { namespace star { namespace awt { @@ -159,10 +160,10 @@ class FmXFormView : public ::cppu::WeakImplHelper3< FmFormObj* m_pMarkedGrid; FmFormView* m_pView; - sal_uIntPtr m_nActivationEvent; - sal_uIntPtr m_nErrorMessageEvent; // event for an asynchronous error message. See also m_aAsyncError - sal_uIntPtr m_nAutoFocusEvent; // event for asynchronously setting the focus to a control - sal_uIntPtr m_nControlWizardEvent; // event for asynchronously setting the focus to a control + ImplSVEvent * m_nActivationEvent; + ImplSVEvent * m_nErrorMessageEvent; // event for an asynchronous error message. See also m_aAsyncError + ImplSVEvent * m_nAutoFocusEvent; // event for asynchronously setting the focus to a control + ImplSVEvent * m_nControlWizardEvent; // event for asynchronously setting the focus to a control ::com::sun::star::sdb::SQLErrorEvent m_aAsyncError; // error event which is to be displayed asyn. See m_nErrorMessageEvent. |