basic/source/classes/sbunoobj.cxx | 4 - basic/source/inc/sbunoobj.hxx | 2 comphelper/source/property/propertycontainerhelper.cxx | 14 ++-- dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 4 - dbaccess/source/core/inc/SingleSelectQueryComposer.hxx | 4 - dbaccess/source/sdbtools/connection/datasourcemetadata.cxx | 3 dbaccess/source/sdbtools/connection/datasourcemetadata.hxx | 2 dbaccess/source/sdbtools/connection/objectnames.cxx | 4 - dbaccess/source/sdbtools/connection/objectnames.hxx | 4 - dbaccess/source/ui/uno/copytablewizard.cxx | 4 - editeng/source/accessibility/AccessibleEditableTextPara.cxx | 2 include/canvas/base/bufferedgraphicdevicebase.hxx | 2 include/comphelper/propertycontainerhelper.hxx | 2 include/editeng/AccessibleEditableTextPara.hxx | 2 offapi/com/sun/star/accessibility/XAccessibleText.idl | 4 - offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl | 8 -- offapi/com/sun/star/sdb/application/XCopyTableWizard.idl | 5 - offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl | 3 offapi/com/sun/star/sdb/tools/XObjectNames.idl | 6 + qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java | 10 ++- qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java | 12 +++ qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java | 32 +++++++++- sc/inc/appluno.hxx | 2 sc/source/ui/unoobj/unodoc.cxx | 2 sw/source/core/txtnode/thints.cxx | 4 - vcl/source/gdi/salmisc.cxx | 14 +++- wizards/com/sun/star/wizards/db/DBMetaData.java | 6 - wizards/com/sun/star/wizards/query/Finalizer.java | 6 + 28 files changed, 118 insertions(+), 49 deletions(-)
New commits: commit 1bc196059faf2fc53bf0ffce2f634b20da4a4a16 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 15:34:11 2014 +0100 coverity#1158079 Unchecked dynamic_cast Change-Id: Iab2c78af7dcf967ccdf5016266324c805856af0b diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 4f4eca6..4b327f7 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1036,13 +1036,13 @@ SwTxtAttr* MakeTxtAttr( case RES_TXTATR_ANNOTATION: { pNew = new SwTxtAnnotationFld( static_cast<SwFmtFld &>(rNew), nStt, rDoc.IsClipBoard() ); - if ( bIsCopy == COPY ) + if (bIsCopy == COPY) { // On copy of the annotation field do not keep the annotated text range by removing // the relation to its annotation mark (relation established via annotation field's name). // If the annotation mark is also copied, the relation and thus the annotated text range will be reestablished, // when the annotation mark is created and inserted into the document. - const_cast<SwPostItField*>(dynamic_cast< const SwPostItField* >(pNew->GetFmtFld().GetField()))->SetName( OUString() ); + const_cast<SwPostItField&>(dynamic_cast<const SwPostItField&>(*(pNew->GetFmtFld().GetField()))).SetName(OUString()); } } break; commit 9d22ab17b75e57d0e98ba1bf387f3274b0065643 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 15:29:34 2014 +0100 coverity#735993 Explicit null dereferenced Change-Id: Ib8b1af5a783a2bae285c24e5153cce4713a2e2dd diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index 9bb600f..3fc4c3c 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -342,7 +342,12 @@ BitmapBuffer* StretchAndConvert( ( nDstScanlineFormat == BMP_FORMAT_4BIT_LSN_PAL ) || ( nDstScanlineFormat == BMP_FORMAT_8BIT_PAL ) ) { - DBG_ASSERT( pDstPal, "destination buffer requires palette" ); + assert(pDstPal && "destination buffer requires palette"); + if (!pDstPal) + { + delete pDstBuffer; + return NULL; + } pDstBuffer->maPalette = *pDstPal; } else if( ( nDstScanlineFormat == BMP_FORMAT_8BIT_TC_MASK ) || @@ -351,7 +356,12 @@ BitmapBuffer* StretchAndConvert( ( nDstScanlineFormat == BMP_FORMAT_24BIT_TC_MASK ) || ( nDstScanlineFormat == BMP_FORMAT_32BIT_TC_MASK ) ) { - DBG_ASSERT( pDstMask, "destination buffer requires color mask" ); + assert(pDstMask && "destination buffer requires color mask"); + if (!pDstMask) + { + delete pDstBuffer; + return NULL; + } pDstBuffer->maColorMask = *pDstMask; } commit 7a54951fbb43c50f8b65876eb0e9672fdcf73e25 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 14:29:48 2014 +0100 coverity#1231667 Unchecked return value Change-Id: I40d8fc61b1e488955faa61c868877c7b6487c529 diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 62be2f6..ef24968 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -366,7 +366,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue( } -void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const Any& _rValue) +bool OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const Any& _rValue) { // get the property somebody is asking for PropertiesIterator aPos = searchHandle(_nHandle); @@ -375,9 +375,11 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An OSL_FAIL( "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" ); // should not happen if the derived class has built a correct property set info helper to be used by // our base class OPropertySetHelper - return; + return false; } + bool bSuccess = true; + switch (aPos->eLocated) { case PropertyDescription::ltHoldMyself: @@ -389,11 +391,8 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An break; case PropertyDescription::ltDerivedClassRealType: -#if OSL_DEBUG_LEVEL > 0 - bool bSuccess = -#endif // copy the data from the to-be-set value - uno_type_assignData( + bSuccess = uno_type_assignData( aPos->aLocation.pDerivedClassMember, aPos->aProperty.Type.getTypeLibType(), const_cast< void* >( _rValue.getValue() ), _rValue.getValueType().getTypeLibType(), reinterpret_cast< uno_QueryInterfaceFunc >( cpp_queryInterface ), @@ -405,8 +404,9 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An break; } -} + return bSuccess; +} void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const { diff --git a/include/comphelper/propertycontainerhelper.hxx b/include/comphelper/propertycontainerhelper.hxx index 9654985..1809b19 100644 --- a/include/comphelper/propertycontainerhelper.hxx +++ b/include/comphelper/propertycontainerhelper.hxx @@ -153,7 +153,7 @@ protected: const ::com::sun::star::uno::Any& rValue ); - void setFastPropertyValue( + bool setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ); commit d438c470d783c0245231855b20233c5b3e3e691d Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 14:27:09 2014 +0100 coverity#1231668 Unchecked return value Change-Id: Ia7e47b5d42e9a488b3952f12d607b3f17661c44d diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 2e6aa8f..f9938f5 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4797,9 +4797,9 @@ Any StructRefInfo::getValue() return aRet; } -void StructRefInfo::setValue( const Any& rValue ) +bool StructRefInfo::setValue( const Any& rValue ) { - uno_type_assignData( getInst(), + return uno_type_assignData( getInst(), maType.getTypeLibType(), (void*)rValue.getValue(), rValue.getValueTypeRef(), diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index aa5c2f9..5300e2c 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -60,7 +60,7 @@ public: bool isEmpty() { return (mnPos == -1); } ::com::sun::star::uno::Any getValue(); - void setValue( const ::com::sun::star::uno::Any& ); + bool setValue( const ::com::sun::star::uno::Any& ); }; class SbUnoStructRefObject: public SbxObject commit f8ce2e049c54bd68e5afa1632b8b43e43695cddc Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 12:21:01 2014 +0100 coverity#983635 Uncaught exception Change-Id: I4be3600af6ee97ba9f962edf9723c04d89b161e4 diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx index ee0a6aa4..c95334c 100644 --- a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx +++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx @@ -29,6 +29,7 @@ namespace sdbtools using ::com::sun::star::uno::Reference; using ::com::sun::star::sdbc::XConnection; using ::com::sun::star::lang::NullPointerException; + using ::com::sun::star::sdbc::SQLException; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::XComponentContext; @@ -51,7 +52,7 @@ namespace sdbtools { } - sal_Bool SAL_CALL DataSourceMetaData::supportsQueriesInFrom( ) throw (RuntimeException, std::exception) + sal_Bool SAL_CALL DataSourceMetaData::supportsQueriesInFrom( ) throw (RuntimeException, SQLException, std::exception) { EntryGuard aGuard( *this ); ::dbtools::DatabaseMetaData aMeta( getConnection() ); diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx index 5a454ef..67e58ec 100644 --- a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx +++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx @@ -58,7 +58,7 @@ namespace sdbtools ); // XDataSourceMetaData - virtual sal_Bool SAL_CALL supportsQueriesInFrom( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsQueriesInFrom() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; protected: virtual ~DataSourceMetaData(); diff --git a/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl b/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl index ba09c51..eb7f481 100644 --- a/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl +++ b/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl @@ -21,6 +21,7 @@ #define __com_sun_star_sdb_tools_XDataSourceMetaData_idl__ #include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/sdbc/SQLException.idl> module com { module sun { module star { module sdb { module tools { @@ -29,7 +30,7 @@ interface XDataSourceMetaData /** determines whether the data source supports queries in the <code>FROM</code> part of a <code>SELECT</code> statement. */ - boolean supportsQueriesInFrom( ); + boolean supportsQueriesInFrom() raises ( com::sun::star::sdbc::SQLException ); }; }; }; }; }; }; diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index b788f84..4106e75 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -762,14 +762,12 @@ public class DBMetaData } } - - - public boolean supportsQueriesInFrom() + public boolean supportsQueriesInFrom() throws SQLException { return m_connectionTools.getDataSourceMetaData().supportsQueriesInFrom(); } - public String suggestName( final int i_objectType, final String i_baseName ) throws IllegalArgumentException + public String suggestName( final int i_objectType, final String i_baseName ) throws IllegalArgumentException, SQLException { return m_connectionTools.getObjectNames().suggestName( i_objectType, i_baseName ); } diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index 853d478..9d6673e 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -21,6 +21,7 @@ import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XTextComponent; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.sdb.CommandType; +import com.sun.star.sdbc.SQLException; import com.sun.star.uno.AnyConverter; import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.Helper; @@ -147,6 +148,11 @@ public class Finalizer exception.printStackTrace(System.err); return PropertyNames.EMPTY_STRING; } + catch (SQLException exception) + { + exception.printStackTrace(System.err); + return PropertyNames.EMPTY_STRING; + } } private String getTitle() commit d2927e38a85e695662cfb08e5dd49bfb1b7c8b85 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 12:18:52 2014 +0100 coverity#983636 Uncaught exception Change-Id: I5c35d3085ec0dfa0e1d27caa9cdac5792d98812b diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 14caff6..cd3c088 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -413,7 +413,7 @@ namespace sdbtools return ::dbtools::convertName2SQLName( Name, xMeta->getExtraNameCharacters() ); } - sal_Bool SAL_CALL ObjectNames::isNameUsed( ::sal_Int32 _CommandType, const OUString& _Name ) throw (IllegalArgumentException, RuntimeException, std::exception) + sal_Bool SAL_CALL ObjectNames::isNameUsed( ::sal_Int32 _CommandType, const OUString& _Name ) throw (IllegalArgumentException, SQLException, RuntimeException, std::exception) { EntryGuard aGuard( *this ); diff --git a/dbaccess/source/sdbtools/connection/objectnames.hxx b/dbaccess/source/sdbtools/connection/objectnames.hxx index bec04d2..e81e439 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.hxx +++ b/dbaccess/source/sdbtools/connection/objectnames.hxx @@ -62,7 +62,7 @@ namespace sdbtools // XObjectNames virtual OUString SAL_CALL suggestName( ::sal_Int32 CommandType, const OUString& BaseName ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL convertToSQLName( const OUString& Name ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isNameUsed( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL isNameUsed( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isNameValid( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL checkNameForCreate( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/offapi/com/sun/star/sdb/tools/XObjectNames.idl b/offapi/com/sun/star/sdb/tools/XObjectNames.idl index 6e45f53..a82bd59 100644 --- a/offapi/com/sun/star/sdb/tools/XObjectNames.idl +++ b/offapi/com/sun/star/sdb/tools/XObjectNames.idl @@ -124,7 +124,8 @@ interface XObjectNames @see checkNameIsUsed */ boolean isNameUsed( [in] long CommandType, [in] string Name ) - raises ( com::sun::star::lang::IllegalArgumentException ); + raises ( com::sun::star::lang::IllegalArgumentException, + com::sun::star::sdbc::SQLException ); /** checks whether a given name is valid as table or query name commit b2f1f158172d9c5674660e916cedcbfe9231126d Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 12:17:17 2014 +0100 coverity#983637 Uncaught exception Change-Id: Ib405aabc4b9da1e06a009159a0ec3a15af1c7570 diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 63247ee..14caff6 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -377,7 +377,7 @@ namespace sdbtools { } - OUString SAL_CALL ObjectNames::suggestName( ::sal_Int32 _CommandType, const OUString& _BaseName ) throw (IllegalArgumentException, RuntimeException, std::exception) + OUString SAL_CALL ObjectNames::suggestName( ::sal_Int32 _CommandType, const OUString& _BaseName ) throw (IllegalArgumentException, SQLException, RuntimeException, std::exception) { EntryGuard aGuard( *this ); diff --git a/dbaccess/source/sdbtools/connection/objectnames.hxx b/dbaccess/source/sdbtools/connection/objectnames.hxx index 920709e..bec04d2 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.hxx +++ b/dbaccess/source/sdbtools/connection/objectnames.hxx @@ -60,7 +60,7 @@ namespace sdbtools ); // XObjectNames - virtual OUString SAL_CALL suggestName( ::sal_Int32 CommandType, const OUString& BaseName ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual OUString SAL_CALL suggestName( ::sal_Int32 CommandType, const OUString& BaseName ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL convertToSQLName( const OUString& Name ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isNameUsed( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL isNameValid( ::sal_Int32 CommandType, const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/offapi/com/sun/star/sdb/tools/XObjectNames.idl b/offapi/com/sun/star/sdb/tools/XObjectNames.idl index 4069e4c..6e45f53 100644 --- a/offapi/com/sun/star/sdb/tools/XObjectNames.idl +++ b/offapi/com/sun/star/sdb/tools/XObjectNames.idl @@ -83,7 +83,8 @@ interface XObjectNames if CommandType specifies an invalid command type. */ string suggestName( [in] long CommandType, [in] string BaseName ) - raises ( com::sun::star::lang::IllegalArgumentException ); + raises ( com::sun::star::lang::IllegalArgumentException, + com::sun::star::sdbc::SQLException ); /** converts the given object name to a name which is valid in the database. commit c7052fd4814ad42f1567e4f6c1e85435cf99ad71 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 12:15:23 2014 +0100 coverity#983649 Uncaught exception Change-Id: I928e8dbeeac168a02c82f2fafe881dae38ae4e3c diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index da962cf..49dd9ae 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -164,7 +164,7 @@ namespace dbaui virtual OUString SAL_CALL getDestinationTableName() throw (RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setDestinationTableName( const OUString& _destinationTableName ) throw (RuntimeException, std::exception) SAL_OVERRIDE; virtual Optional< OUString > SAL_CALL getCreatePrimaryKey() throw (RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL setCreatePrimaryKey( const Optional< OUString >& _newPrimaryKey ) throw (IllegalArgumentException, RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setCreatePrimaryKey( const Optional< OUString >& _newPrimaryKey ) throw (IllegalArgumentException, SQLException, RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL getUseHeaderLineAsColumnNames() throw (RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setUseHeaderLineAsColumnNames( sal_Bool _bUseHeaderLineAsColumnNames ) throw (RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL addCopyTableListener( const Reference< XCopyTableListener >& Listener ) throw (RuntimeException, std::exception) SAL_OVERRIDE; @@ -492,7 +492,7 @@ Optional< OUString > SAL_CALL CopyTableWizard::getCreatePrimaryKey() throw (Runt return m_aPrimaryKeyName; } -void SAL_CALL CopyTableWizard::setCreatePrimaryKey( const Optional< OUString >& _newPrimaryKey ) throw (IllegalArgumentException, RuntimeException, std::exception) +void SAL_CALL CopyTableWizard::setCreatePrimaryKey( const Optional< OUString >& _newPrimaryKey ) throw (IllegalArgumentException, SQLException, RuntimeException, std::exception) { CopyTableAccessGuard aGuard( *this ); diff --git a/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl b/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl index 09a8843..6b84575 100644 --- a/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl +++ b/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl @@ -22,9 +22,9 @@ #include <com/sun/star/ui/dialogs/XExecutableDialog.idl> #include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/sdbc/SQLException.idl> #include <com/sun/star/beans/Optional.idl> - module com { module sun { module star { module sdb { module application { interface XCopyTableListener; @@ -108,7 +108,8 @@ interface XCopyTableWizard : ::com::sun::star::ui::dialogs::XExecutableDialog [attribute] ::com::sun::star::beans::Optional< string > CreatePrimaryKey { - set raises ( ::com::sun::star::lang::IllegalArgumentException ); + set raises ( ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::sdbc::SQLException ); }; /** specifies that the first row should be used to identify column names. commit d2a3b21ade0896520440eef15a88216d995d0ee9 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 11:59:33 2014 +0100 coverity#1132709 Uncaught exception Change-Id: If828f82e36d12ceca7e6392de5757a131c99462c diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index da5e7c2..b02d4b6 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -1231,7 +1231,7 @@ namespace accessibility return OCommonAccessibleText::getCharacter( nIndex ); } - uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& rRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException, std::exception) + uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleEditableTextPara::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& rRequestedAttributes ) throw (lang::IndexOutOfBoundsException, beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; diff --git a/include/editeng/AccessibleEditableTextPara.hxx b/include/editeng/AccessibleEditableTextPara.hxx index 329783e..0764d70 100644 --- a/include/editeng/AccessibleEditableTextPara.hxx +++ b/include/editeng/AccessibleEditableTextPara.hxx @@ -119,7 +119,7 @@ namespace accessibility virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/offapi/com/sun/star/accessibility/XAccessibleText.idl b/offapi/com/sun/star/accessibility/XAccessibleText.idl index ec1b61b..c99a586 100644 --- a/offapi/com/sun/star/accessibility/XAccessibleText.idl +++ b/offapi/com/sun/star/accessibility/XAccessibleText.idl @@ -27,6 +27,7 @@ #include <com/sun/star/lang/IndexOutOfBoundsException.idl> #include <com/sun/star/lang/IllegalArgumentException.idl> #include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/beans/UnknownPropertyException.idl> #include <com/sun/star/accessibility/TextSegment.idl> module com { module sun { module star { module accessibility { @@ -167,7 +168,8 @@ interface XAccessibleText : ::com::sun::star::uno::XInterface getCharacterAttributes ( [in] long nIndex, [in] sequence<string> aRequestedAttributes) - raises (::com::sun::star::lang::IndexOutOfBoundsException); + raises (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::beans::UnknownPropertyException); /** Return the bounding box of the specified position. diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java index 8e8d4e9..ce54ea0 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java @@ -444,6 +444,10 @@ public class _XAccessibleEditableText extends MultiMethodTest { } catch(com.sun.star.lang.IndexOutOfBoundsException e) { log.println("expected exception => OK"); res &= true; + } catch(com.sun.star.beans.UnknownPropertyException e) { + log.println("unexpected exception => FAILED"); + e.printStackTrace(log); + res &= false; } try { @@ -483,6 +487,10 @@ public class _XAccessibleEditableText extends MultiMethodTest { log.println("unexpected exception => FAILED"); e.printStackTrace(log); res &= false; + } catch(com.sun.star.beans.UnknownPropertyException e) { + log.println("unexpected exception => FAILED"); + e.printStackTrace(log); + res &= false; } tRes.tested("setAttributes()", res); @@ -532,4 +540,4 @@ public class _XAccessibleEditableText extends MultiMethodTest { protected void after() { oObj.setText(initialText); } -} \ No newline at end of file +} diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java index da9e379..9f4f5c0 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java @@ -292,6 +292,10 @@ public class _XAccessibleText extends MultiMethodTest { } catch (com.sun.star.lang.IndexOutOfBoundsException e) { log.println("Expected exception"); res &= true; + } catch(com.sun.star.beans.UnknownPropertyException e) { + log.println("unexpected exception => FAILED"); + e.printStackTrace(log); + res &= false; } try { @@ -302,6 +306,10 @@ public class _XAccessibleText extends MultiMethodTest { } catch (com.sun.star.lang.IndexOutOfBoundsException e) { log.println("Expected exception"); res &= true; + } catch(com.sun.star.beans.UnknownPropertyException e) { + log.println("unexpected exception => FAILED"); + e.printStackTrace(log); + res &= false; } try { @@ -315,6 +323,10 @@ public class _XAccessibleText extends MultiMethodTest { log.println("Unexpected exception"); e.printStackTrace(log); res &= false; + } catch(com.sun.star.beans.UnknownPropertyException e) { + log.println("unexpected exception => FAILED"); + e.printStackTrace(log); + res &= false; } tRes.tested("getCharacterAttributes()", res); commit 7a3f09216e4708391b802b0f26e87baa05393ef0 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 11:54:26 2014 +0100 coverity#1231674 Uncaught exception and coverity#1231675 Uncaught exception Change-Id: If0907f2048fc5e492d5b8b49388c3bfad542e5f7 diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index c3c99f9..fbc8031 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -425,13 +425,13 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getSt return getStructuredCondition(F_tmp); } -void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (SQLException, RuntimeException, std::exception) +void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (SQLException, WrappedTargetException, RuntimeException, std::exception) { ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetHavingClause); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); } -void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw(SQLException, WrappedTargetException, RuntimeException, std::exception) { ::std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetFilter); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index d17199a..f9d1d68 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -227,12 +227,12 @@ namespace dbaccess virtual void SAL_CALL setElementaryQuery( const OUString& _rElementary ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setFilter( const OUString& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setStructuredFilter( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL appendFilterByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL appendFilterByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL appendGroupByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setGroup( const OUString& group ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setHavingClause( const OUString& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setStructuredHavingClause( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& filter ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL appendHavingClauseByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL appendHavingClauseByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL appendOrderByColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& column, sal_Bool ascending ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setOrder( const OUString& order ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl index bfe62e5..5af91b6 100644 --- a/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl +++ b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl @@ -20,11 +20,9 @@ #define __com_sun_star_sdb_XSingleSelectQueryComposer_idl__ #include <com/sun/star/beans/XPropertySet.idl> - #include <com/sun/star/beans/PropertyValue.idl> - +#include <com/sun/star/lang/WrappedTargetException.idl> #include <com/sun/star/sdbc/SQLException.idl> - #include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl> @@ -84,7 +82,7 @@ interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer if a database access error occurs. */ void appendFilterByColumn([in] com::sun::star::beans::XPropertySet column,[in] boolean andCriteria,[in] long filterOperator) - raises (com::sun::star::sdbc::SQLException); + raises (com::sun::star::sdbc::SQLException, com::sun::star::lang::WrappedTargetException); // GROUP BY @@ -153,7 +151,7 @@ interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer if a database access error occurs. */ void appendHavingClauseByColumn([in] com::sun::star::beans::XPropertySet column,[in] boolean andCriteria,[in] long filterOperator) - raises (com::sun::star::sdbc::SQLException); + raises (com::sun::star::sdbc::SQLException, com::sun::star::lang::WrappedTargetException); // ORDER BY diff --git a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java index b79c2f5..08c0277 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java +++ b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java @@ -198,6 +198,11 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); } + catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); + } try { @@ -218,6 +223,11 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); } + catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); + } try{ @@ -228,6 +238,10 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendFilterByColumn()", false); + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); } try{ @@ -239,7 +253,12 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("expected Exception"); ok = ok && true; + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendFilterByColumn()", false); } + try { xReSet.beforeFirst(); @@ -391,6 +410,10 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { { log.println("unexpected Exception: " + e.toString()); tRes.tested("appendHavingClauseByColumn()", false); + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendHavingClauseByColumn()", false); } try @@ -411,9 +434,12 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("unexpected Exception: " + e.toString()); tRes.tested("appendHavingClauseByColumn()", false); + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendHavingClauseByColumn()", false); } - try{ XPropertySet dummy = null; oObj.appendHavingClauseByColumn(dummy, true,SQLFilterOperator.EQUAL); @@ -423,6 +449,10 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } catch (SQLException e){ log.println("expected Exception"); ok = ok && true; + } catch (com.sun.star.lang.WrappedTargetException e) + { + log.println("unexpected Exception: " + e.toString()); + tRes.tested("appendHavingClauseByColumn()", false); } // cleanup commit 209cdaa109f7e8ad23be325b70703811a4215a11 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 11:46:17 2014 +0100 coverity#737702 Uncaught exception Change-Id: Idfc005c1c34c609b7dcaae266cdaf6a15a403e5a diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx index be5f2d4..5583427 100644 --- a/sc/inc/appluno.hxx +++ b/sc/inc/appluno.hxx @@ -50,7 +50,7 @@ com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL css::uno::Sequence< OUString > SAL_CALL ScDocument_getSupportedServiceNames() throw(); OUString SAL_CALL ScDocument_getImplementationName() throw(); css::uno::Reference< css::uno::XInterface > SAL_CALL ScDocument_createInstance( - const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, const sal_uInt64 _nCreationFlags ) throw( css::uno::Exception ); + const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, const sal_uInt64 _nCreationFlags ) throw( css::uno::Exception, std::exception ); // Calc XML import css::uno::Sequence< OUString > SAL_CALL ScXMLImport_getSupportedServiceNames() throw(); diff --git a/sc/source/ui/unoobj/unodoc.cxx b/sc/source/ui/unoobj/unodoc.cxx index 2da8ce2..d200661 100644 --- a/sc/source/ui/unoobj/unodoc.cxx +++ b/sc/source/ui/unoobj/unodoc.cxx @@ -44,7 +44,7 @@ uno::Sequence< OUString > SAL_CALL ScDocument_getSupportedServiceNames() throw() } uno::Reference< uno::XInterface > SAL_CALL ScDocument_createInstance( - const uno::Reference< lang::XMultiServiceFactory > & /* rSMgr */, const sal_uInt64 _nCreationFlags ) throw( uno::Exception ) + const uno::Reference< lang::XMultiServiceFactory > & /* rSMgr */, const sal_uInt64 _nCreationFlags ) throw( uno::Exception, std::exception ) { SolarMutexGuard aGuard; ScDLL::Init(); commit ba48c86a03e18a2e2c22f4cf90ed8053cbb99367 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Aug 17 11:42:24 2014 +0100 coverity#1231676 Uncaught exception Change-Id: I70c6255f062c6624bc367a8fb81288c99b6635b3 diff --git a/include/canvas/base/bufferedgraphicdevicebase.hxx b/include/canvas/base/bufferedgraphicdevicebase.hxx index 9e66e43..108bef6 100644 --- a/include/canvas/base/bufferedgraphicdevicebase.hxx +++ b/include/canvas/base/bufferedgraphicdevicebase.hxx @@ -126,7 +126,7 @@ namespace canvas return BaseType::maDeviceHelper.showBuffer( mbIsVisible, bUpdateAll ); } - virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE + virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { MutexType aGuard( BaseType::m_aMutex );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits