codemaker/source/cppumaker/cpputype.cxx | 3 + offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl | 1 package/source/xstor/xstorage.cxx | 5 ++ package/source/xstor/xstorage.hxx | 3 + sc/source/core/tool/interpr1.cxx | 2 - svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2 - sw/source/core/layout/pagechg.cxx | 2 - unoxml/source/rdf/librdf_repository.cxx | 25 +++++++++----- 8 files changed, 31 insertions(+), 12 deletions(-)
New commits: commit 744a0dca6f91b7ccf9d8c5fac816c52833e0a306 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:46:19 2014 +0100 coverity#704911 Dereference after null check Change-Id: Ifd556b56230f359b2d8b95795686a4a6803fa6dc diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 34b3488..45c3f51 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2159,7 +2159,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi } } } - while ( pPageToAdjust != pEndOfRow ); + while (pPageToAdjust && pPageToAdjust != pEndOfRow); // adjust values for root frame size nSumRowHeight = nSumRowHeight + nCurrentRowHeight; commit 09d79da135fcf7a16e7b692cf0264cc5432f57b4 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:35:13 2014 +0100 coverity#1219788 Unchecked dynamic_cast Change-Id: I1bedfb601320bc27adc0d0d72fcb8b3c5dfe73ff diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 83d0a41..5887635 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -3039,6 +3039,9 @@ bool ExceptionType::dumpBaseMembers( rtl::Reference< unoidl::ExceptionTypeEntity > ent2( dynamic_cast< unoidl::ExceptionTypeEntity * >(ent.get())); assert(ent2.is()); + if (!ent2.is()) { + return false; + } hasMember = dumpBaseMembers( out, ent2->getDirectBase(), withType, eligibleForDefaults && ent2->getDirectMembers().empty() ); int memberCount = 0; commit 219eb78e3a04d859fa107c5b0c5ff40f4524c4d2 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:29:40 2014 +0100 coverity#706572 Uncaught exception Change-Id: I579d13981aed4b55501a85326ef2ff735937face diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index cfa6c77..f7a8b6e 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -4763,7 +4763,7 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u // The old document might have no version in the manifest.xml, so we have to allow to set the version // even for readonly storages, so that the version from content.xml can be used. if ( m_pData->m_bReadOnlyWrap && aPropertyName != "Version" ) - throw io::IOException( THROW_WHERE ); // TODO: Access denied + throw uno::RuntimeException( THROW_WHERE ); // TODO: Access denied if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP ) throw beans::UnknownPropertyException( THROW_WHERE ); commit 96bc7ea1d30284ec7b3d0284d4478420b93c04b2 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:26:50 2014 +0100 coverity#706579 Uncaught exception Change-Id: Ie4d2eed7442ab1e234ea20e8230f1fab32b8c896 diff --git a/offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl b/offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl index 35413a7..93996a8 100644 --- a/offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl +++ b/offapi/com/sun/star/embed/XHierarchicalStorageAccess2.idl @@ -81,6 +81,7 @@ interface XHierarchicalStorageAccess2 : XHierarchicalStorageAccess ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::NoEncryptionException, ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException ); }; diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 8479eb8..cfa6c77 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -6044,6 +6044,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted lang::IllegalArgumentException, packages::NoEncryptionException, packages::WrongPasswordException, + container::NoSuchElementException, io::IOException, embed::StorageWrappedTargetException, uno::RuntimeException, std::exception ) diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index 413590e..3d70f3d 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -804,6 +804,7 @@ public: ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::NoEncryptionException, ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; commit f1c75c6d49c4e263657670da1e5b44d9a382f7ac Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:15:28 2014 +0100 coverity#1158284 Uncaught exception Change-Id: I19e541707fa91d6a651b8642585276cbdbb2dca8 diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index b7333f6..2cdcdaa 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -1599,15 +1599,24 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, } else { m_RDFaXHTMLContentSet.insert(sXmlId); } - for (::std::vector< ::boost::shared_ptr<librdf_TypeConverter::Resource> > - ::iterator iter = predicates.begin(); iter != predicates.end(); - ++iter) + try { - addStatementGraph_Lock( - librdf_TypeConverter::Statement(pSubject, - ::boost::dynamic_pointer_cast<librdf_TypeConverter::URI>(*iter), - pContent), - sContext, true); + for (::std::vector< ::boost::shared_ptr<librdf_TypeConverter::Resource> > + ::iterator iter = predicates.begin(); iter != predicates.end(); + ++iter) + { + addStatementGraph_Lock( + librdf_TypeConverter::Statement(pSubject, + ::boost::dynamic_pointer_cast<librdf_TypeConverter::URI>(*iter), + pContent), + sContext, true); + } + } + catch (const container::NoSuchElementException& e) + { + throw lang::WrappedTargetRuntimeException( + "librdf_Repository::setStatementRDFa: " + "cannot addStatementGraph", *this, uno::makeAny(e)); } } commit 89b8e673b7f37d2c990374e3ca80ad6138d0d783 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:12:03 2014 +0100 coverity#1209891 Uncaught exception Change-Id: I366a13bc150085d647788fb085a63a63711731a0 diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 40ba871..8479eb8 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -1652,6 +1652,7 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName, lang::IllegalArgumentException, packages::WrongPasswordException, packages::NoEncryptionException, + container::NoSuchElementException, io::IOException, embed::StorageWrappedTargetException, uno::RuntimeException ) diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index 778f0ee..413590e 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -265,6 +265,7 @@ struct OStorage_Impl ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::WrongPasswordException, ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); commit 3e33b00ce7f39348de2dc7af7b94b1012ce95aff Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:10:18 2014 +0100 coverity#1209892 Uncaught exception Change-Id: I7ff87e29769e1d911002d6e1d25cafe40c2d9b8a diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index f9ddbd6..40ba871 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -1651,6 +1651,7 @@ void OStorage_Impl::CloneStreamElement( const OUString& aStreamName, throw ( embed::InvalidStorageException, lang::IllegalArgumentException, packages::WrongPasswordException, + packages::NoEncryptionException, io::IOException, embed::StorageWrappedTargetException, uno::RuntimeException ) diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index b7bb5be..778f0ee 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -264,6 +264,7 @@ struct OStorage_Impl throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::packages::WrongPasswordException, + ::com::sun::star::packages::NoEncryptionException, ::com::sun::star::io::IOException, ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); commit 8547599e0e27dd38bdbd76201d2359c59c3650f2 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 11:02:07 2014 +0100 coverity#1209371 Division or modulo by float zero Change-Id: I8834b81b71746daaf97f7b62d09421d5165fa707 diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 7254529..1371caa 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -392,7 +392,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F while( aOutlineIter != aOutlineIEnd ) { Rectangle aPolyPolyBoundRect( aOutlineIter->GetBoundRect() ); - if ( aPolyPolyBoundRect.GetHeight() != rParagraphBoundRect.GetHeight() ) + if (aPolyPolyBoundRect.GetHeight() != rParagraphBoundRect.GetHeight() && aPolyPolyBoundRect.GetHeight()) aOutlineIter->Scale( 1.0, (double)rParagraphBoundRect.GetHeight() / aPolyPolyBoundRect.GetHeight() ); aPolyPolyBoundRect = aOutlineIter->GetBoundRect(); sal_Int32 nMove = aPolyPolyBoundRect.Top() - rParagraphBoundRect.Top(); commit 32162d327bc4356bc69ee4c8e82f0dbc3c8e3076 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 25 10:59:34 2014 +0100 coverity#735613 Division or modulo by float zero Change-Id: Ib441ec962abb9f87ca27ea5300f23a0515d3db2b diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 544f173..61587a1 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -6820,7 +6820,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc ) { case ifCOUNT: nErg = nCount; break; case ifSUM: nErg = ::rtl::math::approxAdd( nErg, fMem ); break; - case ifAVERAGE: nErg = ::rtl::math::approxAdd( nErg, fMem ) / nCount; break; + case ifAVERAGE: nErg = div(::rtl::math::approxAdd(nErg, fMem), nCount); break; default: ; // nothing } PushDouble( nErg );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits