summaryrefslogtreecommitdiff
path: root/forms
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 /forms
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 'forms')
-rw-r--r--forms/source/component/Button.cxx2
-rw-r--r--forms/source/component/Button.hxx3
-rw-r--r--forms/source/component/Edit.hxx4
-rw-r--r--forms/source/component/FormattedField.hxx4
4 files changed, 8 insertions, 5 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 550db56c32e3..9fb6e466dd1e 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -426,7 +426,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru
void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException, std::exception)
{
// Asynchronous for starutil::URL-Button
- sal_uLong n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
+ ImplSVEvent * n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
{
::osl::MutexGuard aGuard( m_aMutex );
m_nClickEvent = n;
diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx
index f07dbb548a57..48f52e38a587 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -35,6 +35,7 @@
#include <cppuhelper/implbase1.hxx>
+struct ImplSVEvent;
namespace frm
{
@@ -119,7 +120,7 @@ class OButtonControl :public OButtonControl_BASE
,public OFormNavigationHelper
{
private:
- sal_uLong m_nClickEvent;
+ ImplSVEvent * m_nClickEvent;
sal_Int16 m_nTargetUrlFeatureId;
/// caches the value of the "Enabled" property of our model
bool m_bEnabledByPropertyValue;
diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx
index 8e806ffab561..f317bc3ebe50 100644
--- a/forms/source/component/Edit.hxx
+++ b/forms/source/component/Edit.hxx
@@ -26,7 +26,7 @@
#include <cppuhelper/implbase3.hxx>
namespace dbtools { class FormattedColumnValue; }
-
+struct ImplSVEvent;
namespace frm
{
@@ -132,7 +132,7 @@ class OEditControl : public OBoundControl
m_aChangeListeners;
OUString m_aHtmlChangeValue;
- sal_uInt32 m_nKeyEvent;
+ ImplSVEvent * m_nKeyEvent;
public:
OEditControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext);
diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx
index 58cc6551eb75..f2a4b9a74d79 100644
--- a/forms/source/component/FormattedField.hxx
+++ b/forms/source/component/FormattedField.hxx
@@ -26,6 +26,8 @@
#include <cppuhelper/implbase1.hxx>
#include "errorbroadcaster.hxx"
+struct ImplSVEvent;
+
namespace frm
{
class OFormattedModel
@@ -145,7 +147,7 @@ class OFormattedModel
class OFormattedControl : public OBoundControl
,public OFormattedControl_BASE
{
- sal_uInt32 m_nKeyEvent;
+ ImplSVEvent * m_nKeyEvent;
public:
OFormattedControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext);