connectivity/source/drivers/dbase/DTable.cxx | 15 +++++++++++++-- connectivity/source/drivers/firebird/Util.cxx | 16 +++++++++++----- cui/source/dialogs/hangulhanjadlg.cxx | 13 ++++++++----- cui/source/inc/hangulhanjadlg.hxx | 2 +- framework/source/layoutmanager/toolbarlayoutmanager.cxx | 2 +- package/source/zippackage/zipfileaccess.cxx | 14 +++++++++++++- sc/source/ui/drawfunc/fusel.cxx | 2 +- sc/source/ui/miscdlgs/conflictsdlg.cxx | 2 +- sd/source/ui/func/fucopy.cxx | 16 ++++++++-------- sd/source/ui/func/fupage.cxx | 2 +- sd/source/ui/func/futempl.cxx | 4 ++-- sw/source/core/attr/format.cxx | 3 ++- sw/source/core/doc/CntntIdxStore.cxx | 2 +- vcl/source/outdev/map.cxx | 8 ++++++++ writerfilter/source/dmapper/PropertyMap.cxx | 2 +- 15 files changed, 72 insertions(+), 31 deletions(-)
New commits: commit 5b40565e6a47b8f3a655d1c10adc61b71de29d6b Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:23:08 2014 +0100 coverity#706594 Uncaught exception Change-Id: Iad8f124706789299f36127f0d0fd0a47db07bace diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index a660d3e..688f389 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -252,7 +252,19 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName ) false, m_aMutexHolder); } - catch (const io::IOException& e) + catch (const container::NoSuchElementException&) + { + throw; + } + catch (const lang::WrappedTargetException&) + { + throw; + } + catch (const uno::RuntimeException&) + { + throw; + } + catch (const uno::Exception& e) { throw lang::WrappedTargetException( "This package is unusable!", static_cast < OWeakObject * > ( this ), commit 6b5fb7ef6ab6e3bf555fa707f53e68dd07da9125 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:18:12 2014 +0100 coverity#706301 Uncaught exception Change-Id: I6c81df21c7c8713e3d409fb9418e6d6bcca48d68 diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index b408f39..5d04f13 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1102,8 +1102,19 @@ bool ODbaseTable::CreateImpl() if (!CreateMemoFile(aURL)) { aURL.setExtension(aExt); // kill dbf file - Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); - aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + try + { + Content aMemoContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>(), comphelper::getProcessComponentContext()); + aMemoContent.executeCommand( "delete", css::uno::Any( true ) ); + } + catch(const ContentCreationException&) + { + const OUString sError( getConnection()->getResources().getResourceStringWithSubstitution( + STR_COULD_NOT_DELETE_FILE, + "$name$", aName + ) ); + ::dbtools::throwGenericSQLException( sError, *this ); + } return false; } m_aHeader.db_typ = dBaseIIIMemo; commit b418b70f0b168ca03242106d669d3c305ea151fc Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:16:21 2014 +0100 coverity#704848 Dereference after null check Change-Id: I1e0cc28ca52ebabb680d59e3a693a6cefd2e2f9a diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 54ececf..ddd183e 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -304,7 +304,8 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) // the new one // skip my own Modify - if( ((SwFmtChg*)pOldValue)->pChangedFmt != this && + if ( pOldValue && pNewValue && + ((SwFmtChg*)pOldValue)->pChangedFmt != this && ((SwFmtChg*)pNewValue)->pChangedFmt == DerivedFrom() ) { // attach Set to new parent commit 7ce763089b221cd603bba70054e6efb5bdeecbf4 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:13:21 2014 +0100 coverity#704759 Dereference after null check Change-Id: I1f41d2bc43391175a4587f501f02775adc43bc8e diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 8ff19b5..303e0b3 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -154,7 +154,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } } - if (pArgs->GetItemState(nSId) == SFX_ITEM_SET) + if (pArgs && pArgs->GetItemState(nSId) == SFX_ITEM_SET) aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() ); } } @@ -171,7 +171,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } pStyleSheet = &pSSPool->Make( aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_USERDEF ); - if (pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_ON) + if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_ON) { OUString aParentName(((const SfxStringItem&) pArgs->Get(SID_STYLE_REFERENCE)).GetValue()); pStyleSheet->SetParent(aParentName); commit a01783051a8f35370b49a5838bf4928b6a50a19a Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:12:34 2014 +0100 coverity#704753 Dereference after null check Change-Id: I4886995b925e3332e67d08a60e53a251be9f81e5 diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index bd11ce8..53429c3 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -480,7 +480,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) { - if( !pArgs ) + if (!pArgs || !mpDrawViewShell) return; // Set new page-attributes commit c8bb0b241674f6eb834711e8ac18cd5fb6bc5c7f Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:11:11 2014 +0100 coverity#704748 Dereference after null check Change-Id: I88552b40658df85bbfbf0848e94085aa8eb649b6 diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index a93d7de..e237f82 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -134,30 +134,30 @@ void FuCopy::DoExecute( SfxRequest& rReq ) const SfxPoolItem* pPoolItem = NULL; // Count - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) ) nNumber = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue(); // translation - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) lSizeX = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) lSizeY = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) lAngle = ( ( const SfxInt32Item* )pPoolItem )->GetValue(); // scale - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) lWidth = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) lHeight = ( ( const SfxInt32Item* ) pPoolItem )->GetValue(); // start/end color - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { aStartColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); bColor = true; } - if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) + if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, true, &pPoolItem ) ) { aEndColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue(); if( aStartColor == aEndColor ) commit 67fa2dc017695850f7230d0204621a863676d1f2 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:09:34 2014 +0100 coverity#704706 Unchecked dynamic_cast Change-Id: I22f376f747ffbb7f559d7e0ea631e2baae92138f diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 63a6fd0..dacd140 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -759,7 +759,7 @@ void ScConflictsDlg::UpdateView() // only display shared top content entries if ( pAction->GetType() == SC_CAT_CONTENT ) { - ScChangeActionContent* pNextContent = ( dynamic_cast< ScChangeActionContent* >( pAction ) )->GetNextContent(); + ScChangeActionContent* pNextContent = (dynamic_cast<ScChangeActionContent&>(*pAction)).GetNextContent(); if ( pNextContent && aItr->HasSharedAction( pNextContent->GetActionNumber() ) ) { continue; commit b46a98d9092a28dc4e221c84ac62e09a53cebfb2 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:08:32 2014 +0100 coverity#704702 Dereference after null check Change-Id: Ie87a6e27a399b2c758e160eed1ab0f4b1704b5cd diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index ff6ca89..415e5a4 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -517,7 +517,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) SdrViewEvent aVEvt; SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ); - if ( eHit != SDRHIT_NONE && aVEvt.pObj == pObj ) + if (eHit != SDRHIT_NONE && aVEvt.pObj == pObj && pViewShell) { sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); commit 16c4dcf4e61bcec42637141293a7ad22a676b741 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:07:18 2014 +0100 coverity#704648 Dereference after null check Change-Id: I52b5fa71a440778d3423db84a3bf374f0c2654b9 diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index a428ccd..c936f7a 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -3676,7 +3676,7 @@ throw (uno::RuntimeException, std::exception) { if ( pToolBox ) aUIDockingElement.m_aFloatingData.m_aSize = AWTSize(pToolBox->CalcFloatingWindowSizePixel()); - else + else if ( pWindow ) aUIDockingElement.m_aFloatingData.m_aSize = AWTSize(pWindow->GetOutputSizePixel()); } commit 4cc1ed9ae9532c82deace99689e3eee89c39ef9e Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 21:00:58 2014 +0100 coverity#707564 Uninitialized scalar variable and coverity#707566 Uninitialized scalar variable coverity#707568 Uninitialized scalar variable coverity#707576 Uninitialized scalar variable coverity#1028320 Uninitialized scalar variable Change-Id: I7191d019c1d7c4382253272fe7d58d82a4b41e13 diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index eb82156..819f7db 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -1601,6 +1601,10 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& r aMapResSource.mnMapScNumY = 1; \ aMapResSource.mnMapScDenomX = 1; \ aMapResSource.mnMapScDenomY = 1; \ + aMapResSource.mfOffsetX = 0.0; \ + aMapResSource.mfOffsetY = 0.0; \ + aMapResSource.mfScaleX = 1.0; \ + aMapResSource.mfScaleY = 1.0; \ ImplMapRes aMapResDest(aMapResSource); \ \ if ( !mbMap || pMapModeSource != &maMapMode ) \ @@ -1661,6 +1665,10 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& r aMapResSource.mnMapScNumY = 1; \ aMapResSource.mnMapScDenomX = 1; \ aMapResSource.mnMapScDenomY = 1; \ + aMapResSource.mfOffsetX = 0.0; \ + aMapResSource.mfOffsetY = 0.0; \ + aMapResSource.mfScaleX = 1.0; \ + aMapResSource.mfScaleY = 1.0; \ ImplMapRes aMapResDest(aMapResSource); \ \ ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \ commit fb5a2291e499296a14ecd043341828d57fc50416 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 20:54:14 2014 +0100 coverity#1228873 Division or modulo by float zero Change-Id: Iffd200c6a7028206d91c036cc3a726ad19bd5bc8 diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 6aace22..c625846 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -633,7 +633,7 @@ uno::Reference< text::XTextColumns > SectionPropertyMap::ApplyColumnProperties( } sal_Int32 nRefValue = xColumns->getReferenceValue(); - double fRel = double( nRefValue ) / double( nColSum ); + double fRel = nColSum ? double( nRefValue ) / double( nColSum ) : 0.0; uno::Sequence< text::TextColumn > aColumns( m_nColumnCount + 1 ); text::TextColumn* pColumn = aColumns.getArray(); commit 28b98516e53d1c6107b40eb994d25641195718e1 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 20:50:16 2014 +0100 coverity#1079093 Uncaught exception Change-Id: I4b09963e2daf22dcd006fee0ce0bb130c7c18342 diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx index 9a13857..448fa3a 100644 --- a/connectivity/source/drivers/firebird/Util.cxx +++ b/connectivity/source/drivers/firebird/Util.cxx @@ -8,7 +8,6 @@ */ #include "Util.hxx" - #include <rtl/ustrbuf.hxx> using namespace ::connectivity; @@ -39,11 +38,18 @@ void firebird::evaluateStatusVector(ISC_STATUS_ARRAY& aStatusVector, const ISC_STATUS* pStatus = (const ISC_STATUS*) &aStatusVector; buf.appendAscii("firebird_sdbc error:"); - while(fb_interpret(msg, sizeof(msg), &pStatus)) + try + { + while(fb_interpret(msg, sizeof(msg), &pStatus)) + { + // TODO: verify encoding + buf.appendAscii("\n*"); + buf.append(OUString(msg, strlen(msg), RTL_TEXTENCODING_UTF8)); + } + } + catch (...) { - // TODO: verify encoding - buf.appendAscii("\n*"); - buf.append(OUString(msg, strlen(msg), RTL_TEXTENCODING_UTF8)); + SAL_WARN("connectivity.firebird", "ignore fb_interpret exception"); } buf.appendAscii("\ncaused by\n'").append(aCause).appendAscii("'\n"); commit bc9e82317a534d9da56a6de83479fc8f7ff2428e Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 17:53:39 2014 +0100 coverity#1228874 Uninitialized scalar variable Change-Id: I784ee8e0de87996e408656ffed5b8326cc0ab74f diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 5f9b44a..56c554d 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -312,7 +312,7 @@ void CntntIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt, if( !pFrm->GetDrawObjs() ) return; // if we have a layout and no DrawObjs, we can skip this } - MarkEntry aSave; + MarkEntry aSave = { 0, false, 0 }; BOOST_FOREACH(const SwFrmFmt* pFrmFmt, *pDoc->GetSpzFrmFmts()) { if ( RES_FLYFRMFMT == pFrmFmt->Which() || RES_DRAWFRMFMT == pFrmFmt->Which() ) commit fe951dc06a098d7f585d01f4050bc1325e5dacad Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jul 26 17:49:27 2014 +0100 coverity#1228876 Uninitialized pointer field Change-Id: I8de9efc5abfa01225aa6032bf68a32fed17aeb00 diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index ea931c6..cbc4942 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1354,12 +1354,12 @@ namespace svx if( _bUp ) { if( !m_pPrev ) - bRet = m_rScrollBar->GetThumbPos() > m_rScrollBar->GetRangeMin(); + bRet = m_pScrollBar->GetThumbPos() > m_pScrollBar->GetRangeMin(); } else { if( !m_pNext ) - bRet = m_rScrollBar->GetThumbPos() < ( m_rScrollBar->GetRangeMax() - 4 ); + bRet = m_pScrollBar->GetThumbPos() < ( m_pScrollBar->GetRangeMax() - 4 ); } return bRet; @@ -1370,13 +1370,16 @@ namespace svx const Link& rLoseFocusHdl = GetLoseFocusHdl(); if( rLoseFocusHdl.IsSet() ) rLoseFocusHdl.Call( this ); - m_rScrollBar->SetThumbPos( m_rScrollBar->GetThumbPos() + ( _bUp? -1 : 1 ) ); + m_pScrollBar->SetThumbPos( m_pScrollBar->GetThumbPos() + ( _bUp? -1 : 1 ) ); ( static_cast< HangulHanjaEditDictDialog* >( GetParentDialog() ) )->UpdateScrollbar(); } SuggestionEdit::SuggestionEdit( Window* pParent, WinBits nBits ) - :Edit( pParent, nBits ) + : Edit(pParent, nBits) + , m_pPrev(NULL) + , m_pNext(NULL) + , m_pScrollBar(NULL) { } @@ -1435,7 +1438,7 @@ namespace svx void SuggestionEdit::init( ScrollBar* pScrollBar, SuggestionEdit* pPrev, SuggestionEdit* pNext) { - m_rScrollBar = pScrollBar; + m_pScrollBar = pScrollBar; m_pPrev = pPrev; m_pNext = pNext; } diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index 47429bb..6b1828a 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -255,7 +255,7 @@ namespace svx private: SuggestionEdit* m_pPrev; SuggestionEdit* m_pNext; - ScrollBar* m_rScrollBar; + ScrollBar* m_pScrollBar; bool ShouldScroll( bool _bUp ) const; void DoJump( bool _bUp );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits