diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-29 16:13:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-29 18:12:06 +0000 |
commit | dcfbd7bc4e5f4044ea795b3c9964727ac7c195f8 (patch) | |
tree | e184b637af591f35e056df6e9bab044651826345 /svtools | |
parent | fac0a3b9522d08b1fb60ee25999ecd4577495ac9 (diff) |
coverity#704316 odd pDtorNotify hackery
Change-Id: I9faa61bb85ec6d89c6f5c9829d137fabb3e98c4a
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 17 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.hxx | 2 |
2 files changed, 6 insertions, 13 deletions
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 2c4170e46c58..a85d104d6715 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -192,7 +192,7 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) ,pHeaderBar( 0 ) ,pEventWin( pParent ) ,pCornerWin( 0 ) - ,pDtorNotify( 0 ) + ,bInDtor( false ) ,bInPaint( false ) ,bInCommand( false ) ,bNoScrollBack( false ) @@ -220,8 +220,7 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) BrowserDataWin::~BrowserDataWin() { - if( pDtorNotify ) - *pDtorNotify = sal_True; + bInDtor = true; for ( size_t i = 0, n = aInvalidRegion.size(); i < n; ++i ) delete aInvalidRegion[ i ]; @@ -411,16 +410,13 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) if ( COMMAND_CONTEXTMENU == rEvt.GetCommand() && rEvt.IsMouseEvent() && nRow < pBox->GetRowCount() && !pBox->IsRowSelected(nRow) ) { - sal_Bool bDeleted = sal_False; - pDtorNotify = &bDeleted; bInCommand = true; MouseButtonDown( aMouseEvt ); - if( bDeleted ) + if( bInDtor ) return; MouseButtonUp( aMouseEvt ); - if( bDeleted ) + if( bInDtor ) return; - pDtorNotify = 0; bInCommand = false; } @@ -428,12 +424,9 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) CommandEvent aEvt( aEventPos, rEvt.GetCommand(), rEvt.IsMouseEvent(), rEvt.GetData() ); bInCommand = true; - sal_Bool bDeleted = sal_False; - pDtorNotify = &bDeleted; GetParent()->Command( aEvt ); - if( bDeleted ) + if( bInDtor ) return; - pDtorNotify = 0; bInCommand = false; if ( COMMAND_STARTDRAG == rEvt.GetCommand() ) diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index 45dd7a808472..0c7209d16a09 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -106,7 +106,7 @@ public: BrowserHeader* pHeaderBar; // only for BROWSER_HEADERBAR_NEW Window* pEventWin; // Window of forwarded events ScrollBarBox* pCornerWin; // Window in the corner btw the ScrollBars - sal_Bool* pDtorNotify; + bool bInDtor; AutoTimer aMouseTimer; // recalls MouseMove on dragging out MouseEvent aRepeatEvt; // a MouseEvent to repeat Point aLastMousePos; // prevents pseudo-MouseMoves |