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 /sw | |
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 'sw')
-rw-r--r-- | sw/inc/PostItMgr.hxx | 3 | ||||
-rw-r--r-- | sw/inc/SidebarWin.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 438cffa310d3..3d3cda92c1ff 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -58,6 +58,7 @@ namespace sw { namespace sidebarwindows { class SwSidebarItem; class SwFrm; class Window; +struct ImplSVEvent; #define SORT_POS 1 #define SORT_AUTHOR 2 @@ -143,7 +144,7 @@ class SwPostItMgr: public SfxListener SwEditWin* mpEditWin; std::list< SwSidebarItem*> mvPostItFlds; std::vector<SwPostItPageItem*> mPages; - sal_uLong mnEventId; + ImplSVEvent * mnEventId; bool mbWaitingForCalcRects; sw::sidebarwindows::SwSidebarWin* mpActivePostIt; bool mbLayout; diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index 0144a394972b..541772d888dd 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -205,7 +205,7 @@ class SwSidebarWin : public Window SwView& mrView; const SwPostItBits nFlags; - sal_uLong mnEventId; + ImplSVEvent * mnEventId; OutlinerView* mpOutlinerView; Outliner* mpOutliner; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 2b0bf01908e8..cd97cadb36c8 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -47,6 +47,7 @@ struct SwHTMLFootEndNote_Impl; class HTMLTableCnts; struct SwPendingStack; class SvxCSS1PropertyInfo; +struct ImplSVEvent; #define HTML_PARSPACE (MM50) #define HTML_CJK_PARSPACE (MM50/2) @@ -406,7 +407,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient sal_uInt32 aFontHeights[7]; // die Font-Hoehen 1-7 sal_uInt32 nScriptStartLineNr; // Zeilennummer eines Script-Blocks - sal_uLong nEventId; + ImplSVEvent * nEventId; sal_uInt16 nBaseFontStMin; sal_uInt16 nFontStMin; |