connectivity/source/drivers/file/fcode.cxx | 5 - dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 7 -- editeng/source/rtf/rtfitem.cxx | 7 -- editeng/source/uno/unofdesc.cxx | 2 extensions/source/propctrlr/fontdialog.cxx | 8 +- include/toolkit/helper/vclunohelper.hxx | 4 - sd/source/ui/func/fusel.cxx | 12 +-- sd/source/ui/slideshow/slideshow.cxx | 9 -- sd/source/ui/view/Outliner.cxx | 3 sd/source/ui/view/drtxtob.cxx | 2 sdext/source/presenter/PresenterBitmapContainer.cxx | 12 +-- sdext/source/presenter/PresenterBitmapContainer.hxx | 6 - sfx2/source/control/thumbnailviewitem.cxx | 1 svtools/source/brwbox/editbrowsebox.cxx | 1 svx/source/fmcomp/fmgridif.cxx | 2 sw/source/uibase/shells/annotsh.cxx | 1 toolkit/source/helper/vclunohelper.cxx | 61 +++++++++++++++++- vcl/source/gdi/pngread.cxx | 2 18 files changed, 94 insertions(+), 51 deletions(-)
New commits: commit c24aa2139f526e000bbf781709f595064e40545e Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 12:48:04 2014 +0100 coverity#705247 Missing break in switch Change-Id: Idc647ef41b3a01d89216c3fe74e3fa5af02f7525 diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 9ef30f1..16a69db 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -466,6 +466,7 @@ namespace svt Control::KeyInput(rEvt); return; } + // fall-through default: BrowseBox::KeyInput(rEvt); } commit f526b6bd74ddfe23d2ea9aa130c307492e8e294e Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 12:45:57 2014 +0100 coverity#705316 Missing break in switch Change-Id: I4f730b66e9a0ce2ce32857d5c19ed2dffeeeaf45 diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 32b0e77..47d32a9 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -956,6 +956,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) { if ( (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) || !pOLV->HasSelection() ) rSet.DisableItem( nWhich ); + break; } case SID_COPY: { commit 7f694bed84fcd41e727dcee3bac8bcb9d01727fd Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 12:41:37 2014 +0100 coverity#736033 Missing break in switch Change-Id: Iabfc6fc76a80ad30bd412826f60edbf8b3facdd2 diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 1f2f6d0..aca69ab 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -1370,22 +1370,21 @@ static void SetBorderLine( int nBorderTyp, SvxBoxItem& rItem, switch( nBorderTyp ) { case RTF_BOX: // run through all levels - case RTF_BRDRT: rItem.SetLine( &rBorder, BOX_LINE_TOP ); if( RTF_BOX != nBorderTyp ) return; - + // fall-through case RTF_BRDRB: rItem.SetLine( &rBorder, BOX_LINE_BOTTOM ); if( RTF_BOX != nBorderTyp ) return; - + // fall-through case RTF_BRDRL: rItem.SetLine( &rBorder, BOX_LINE_LEFT ); if( RTF_BOX != nBorderTyp ) return; - + // fall-through case RTF_BRDRR: rItem.SetLine( &rBorder, BOX_LINE_RIGHT ); if( RTF_BOX != nBorderTyp ) commit 079e57658b7ca5d8dc99d049fc8ed63b19776b37 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 12:36:06 2014 +0100 coverity#982645 bMissingDefaultsToNormal is always true Change-Id: Ica58be0b5512eb8f386e51ec6e84d0ec09c3027f diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx index 020d1d5..a236559 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.cxx +++ b/sdext/source/presenter/PresenterBitmapContainer.cxx @@ -334,15 +334,13 @@ PresenterBitmapContainer::BitmapDescriptor::BitmapDescriptor ( } css::uno::Reference<css::rendering::XBitmap> - PresenterBitmapContainer::BitmapDescriptor::GetNormalBitmap (void) const + PresenterBitmapContainer::BitmapDescriptor::GetNormalBitmap() const { return mxNormalBitmap; } css::uno::Reference<css::rendering::XBitmap> - PresenterBitmapContainer::BitmapDescriptor::GetBitmap ( - const Mode eMode, - const bool bMissingDefaultsToNormal) const + PresenterBitmapContainer::BitmapDescriptor::GetBitmap(const Mode eMode) const { switch (eMode) { @@ -353,19 +351,19 @@ css::uno::Reference<css::rendering::XBitmap> case MouseOver: if (mxMouseOverBitmap.is()) return mxMouseOverBitmap; - else if (bMissingDefaultsToNormal) + else return mxNormalBitmap; case ButtonDown: if (mxButtonDownBitmap.is()) return mxButtonDownBitmap; - else if (bMissingDefaultsToNormal) + else return mxNormalBitmap; case Disabled: if (mxDisabledBitmap.is()) return mxDisabledBitmap; - else if (bMissingDefaultsToNormal) + else return mxNormalBitmap; case Mask: diff --git a/sdext/source/presenter/PresenterBitmapContainer.hxx b/sdext/source/presenter/PresenterBitmapContainer.hxx index 6c6f6e6..05092f5 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.hxx +++ b/sdext/source/presenter/PresenterBitmapContainer.hxx @@ -53,10 +53,8 @@ public: BitmapDescriptor (const ::boost::shared_ptr<BitmapDescriptor>& rpDefault); enum Mode {Normal, MouseOver, ButtonDown, Disabled, Mask}; - css::uno::Reference<css::rendering::XBitmap> GetNormalBitmap (void) const; - css::uno::Reference<css::rendering::XBitmap> GetBitmap ( - const Mode eMode, - const bool bMissingDefaultsToNormal = true) const; + css::uno::Reference<css::rendering::XBitmap> GetNormalBitmap() const; + css::uno::Reference<css::rendering::XBitmap> GetBitmap(const Mode eMode) const; void SetBitmap ( const Mode eMode, const css::uno::Reference<css::rendering::XBitmap>& rxBitmap); commit cc93bcf75154ac7dbcf89024c5cfbb406521b39d Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 12:25:23 2014 +0100 coverity#982646 Missing break in switch Change-Id: I83cdafe9a27f026e2b6c8e9153de9e8270304686 diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 9d66868..c23521c 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -83,6 +83,7 @@ bool ResizableMultiLineEdit::PreNotify(NotifyEvent& rNEvt) { case KEY_RETURN: mpItem->setTitle( GetText() ); + //fall-through case KEY_ESCAPE: mpItem->setEditTitle(false); nDone = true; commit d18dc5dd22d34a089f34e300b2cc4cb36cb27464 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 12:18:30 2014 +0100 coverity#1000657 Missing break in switch Change-Id: I03acdc2769e893fc7ecb2885302951852804867b diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx index cb616d4..4978043 100644 --- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx +++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx @@ -71,20 +71,15 @@ bool LimitBoxImpl::Notify( NotifyEvent& rNEvt ) switch ( nCode ) { case KEY_ESCAPE: - { Undo(); - } + // fall-through case KEY_RETURN: - { GrabFocusToDocument(); nHandled = true; break; - } case KEY_TAB: - { Select(); break; - } } break; } commit fcac0aef46a7ed760524a0406d98b4601b7a25da Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:51:41 2014 +0100 coverity#705376 Inferred misuse of enum Change-Id: Ie0e44c872d5d99d15508f8abedb51450a0e36ad0 diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 2c79665..e760437 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -209,7 +209,7 @@ namespace pcr sal_Int16 nFontCharset = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_CHARSET, aDefaultFont.CharSet); float nFontHeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_HEIGHT, (float)aDefaultFont.Height); float nFontWeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_WEIGHT, aDefaultFont.Weight); - sal_Int16 nFontSlant = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_SLANT, (sal_Int16)aDefaultFont.Slant); + css::awt::FontSlant nFontSlant = static_cast<css::awt::FontSlant>(aPropExtractor.getInt16FontProperty(PROPERTY_FONT_SLANT, (sal_Int16)aDefaultFont.Slant)); sal_Int16 nFontUnderline = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_UNDERLINE, aDefaultFont.Underline); sal_Int16 nFontStrikeout = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_STRIKEOUT, aDefaultFont.Strikeout); @@ -228,7 +228,7 @@ namespace pcr SvxFontHeightItem aSvxFontHeightItem((sal_uInt32)nFontHeight,100,CFID_HEIGHT); FontWeight eWeight=VCLUnoHelper::ConvertFontWeight(nFontWeight); - FontItalic eItalic=(FontItalic)nFontSlant; + FontItalic eItalic=VCLUnoHelper::ConvertFontSlant(nFontSlant); FontUnderline eUnderline=(FontUnderline)nFontUnderline; FontStrikeout eStrikeout=(FontStrikeout)nFontStrikeout; commit 8ca0f9854d371930b4b925f046d374bf8f125a17 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:49:04 2014 +0100 coverity#705375 Mixing enum types Change-Id: Ic7cb53d8fe427b4c28b890b64fa4437846b5b493 diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index e904dfa..2c79665 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -343,7 +343,7 @@ namespace pcr const SvxWeightItem& rWeightItem = static_cast<const SvxWeightItem&>(_rSet.Get(CFID_WEIGHT)); - float nWeight = VCLUnoHelper::ConvertFontWeight( rWeightItem.GetWeight()); + float nWeight = VCLUnoHelper::ConvertFontWeight(rWeightItem.GetWeight()); lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_WEIGHT,makeAny(nWeight)); } @@ -356,7 +356,7 @@ namespace pcr const SvxPostureItem& rPostureItem = static_cast<const SvxPostureItem&>(_rSet.Get(CFID_POSTURE)); - ::com::sun::star::awt::FontSlant eSlant = (::com::sun::star::awt::FontSlant)rPostureItem.GetPosture(); + ::com::sun::star::awt::FontSlant eSlant = VCLUnoHelper::ConvertFontSlant(rPostureItem.GetPosture()); lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_SLANT, makeAny((sal_Int16)eSlant)); } commit ff998ca882378b26761b2e759b2a0d0136651348 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:47:04 2014 +0100 coverity#705374 Mixing enum types Change-Id: Ie18131e7207d8f93a775c21abfc77d768352a5d3 diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 8c1cb78..9faefab 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -68,7 +68,7 @@ void SvxUnoFontDescriptor::ConvertFromFont( const Font& rFont, awt::FontDescript rDesc.Orientation = static_cast< float >(rFont.GetOrientation() / 10); rDesc.Kerning = rFont.IsKerning(); rDesc.Weight = VCLUnoHelper::ConvertFontWeight( rFont.GetWeight() ); - rDesc.Slant = (awt::FontSlant)rFont.GetItalic(); + rDesc.Slant = VCLUnoHelper::ConvertFontSlant( rFont.GetItalic() ); rDesc.Underline = sal::static_int_cast< sal_Int16 >(rFont.GetUnderline()); rDesc.Strikeout = sal::static_int_cast< sal_Int16 >(rFont.GetStrikeout()); rDesc.WordLineMode = rFont.IsWordLineMode(); commit 65edd168159cf1d202b930439f6877ae8b9d3dcd Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:44:22 2014 +0100 coverity#705389 Mixing enum types Change-Id: I3e2d5e6eb6005fd4f820a742d1b0e9eb6dafca6f diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 902c821..c12770e 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -90,7 +90,7 @@ using ::com::sun::star::awt::XVclWindowPeer; aFD.Pitch = (sal_Int16)rFont.GetPitch(); aFD.CharacterWidth = VCLUnoHelper::ConvertFontWidth( rFont.GetWidthType() ); aFD.Weight= VCLUnoHelper::ConvertFontWeight( rFont.GetWeight() ); - aFD.Slant = (::com::sun::star::awt::FontSlant)rFont.GetItalic(); + aFD.Slant = VCLUnoHelper::ConvertFontSlant( rFont.GetItalic() ); aFD.Underline = (sal_Int16)rFont.GetUnderline(); aFD.Strikeout = (sal_Int16)rFont.GetStrikeout(); aFD.Orientation = rFont.GetOrientation(); commit d5bafdddf884d4d6febd1e20d5f207e34fe77b5a Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:43:23 2014 +0100 coverity#705387 Mixing enum types Change-Id: Iaba60d05b73ca3229aa8b35b338ee54381efd2d3 diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 4a00957..ee6e2e3 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -403,8 +403,8 @@ Font VCLUnoHelper::CreateFont( const ::com::sun::star::awt::FontDescriptor& rDes aFont.SetWidthType( VCLUnoHelper::ConvertFontWidth( rDescr.CharacterWidth ) ); if ( rDescr.Weight ) aFont.SetWeight( VCLUnoHelper::ConvertFontWeight( rDescr.Weight ) ); - if ( (FontItalic)rDescr.Slant != ITALIC_DONTKNOW ) - aFont.SetItalic( (FontItalic)rDescr.Slant ); + if ( rDescr.Slant != css::awt::FontSlant_DONTKNOW ) + aFont.SetItalic( VCLUnoHelper::ConvertFontSlant( rDescr.Slant ) ); if ( (FontUnderline)rDescr.Underline != UNDERLINE_DONTKNOW ) aFont.SetUnderline( (FontUnderline)rDescr.Underline ); if ( (FontStrikeout)rDescr.Strikeout != STRIKEOUT_DONTKNOW ) commit 3d8eee45c9256ec66458fc4fe1cf6c6814075bae Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:41:46 2014 +0100 coverity#705388 Mixing enum types Change-Id: If80361ac234c5079c9fcadb0a2f5fa05ea6b407b diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx index 74c6ade0..d4a96e9 100644 --- a/include/toolkit/helper/vclunohelper.hxx +++ b/include/toolkit/helper/vclunohelper.hxx @@ -25,9 +25,9 @@ #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/awt/FontSlant.hpp> #include <com/sun/star/awt/MouseEvent.hpp> - namespace com { namespace sun { namespace star { namespace uno { class XInterface; }}}} @@ -106,6 +106,8 @@ public: static FontWidth ConvertFontWidth( float f ); static float ConvertFontWeight( FontWeight eWeight ); static FontWeight ConvertFontWeight( float f ); + static css::awt::FontSlant ConvertFontSlant( FontItalic eWeight ); + static FontItalic ConvertFontSlant( css::awt::FontSlant ); // Rectangle static bool IsZero( ::com::sun::star::awt::Rectangle rRect ); diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index cf3efb7..4a00957 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -306,6 +306,61 @@ FontWeight VCLUnoHelper::ConvertFontWeight( float f ) return WEIGHT_DONTKNOW; } +css::awt::FontSlant VCLUnoHelper::ConvertFontSlant(FontItalic eItalic) +{ + css::awt::FontSlant eRet(css::awt::FontSlant_DONTKNOW); + switch (eItalic) + { + case ITALIC_NONE: + eRet = css::awt::FontSlant_NONE; + break; + case ITALIC_OBLIQUE: + eRet = css::awt::FontSlant_OBLIQUE; + break; + case ITALIC_NORMAL: + eRet = css::awt::FontSlant_ITALIC; + break; + case ITALIC_DONTKNOW: + eRet = css::awt::FontSlant_DONTKNOW; + break; + case FontItalic_FORCE_EQUAL_SIZE: + eRet = css::awt::FontSlant_MAKE_FIXED_SIZE; + break; + } + return eRet; +} + +FontItalic VCLUnoHelper::ConvertFontSlant(css::awt::FontSlant eSlant) +{ + FontItalic eRet = ITALIC_DONTKNOW; + switch (eSlant) + { + case css::awt::FontSlant_NONE: + eRet = ITALIC_NONE; + break; + case css::awt::FontSlant_OBLIQUE: + eRet = ITALIC_OBLIQUE; + break; + case css::awt::FontSlant_ITALIC: + eRet = ITALIC_NORMAL; + break; + case css::awt::FontSlant_DONTKNOW: + eRet = ITALIC_DONTKNOW; + break; + case css::awt::FontSlant_REVERSE_OBLIQUE: + //there is no vcl reverse oblique + eRet = ITALIC_OBLIQUE; + break; + case css::awt::FontSlant_REVERSE_ITALIC: + //there is no vcl reverse normal + eRet = ITALIC_NORMAL; + break; + case css::awt::FontSlant_MAKE_FIXED_SIZE: + eRet = FontItalic_FORCE_EQUAL_SIZE; + break; + } + return eRet; +} ::com::sun::star::awt::FontDescriptor VCLUnoHelper::CreateFontDescriptor( const Font& rFont ) { @@ -319,7 +374,7 @@ FontWeight VCLUnoHelper::ConvertFontWeight( float f ) aFD.Pitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch()); aFD.CharacterWidth = VCLUnoHelper::ConvertFontWidth( rFont.GetWidthType() ); aFD.Weight= VCLUnoHelper::ConvertFontWeight( rFont.GetWeight() ); - aFD.Slant = (::com::sun::star::awt::FontSlant)rFont.GetItalic(); + aFD.Slant = VCLUnoHelper::ConvertFontSlant( rFont.GetItalic() ); aFD.Underline = sal::static_int_cast< sal_Int16 >(rFont.GetUnderline()); aFD.Strikeout = sal::static_int_cast< sal_Int16 >(rFont.GetStrikeout()); aFD.Orientation = rFont.GetOrientation(); commit 332a67afdc3d3c89c272aa3871e780cd30f34b36 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:19:51 2014 +0100 coverity#736759 Dereference before null check Change-Id: Ia36e192d32c46a5c1129eca050b2863ec1213bb4 diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 9c18fb2..2f6ced4 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -413,11 +413,12 @@ void ONthOperator::Exec(OCodeStack& rCodeStack) OSL_ENSURE(!rCodeStack.empty(),"Stack must be none empty!"); pOperand = rCodeStack.top(); rCodeStack.pop(); - if ( !IS_TYPE(OStopOperand,pOperand) ) + assert(pOperand); + if (pOperand && !IS_TYPE(OStopOperand,pOperand)) aValues.push_back( pOperand->getValue() ); aOperands.push_back( pOperand ); } - while ( !IS_TYPE(OStopOperand,pOperand) ); + while (pOperand && !IS_TYPE(OStopOperand,pOperand)); rCodeStack.push(new OOperandResult(operate(aValues))); commit 9e2ca10d8aba0d23f38fbfe40887f7372e5881b7 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:09:12 2014 +0100 coverity#705863 Dereference before null check Change-Id: I0e4d3add3adc2e387c5735b75eb5e3638f24c12b diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 475d31d..032aab7 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -723,13 +723,11 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) if (bMirrorSide0 != bMirrorSide1) { bSuppressChangesOfSelection = true; - if(mpWindow) - mpWindow->EnterWait(); + mpWindow->EnterWait(); mpView->End3DCreation(); bSuppressChangesOfSelection = false; nSlotId = SID_OBJECT_SELECT; - if(mpWindow) - mpWindow->LeaveWait(); + mpWindow->LeaveWait(); Activate(); } } commit 70c38b20669775b5a1ac0f3bcaa622e0a2a66260 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:08:45 2014 +0100 coverity#705864 Dereference before null check Change-Id: I69b3ec1c9eef117a55298781d15637b02281ff82 diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index bf10d9f..475d31d 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -182,13 +182,11 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) * end creation now. ******************************************************************/ bSuppressChangesOfSelection = true; - if(mpWindow) - mpWindow->EnterWait(); + mpWindow->EnterWait(); mpView->End3DCreation(); bSuppressChangesOfSelection = false; mpView->ResetCreationActive(); - if(mpWindow) - mpWindow->LeaveWait(); + mpWindow->LeaveWait(); } bool bTextEdit = false; commit f53169c74a3feae6f376e6f48859eebf07fc2187 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:07:15 2014 +0100 coverity#705867 Dereference before null check Change-Id: Ia541e6d8f0f0b30dcb67a8693b4dd5d53e929717 diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 89c35ef..3645306 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -1260,12 +1260,9 @@ void SlideShow::StartFullscreenPresentation( ) // changes made by the presentation have an effect on the other // view shells. FrameView* pOriginalFrameView = 0; - if (mpCurrentViewShellBase) - { - ::boost::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell()); - if (xShell.get()) - pOriginalFrameView = xShell->GetFrameView(); - } + ::boost::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell()); + if (xShell.get()) + pOriginalFrameView = xShell->GetFrameView(); delete mpFullScreenFrameView; mpFullScreenFrameView = new FrameView(mpDoc, pOriginalFrameView); commit 051d45a59d9e43634e152b8f4f0bf0193561db12 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:04:52 2014 +0100 coverity#1213293 Dereference before null check Change-Id: If2dd3cb1c7e18bf0274551950bc33f7521e0f8e1 diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index ba7d1a0..c8e262a 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1364,8 +1364,7 @@ void Outliner::EnterEditMode (bool bGrabFocus) mpView->UnmarkAllObj (pPV); mpView->MarkObj (mpTextObj, pPV); - if( mpTextObj ) - mpTextObj->setActiveText( mnText ); + mpTextObj->setActiveText( mnText ); // Turn on the edit mode for the text object. mpView->SdrBeginTextEdit(mpTextObj, pPV, mpWindow, true, this, pOutlinerView, true, true, bGrabFocus); commit c27a31710813ef0d44f8c1059177104c6996f2d9 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:03:01 2014 +0100 coverity#1093230 Dereference before null check Change-Id: Id273eaf3c4fe25df9af723fbc7f774c3c61ab3de diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 6198c48..8a17b16 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -1331,7 +1331,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd ) // BMP_FORMAT_32BIT_TC_RGBA // only use DirectScanline when we have no preview shifting stuff and accesses to content and alpha const bool bDoDirectScanline( - bCkeckDirectScanline && !nXStart && 1 == nXAdd && !mnPreviewShift && mpAcc && mpMaskAcc); + bCkeckDirectScanline && !nXStart && 1 == nXAdd && !mnPreviewShift && mpMaskAcc); const bool bCustomColorTable(mpColorTable != mpDefaultColorTable); if(bDoDirectScanline) commit f750ee1d70fb445f14023187b442191ee079c3b4 Author: Caolán McNamara <[email protected]> Date: Wed Jun 4 11:02:21 2014 +0100 coverity#705873 Dereference before null check Change-Id: Ife67ce102df4dfadd3483a3c137bd767c13b3c26 diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 88dc2ae..35626c0 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -449,7 +449,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) else { // paragraph spacing - OutlinerView* pOLV = mpView ? mpView->GetTextEditOutlinerView() : NULL; + OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); if( pOLV ) { ESelection aSel = pOLV->GetSelection();
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
