framework/source/fwe/xml/menuconfiguration.cxx | 7 ++--- include/framework/menuconfiguration.hxx | 6 +--- sc/source/ui/condformat/condformatdlgentry.cxx | 34 ++++++++++++++----------- scaddins/source/analysis/analysishelper.cxx | 1 sd/source/filter/html/pubdlg.cxx | 1 svx/source/fmcomp/gridcell.cxx | 8 ++--- svx/source/form/fmvwimp.cxx | 7 +++-- sw/source/core/uibase/index/toxmgr.cxx | 4 ++ sw/source/core/uibase/shells/drwbassh.cxx | 25 +++++------------- sw/source/core/uibase/uno/unotxdoc.cxx | 3 +- sw/source/core/unocore/unostyle.cxx | 4 ++ sw/source/filter/xml/xmlimp.cxx | 20 +++++++------- 12 files changed, 64 insertions(+), 56 deletions(-)
New commits: commit ed77c76c836f92ee3364fb56abe2dd343e9ed592 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 10:06:15 2014 +0100 coverity#708125 Uninitialized scalar field Change-Id: I9d97cdc9e6f4644ca773addf403d7ccf52a272e9 diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index ffbba78..439844a 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -136,6 +136,7 @@ public: // load Default-settings SdPublishingDesign::SdPublishingDesign() + : m_bCreated(sal_False) { m_eMode = PUBLISH_HTML; m_bContentPage = sal_True; commit bc14d3feaba27b857fcb4e5e81dcc120489b386a Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 10:04:21 2014 +0100 coverity#708113 Uninitialized scalar field Change-Id: I721f9604a2b5530eacb7340840428d1b2164740e diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 9a1b6e0..81399525 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -1430,6 +1430,7 @@ sal_uInt16 FuncData::GetStrIndex( sal_uInt16 nParamNum ) const FuncDataList::FuncDataList( ResMgr& rResMgr ) + : nLast(0) { for( sal_uInt16 n = 0 ; n < SAL_N_ELEMENTS(pFuncDatas) ; n++ ) Append( new FuncData( pFuncDatas[ n ], rResMgr ) ); commit 1a5e817140d2087dbce0da3df2d9a416d395ff98 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 10:01:46 2014 +0100 coverity#704815 Unchecked dynamic_cast Change-Id: I019caaf29f1878fff59f6133d396f9a3ed02722b diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 8b1575b..3b46a57 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2027,7 +2027,7 @@ OUString DbNumericField::GetFormatText(const Reference< ::com::sun::star::sdb::X void DbNumericField::UpdateFromField(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter) { - lcl_setFormattedNumeric_nothrow( *dynamic_cast< DoubleNumericField* >( m_pWindow ), *this, _rxField, _rxFormatter ); + lcl_setFormattedNumeric_nothrow(dynamic_cast<DoubleNumericField&>(*m_pWindow), *this, _rxField, _rxFormatter); } commit 0f8feff0818bedcfe0ffc0b3a63b2a4665d72fab Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 10:01:17 2014 +0100 coverity#704814 Unchecked dynamic_cast Change-Id: I684679c04cec7f8ed17a20fb3c4e99d418c4be5a diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 8de248f..8b1575b 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2021,7 +2021,7 @@ namespace OUString DbNumericField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter, Color** /*ppColor*/) { - return lcl_setFormattedNumeric_nothrow( *dynamic_cast< DoubleNumericField* >( m_pPainter ), *this, _rxField, _rxFormatter ); + return lcl_setFormattedNumeric_nothrow(dynamic_cast<DoubleNumericField&>(*m_pPainter), *this, _rxField, _rxFormatter); } commit 9aa2f78ed3378739729a2f98225b0508e557a247 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 10:00:44 2014 +0100 coverity#704813 Unchecked dynamic_cast Change-Id: I8ac34849f310f291b64e0ef03d4617d94d97b468 diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 5f1aa3f..8de248f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2310,7 +2310,7 @@ OUString DbDateField::GetFormatText(const Reference< ::com::sun::star::sdb::XCol void DbDateField::UpdateFromField(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& /*xFormatter*/) { - lcl_setFormattedDate_nothrow( *dynamic_cast< DateField* >( m_pWindow ), _rxField ); + lcl_setFormattedDate_nothrow(dynamic_cast<DateField&>(*m_pWindow), _rxField); } commit 0709b95f86554bf2063300e8a9566ba35680d2e1 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 10:00:09 2014 +0100 coverity#704812 Unchecked dynamic_cast Change-Id: Idd37bd7abc608a84a9a1bc731c26455b0901080e diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index c8665de..5f1aa3f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2304,7 +2304,7 @@ namespace OUString DbDateField::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< ::com::sun::star::util::XNumberFormatter >& /*xFormatter*/, Color** /*ppColor*/) { - return lcl_setFormattedDate_nothrow( *dynamic_cast< DateField* >( m_pPainter ), _rxField ); + return lcl_setFormattedDate_nothrow(dynamic_cast<DateField&>(*m_pPainter), _rxField); } commit d816acd0e21e996ce00658ffe8d694b96c5741c1 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:53:35 2014 +0100 coverity#706548 Uncaught exception Change-Id: Ie3be6d503b50cfa86be8fff162d01a72c6b47bf7 diff --git a/framework/source/fwe/xml/menuconfiguration.cxx b/framework/source/fwe/xml/menuconfiguration.cxx index 8b87cdd..e30b890 100644 --- a/framework/source/fwe/xml/menuconfiguration.cxx +++ b/framework/source/fwe/xml/menuconfiguration.cxx @@ -100,10 +100,9 @@ throw ( WrappedTargetException ) } } -PopupMenu* MenuConfiguration::CreateBookmarkMenu( - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - const OUString& aURL ) -throw ( ::com::sun::star::lang::WrappedTargetException ) +PopupMenu* MenuConfiguration::CreateBookmarkMenu(css::uno::Reference<css::frame::XFrame >& rFrame, const OUString& aURL) + throw (css::lang::WrappedTargetException, + css::uno::RuntimeException) { if ( aURL == BOOKMARK_NEWMENU ) return new BmkMenu( rFrame, BmkMenu::BMK_NEWMENU ); diff --git a/include/framework/menuconfiguration.hxx b/include/framework/menuconfiguration.hxx index c0c4ee4..bea35d6 100644 --- a/include/framework/menuconfiguration.hxx +++ b/include/framework/menuconfiguration.hxx @@ -89,10 +89,8 @@ class FWE_DLLPUBLIC MenuConfiguration ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream ) throw ( ::com::sun::star::lang::WrappedTargetException ); - PopupMenu* CreateBookmarkMenu( - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - const OUString& aURL ) - throw ( ::com::sun::star::lang::WrappedTargetException ); + PopupMenu* CreateBookmarkMenu(css::uno::Reference<css::frame::XFrame >& rFrame, const OUString& aURL) + throw (css::lang::WrappedTargetException, css::uno::RuntimeException); ToolBox* CreateToolBoxFromConfiguration( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream ) commit b6e73c54c689e0b1709ea85006968ddb9d75dc95 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:48:06 2014 +0100 coverity#735804 Explicit null dereferenced Change-Id: I78e1d0ada0728e07e8ea9985eec1ef7334598152 diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 3c00f78..35af1f7 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1022,13 +1022,6 @@ void ScColorScale3FrmtEntry::SetInactive() IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) { - bool bEnableEdit = true; - sal_Int32 nPos = pBox->GetSelectEntryPos(); - if(nPos < 2) - { - bEnableEdit = false; - } - Edit* pEd = NULL; if(pBox == &maLbEntryTypeMin) pEd = &maEdMin; @@ -1037,6 +1030,16 @@ IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) else if(pBox == &maLbEntryTypeMax) pEd = &maEdMax; + if (!pEd) + return 0; + + bool bEnableEdit = true; + sal_Int32 nPos = pBox->GetSelectEntryPos(); + if(nPos < 2) + { + bEnableEdit = false; + } + if(bEnableEdit) pEd->Enable(); else commit 15c819987fbf1feb534884e0c3a1fbcda2575252 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:47:19 2014 +0100 coverity#735803 Explicit null dereferenced Change-Id: Icc65234f1ba54b571097efc0b4e4537a7da99ea8 diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index cbea8fe..3c00f78 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -848,6 +848,15 @@ void ScColorScale2FrmtEntry::SetInactive() IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox*, pBox ) { + Edit* pEd = NULL; + if (pBox == &maLbEntryTypeMin) + pEd = &maEdMin; + else if (pBox == &maLbEntryTypeMax) + pEd = &maEdMax; + + if (!pEd) + return 0; + bool bEnableEdit = true; sal_Int32 nPos = pBox->GetSelectEntryPos(); if(nPos < 2) @@ -855,13 +864,7 @@ IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox*, pBox ) bEnableEdit = false; } - Edit* pEd = NULL; - if(pBox == &maLbEntryTypeMin) - pEd = &maEdMin; - else if(pBox == &maLbEntryTypeMax) - pEd = &maEdMax; - - if(bEnableEdit) + if (bEnableEdit) pEd->Enable(); else pEd->Disable(); commit 88bb7256d16c490fd93d043ab2d1aefbc0f195a4 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:43:04 2014 +0100 coverity#705035 Explicit null dereferenced Change-Id: I92e43c2c325fc9a2f3d0154090fb076dad589868 diff --git a/sw/source/core/uibase/uno/unotxdoc.cxx b/sw/source/core/uibase/uno/unotxdoc.cxx index 945bc0a..6c7fb3b 100644 --- a/sw/source/core/uibase/uno/unotxdoc.cxx +++ b/sw/source/core/uibase/uno/unotxdoc.cxx @@ -1468,7 +1468,8 @@ void SwXTextDocument::InitNewDoc() } OSL_ENSURE(pNumFmt, "No number formatter available"); - pNumFmt->SetNumberFormatter(0); + if (pNumFmt) + pNumFmt->SetNumberFormatter(0); } if(pxXTextFieldTypes) commit aa21145ef3b942f6db530f035c6ea9a246151241 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:38:00 2014 +0100 coverity#705025 Explicit null dereferenced Change-Id: I6fa17cf08c8104b7b64f66f6701fe8d0949b88bc diff --git a/sw/source/core/uibase/shells/drwbassh.cxx b/sw/source/core/uibase/shells/drwbassh.cxx index 71ce949..be1fea3 100644 --- a/sw/source/core/uibase/shells/drwbassh.cxx +++ b/sw/source/core/uibase/shells/drwbassh.cxx @@ -202,27 +202,18 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if (bCaption) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if ( pFact ) - { - AbstractSvxCaptionDialog* pCaptionDlg = - pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors ); - pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); - pDlg = pCaptionDlg; - OSL_ENSURE(pDlg, "Dialogdiet fail!"); - } + AbstractSvxCaptionDialog* pCaptionDlg = + pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors ); + pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); + pDlg = pCaptionDlg; } else { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if ( pFact ) - { - - AbstractSvxTransformTabDialog* pTransform = - pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors ); - pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); - pDlg = pTransform; - OSL_ENSURE(pDlg, "Dialogdiet fail!"); - } + AbstractSvxTransformTabDialog* pTransform = + pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors ); + pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); + pDlg = pTransform; } SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked()); commit 3982bcd07349d8c8c6ab00d7777c6a9a6f4a8ddb Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:36:12 2014 +0100 coverity#705018 Explicit null dereferenced Change-Id: I13777df8fbe03aae8f55491fef144d48da3bb312 diff --git a/sw/source/core/uibase/index/toxmgr.cxx b/sw/source/core/uibase/index/toxmgr.cxx index 2b4964a..67845e7 100644 --- a/sw/source/core/uibase/index/toxmgr.cxx +++ b/sw/source/core/uibase/index/toxmgr.cxx @@ -150,6 +150,10 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc) break; default:; //prevent warning } + + if (!pMark) + return; + pSh->StartAllAction(); pSh->SwEditShell::Insert(*pMark); pSh->EndAllAction(); commit 89fe93e4597ff117361df889e0a347ff009abc42 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:34:18 2014 +0100 coverity#704824 Explicit null dereferenced Change-Id: Ia05933f296c5e72982ef394e948bf90ebde583f4 diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 6459475..bab4d97 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1717,10 +1717,13 @@ void FmXFormView::startMarkListWatching() { if ( !m_pWatchStoredList ) { - m_pWatchStoredList = new ObjectRemoveListener( this ); FmFormModel* pModel = GetFormShell() ? GetFormShell()->GetFormModel() : NULL; DBG_ASSERT( pModel != NULL, "FmXFormView::startMarkListWatching: shell has no model!" ); - m_pWatchStoredList->StartListening( *static_cast< SfxBroadcaster* >( pModel ) ); + if (pModel) + { + m_pWatchStoredList = new ObjectRemoveListener( this ); + m_pWatchStoredList->StartListening( *static_cast< SfxBroadcaster* >( pModel ) ); + } } else { commit 98d8e26fb6597b4c29fd7baa0941b547dd10f055 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:29:13 2014 +0100 coverity#704960 Explicit null dereferenced Change-Id: I7b2625cced4c30b2fa61f69fc36553faf6af035e diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 8d14d4b..f8247ed 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3940,6 +3940,10 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle( default: ; } + + if( !pPropSet) + throw uno::RuntimeException(); + SwAttrSet aSet( pDocShell->GetDoc()->GetAttrPool(), pRange ); const beans::PropertyValue* pSeq = Values.getConstArray(); sal_Int32 nLen = Values.getLength(); commit d7c72fcd591909ded965b97c29c29e58a829bb45 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 7 09:27:19 2014 +0100 coverity#705004 Explicit null dereferenced Change-Id: I1f0638c4ba4355483b92dda3c912c859e9f8364a diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 0215106..68ed796 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -864,19 +864,19 @@ void SwXMLImport::endDocument( void ) delete pSttNdIdx; pSttNdIdx = 0; - if( (getImportFlags() == IMPORT_ALL ) ) - { - // Notify math objects. If we are in the package filter this will - // be done by the filter object itself - if( IsInsertMode() ) - pDoc->PrtOLENotify( sal_False ); - else if ( pDoc->IsOLEPrtNotifyPending() ) - pDoc->PrtOLENotify( sal_True ); - } - // SJ: #i49801# -> now permitting repaints if ( pDoc ) { + if( (getImportFlags() == IMPORT_ALL ) ) + { + // Notify math objects. If we are in the package filter this will + // be done by the filter object itself + if( IsInsertMode() ) + pDoc->PrtOLENotify( sal_False ); + else if ( pDoc->IsOLEPrtNotifyPending() ) + pDoc->PrtOLENotify( sal_True ); + } + SdrModel* pDrawModel = pDoc->GetDrawModel(); if ( pDrawModel ) pDrawModel->setLock(false);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits