New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Wed Jul 8 05:27:06 PDT 2015
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
6 new defect(s) introduced to LibreOffice found with Coverity Scan.
12 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 6 of 6 defect(s)
** CID 1311336: Uninitialized members (UNINIT_CTOR)
/cui/source/options/optaboutconfig.cxx: 68 in UserData::UserData(const rtl::OUString &)()
________________________________________________________________________________________________________
*** CID 1311336: Uninitialized members (UNINIT_CTOR)
/cui/source/options/optaboutconfig.cxx: 68 in UserData::UserData(const rtl::OUString &)()
62 int aLineage;
63 Reference<XNameAccess> aXNameAccess;
64
65 explicit UserData( OUString const & rPropertyPath )
66 : bIsPropertyPath( true )
67 , sPropertyPath(rPropertyPath)
>>> CID 1311336: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "aLineage" is not initialized in this constructor nor in any functions that it calls.
68 {}
69
70 explicit UserData( Reference<XNameAccess> const & rXNameAccess, int rIndex = 0 )
71 : bIsPropertyPath( false )
72 , aLineage(rIndex)
73 , aXNameAccess( rXNameAccess )
** CID 1311335: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaapplication.cxx: 1066 in <unnamed>::lclCreateVbaRange(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Reference<com::sun::star::frame::XModel> &, const std::list<ScRange, std::allocator<ScRange>> &)()
________________________________________________________________________________________________________
*** CID 1311335: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaapplication.cxx: 1066 in <unnamed>::lclCreateVbaRange(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Reference<com::sun::star::frame::XModel> &, const std::list<ScRange, std::allocator<ScRange>> &)()
1060 // again, join the result ranges
1061 lclJoinRanges( rList );
1062 }
1063 }
1064
1065 /** Creates a VBA Range object from the passed list of ranges. */
>>> CID 1311335: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list "throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
1066 uno::Reference< excel::XRange > lclCreateVbaRange(
1067 const uno::Reference< uno::XComponentContext >& rxContext,
1068 const uno::Reference< frame::XModel >& rxModel,
1069 const ListOfScRange& rList ) throw (uno::RuntimeException)
1070 {
1071 ScDocShell* pDocShell = excel::getDocShell( rxModel );
** CID 1311334: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 860 in ScVbaEventsHelper::createRange(const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &, int) const()
________________________________________________________________________________________________________
*** CID 1311334: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 860 in ScVbaEventsHelper::createRange(const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &, int) const()
854 {
855 // extract sheet index, will throw, if parameter is invalid
856 SCTAB nTab = lclGetTabFromArgs( rArgs, nIndex );
857 return uno::Any( excel::getUnoSheetModuleObj( mxModel, nTab ) );
858 }
859
>>> CID 1311334: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list "throw(com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException)" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
860 uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
861 throw (lang::IllegalArgumentException, uno::RuntimeException)
862 {
863 // it is possible to pass an existing VBA Range object
864 uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< excel::XRange >( rArgs, nIndex );
865 if( !xVbaRange.is() )
** CID 1311333: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 1238 in getRangeForName(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const rtl::OUString &, ScDocShell *, com::sun::star::table::CellRangeAddress &, formula::FormulaGrammar::AddressConvention)()
________________________________________________________________________________________________________
*** CID 1311333: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 1238 in getRangeForName(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const rtl::OUString &, ScDocShell *, com::sun::star::table::CellRangeAddress &, formula::FormulaGrammar::AddressConvention)()
1232 }
1233 }
1234 return true;
1235 }
1236
1237 ScVbaRange*
>>> CID 1311333: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list "throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
1238 getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException )
1239 {
1240 ScRangeList aCellRanges;
1241 ScRange refRange;
1242 ScUnoConversion::FillScRange( refRange, pAddr );
1243 if ( !getScRangeListForAddress ( sName, pDocSh, refRange, aCellRanges, eConv ) )
** CID 1311332: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 888 in ScVbaEventsHelper::createHyperlink(const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &, int) const()
________________________________________________________________________________________________________
*** CID 1311332: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 888 in ScVbaEventsHelper::createHyperlink(const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &, int) const()
882 }
883 xVbaRange.set( createVBAUnoAPIServiceWithArgs( mpShell, "ooo.vba.excel.Range", aArgs ), uno::UNO_QUERY_THROW );
884 }
885 return uno::Any( xVbaRange );
886 }
887
>>> CID 1311332: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list "throw(com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException)" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
888 uno::Any ScVbaEventsHelper::createHyperlink( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) const
889 throw (lang::IllegalArgumentException, uno::RuntimeException)
890 {
891 uno::Reference< table::XCell > xCell = getXSomethingFromArgs< table::XCell >( rArgs, nIndex, false );
892 uno::Sequence< uno::Any > aArgs( 2 );
893 aArgs[ 0 ] <<= excel::getUnoSheetModuleObj( xCell );
** CID 1311331: (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 4191 in ScVbaRange::ApplicationRange(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Any &, const com::sun::star::uno::Any &)()
/sc/source/ui/vba/vbarange.cxx: 4191 in ScVbaRange::ApplicationRange(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Any &, const com::sun::star::uno::Any &)()
________________________________________________________________________________________________________
*** CID 1311331: (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 4191 in ScVbaRange::ApplicationRange(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Any &, const com::sun::star::uno::Any &)()
4185 return xSheet;
4186 }
4187
4188 // #TODO remove this ugly application processing
4189 // Process an application Range request e.g. 'Range("a1,b2,a4:b6")
4190 uno::Reference< excel::XRange >
>>> CID 1311331: (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list "throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
4191 ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException)
4192 {
4193 // Although the documentation seems clear that Range without a
4194 // qualifier then it's a shortcut for ActiveSheet.Range
4195 // however, similarly Application.Range is apparently also a
4196 // shortcut for ActiveSheet.Range
/sc/source/ui/vba/vbarange.cxx: 4191 in ScVbaRange::ApplicationRange(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Any &, const com::sun::star::uno::Any &)()
4185 return xSheet;
4186 }
4187
4188 // #TODO remove this ugly application processing
4189 // Process an application Range request e.g. 'Range("a1,b2,a4:b6")
4190 uno::Reference< excel::XRange >
>>> CID 1311331: (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list "throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
4191 ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException)
4192 {
4193 // Although the documentation seems clear that Range without a
4194 // qualifier then it's a shortcut for ActiveSheet.Range
4195 // however, similarly Application.Range is apparently also a
4196 // shortcut for ActiveSheet.Range
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/211?tab=overview
To manage Coverity Scan email notifications for "libreoffice at lists.freedesktop.org", click https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939
More information about the LibreOffice
mailing list