[Libreoffice-commits] core.git: 6 commits - basctl/source oox/source sd/source vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Apr 29 13:17:48 PDT 2015
basctl/source/basicide/basides1.cxx | 2 +-
oox/source/ole/olestorage.cxx | 2 +-
sd/source/ui/dlg/dlgass.cxx | 2 +-
sd/source/ui/slideshow/slideshowimpl.cxx | 23 ++++++++++-------------
vcl/source/window/mouse.cxx | 2 +-
vcl/source/window/window.cxx | 4 ++--
6 files changed, 16 insertions(+), 19 deletions(-)
New commits:
commit aa121a212320e46dc8f835766050c10998dcd197
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 29 21:14:34 2015 +0100
coverity#1078827 Dereference before null check
Change-Id: I3d8850900e25606c23e2209abe828e2b1e98b38e
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 1d45a5b..f6fd9fa 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -969,18 +969,15 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
mpShowWindow = VclPtr<ShowWindow>::Create( this, mpParentWindow );
mpShowWindow->SetMouseAutoHide( !maPresSettings.mbMouseVisible );
- if( mpViewShell )
- {
- mpViewShell->SetActiveWindow( mpShowWindow );
- mpShowWindow->SetViewShell (mpViewShell);
- mpViewShell->GetViewShellBase().ShowUIControls (false);
- // Hide the side panes for in-place presentations.
- if ( ! maPresSettings.mbFullScreen)
- mpPaneHider.reset(new PaneHider(*mpViewShell,this));
+ mpViewShell->SetActiveWindow( mpShowWindow );
+ mpShowWindow->SetViewShell (mpViewShell);
+ mpViewShell->GetViewShellBase().ShowUIControls (false);
+ // Hide the side panes for in-place presentations.
+ if ( ! maPresSettings.mbFullScreen)
+ mpPaneHider.reset(new PaneHider(*mpViewShell,this));
- if( getViewFrame() )
- getViewFrame()->SetChildWindow( SID_NAVIGATOR, maPresSettings.mbStartWithNavigator );
- }
+ if( getViewFrame() )
+ getViewFrame()->SetChildWindow( SID_NAVIGATOR, maPresSettings.mbStartWithNavigator );
// these Slots are forbidden in other views for this document
if( mpDocSh )
@@ -1003,7 +1000,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
// call resize handler
maPresSize = mpParentWindow->GetSizePixel();
- if( !maPresSettings.mbFullScreen && mpViewShell )
+ if (!maPresSettings.mbFullScreen)
{
const Rectangle& aClientRect = mpViewShell->GetViewShellBase().getClientRectangle();
maPresSize = aClientRect.GetSize();
@@ -1087,7 +1084,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
setActiveXToolbarsVisible( false );
}
- catch( Exception& )
+ catch (const Exception&)
{
OSL_FAIL(
OString(OString("sd::SlideshowImpl::startShow(), "
commit 9e0e0db304d7734b486ccfc3aaeef0acad853e86
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 29 21:09:58 2015 +0100
coverity#1296208 Operands don't affect result
Change-Id: I9ba731626bb43daae277c20829306c7d2eccd41f
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index eaec6fe..90e64bd 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -141,8 +141,8 @@ void Window::dispose()
{
assert( mpWindowImpl );
assert( !mpWindowImpl->mbInDispose ); // should only be called from disposeOnce()
- assert( !mpWindowImpl->mpParent ||
- !mpWindowImpl->mpParent->IsDisposed() ||
+ assert( (!mpWindowImpl->mpParent ||
+ !mpWindowImpl->mpParent->IsDisposed()) &&
"vcl::Window child should have its parent disposed first" );
// remove Key and Mouse events issued by Application::PostKey/MouseEvent
commit f0321253d534cd669c0f397bd83c54cc07009e9f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 29 21:03:55 2015 +0100
coverity#1296215 Dereference before null check
Change-Id: I38fd1780bbbe30f2dbc6ca5db9b815e571f06750
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index c4623a6..72e6840 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -284,7 +284,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
}
if ( ( pSVData->maWinData.mpFocusWin.get() != this &&
- mpWindowImpl && !mpWindowImpl->mbInDispose ) ||
+ !mpWindowImpl->mbInDispose ) ||
( bAsyncFocusWaiting && !bHasFocus && !bMustNotGrabFocus ) )
{
// EndExtTextInput if it is not the same window
commit cee3e3d76f2edd865e676ddaebe70791231aa07a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 29 20:58:48 2015 +0100
coverity#1296211 pCurWin == pNewWin at this point
should silence
coverity#1296211 Explicit null dereferenced
Change-Id: I0798db1b88bfec94139995db552029b18a9562af
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index b713ffe..1013be9 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1003,7 +1003,7 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
while ( pFocusWindow && ( pFocusWindow != pFrameWindow ) )
pFocusWindow = pFocusWindow->GetParent();
if ( pFocusWindow ) // Focus in BasicIDE
- pNewWin->GrabFocus();
+ pCurWin->GrabFocus();
}
}
else
commit c103554eb67fd75b45b90699c7c6ed9e0cafb755
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 29 20:55:39 2015 +0100
coverity#1296210 Explicit null dereferenced
Change-Id: Ia5aaa3deba695f9b9aec68477f8b34f1602a8045
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 69219b0..d6f35d1 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -896,7 +896,7 @@ OUString AssistentDlgImpl::GetDocFileName()
{
const sal_uInt16 nEntry = mpPage1TemplateLB->GetSelectEntryPos();
TemplateEntry* pEntry = NULL;
- if(nEntry != (sal_uInt16)-1)
+ if (mpTemplateRegion && nEntry != (sal_uInt16)-1)
pEntry = mpTemplateRegion->maEntries[nEntry];
if(pEntry)
commit 2916691477be5e027726a6441dec3d44bd95d055
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 29 20:52:24 2015 +0100
coverity#1296207 deliberate Unchecked return value
Change-Id: I0248d540937d1706f4b1fb2cbf0516cfbf870963
diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx
index 8d27eea..296898c 100644
--- a/oox/source/ole/olestorage.cxx
+++ b/oox/source/ole/olestorage.cxx
@@ -269,7 +269,7 @@ bool OleStorage::implIsStorage() const
/* If this is not an OLE storage, hasElements() of the OLESimpleStorage
implementation throws an exception. But we do not return the result
of hasElements(), because an empty storage is a valid storage too. */
- mxStorage->hasElements();
+ (void)mxStorage->hasElements();
return true;
}
catch(const Exception& )
More information about the Libreoffice-commits
mailing list