[Libreoffice-commits] core.git: ucb/source

Stephan Bergmann sbergman at redhat.com
Tue Jun 30 05:42:13 PDT 2015


 ucb/source/ucp/file/bc.cxx    |    5 ----
 ucb/source/ucp/file/bc.hxx    |   15 ++++--------
 ucb/source/ucp/file/shell.cxx |   16 -------------
 ucb/source/ucp/file/shell.hxx |   51 ++++++++++++++----------------------------
 4 files changed, 22 insertions(+), 65 deletions(-)

New commits:
commit daf06757009e09e3ecb4a3e91f2d068ca9612fa7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jun 30 14:33:43 2015 +0200

    Coverity 1308468 etc.: Exception specifications
    
    While these functions do not throw any UNO exceptions, no need to specify them
    as nothrow, and do allow std exceptions to pass through.
    
    Also covers Coverity 1308470, 1308476, 1308482, 1308495, 1308496, 1308502,
    1308506, and 1308575.
    
    Change-Id: I00306f606f3f20462016177eebbd26ed5af76506

diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 3920d9e..c1e12b6 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -834,7 +834,6 @@ Sequence< Any > SAL_CALL
 BaseContent::setPropertyValues(
     sal_Int32 nMyCommandIdentifier,
     const Sequence< beans::PropertyValue >& Values )
-    throw()
 {
     if( m_nState & Deleted )
     {   //  To do
@@ -971,7 +970,6 @@ Reference< XDynamicResultSet > SAL_CALL
 BaseContent::open(
     sal_Int32 nMyCommandIdentifier,
     const OpenCommandArgument2& aCommandArgument )
-    throw()
 {
     Reference< XDynamicResultSet > retValue( 0 );
 
@@ -1047,7 +1045,6 @@ BaseContent::open(
 
 void SAL_CALL
 BaseContent::deleteContent( sal_Int32 nMyCommandIdentifier )
-    throw()
 {
     if( m_nState & Deleted )
         return;
@@ -1064,7 +1061,6 @@ BaseContent::deleteContent( sal_Int32 nMyCommandIdentifier )
 void SAL_CALL
 BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
                        const TransferInfo& aTransferInfo )
-    throw()
 {
     if( m_nState & Deleted )
         return;
@@ -1136,7 +1132,6 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
 
 void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
                                    const InsertCommandArgument& aInsertArgument )
-    throw()
 {
     if( m_nState & FullFeatured )
     {
diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx
index 21b6aca..381880d 100644
--- a/ucb/source/ucp/file/bc.hxx
+++ b/ucb/source/ucp/file/bc.hxx
@@ -308,29 +308,24 @@ namespace fileaccess {
         com::sun::star::uno::Sequence< com::sun::star::uno::Any > SAL_CALL
         setPropertyValues(
             sal_Int32 nMyCommandIdentifier,
-            const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Values )
-            throw( );
+            const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Values );
 
         com::sun::star::uno::Reference< com::sun::star::ucb::XDynamicResultSet > SAL_CALL
         open(
             sal_Int32 nMyCommandIdentifier,
-            const com::sun::star::ucb::OpenCommandArgument2& aCommandArgument )
-            throw();
+            const com::sun::star::ucb::OpenCommandArgument2& aCommandArgument );
 
         void SAL_CALL
-        deleteContent( sal_Int32 nMyCommandIdentifier )
-            throw();
+        deleteContent( sal_Int32 nMyCommandIdentifier );
 
 
         void SAL_CALL
         transfer( sal_Int32 nMyCommandIdentifier,
-                  const com::sun::star::ucb::TransferInfo& aTransferInfo )
-            throw();
+                  const com::sun::star::ucb::TransferInfo& aTransferInfo );
 
         void SAL_CALL
         insert( sal_Int32 nMyCommandIdentifier,
-                const com::sun::star::ucb::InsertCommandArgument& aInsertArgument )
-            throw();
+                const com::sun::star::ucb::InsertCommandArgument& aInsertArgument );
 
         void SAL_CALL endTask( sal_Int32 CommandId );
 
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 1f352d5..6b0ad35 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -570,7 +570,6 @@ shell::deassociate( const OUString& aUnqPath,
 void SAL_CALL shell::page( sal_Int32 CommandId,
                            const OUString& aUnqPath,
                            const uno::Reference< io::XOutputStream >& xOutputStream )
-    throw()
 {
     uno::Reference< XContentProvider > xProvider( m_pProvider );
     osl::File aFile( aUnqPath );
@@ -661,7 +660,6 @@ uno::Reference< io::XInputStream > SAL_CALL
 shell::open( sal_Int32 CommandId,
              const OUString& aUnqPath,
              bool bLock )
-    throw()
 {
     XInputStream_impl* xInputStream = new XInputStream_impl( this, aUnqPath, bLock ); // from filinpstr.hxx
 
@@ -698,7 +696,6 @@ uno::Reference< io::XStream > SAL_CALL
 shell::open_rw( sal_Int32 CommandId,
                 const OUString& aUnqPath,
                 bool bLock )
-    throw()
 {
     XStream_impl* xStream = new XStream_impl( this, aUnqPath, bLock );  // from filstr.hxx
 
@@ -735,7 +732,6 @@ shell::ls( sal_Int32 CommandId,
            const sal_Int32 OpenMode,
            const uno::Sequence< beans::Property >& seq,
            const uno::Sequence< NumberedSortingInfo >& seqSort )
-    throw()
 {
     XResultSet_impl* p = new XResultSet_impl( this,aUnqPath,OpenMode,seq,seqSort );
 
@@ -766,7 +762,6 @@ shell::ls( sal_Int32 CommandId,
 
 uno::Reference< XCommandInfo > SAL_CALL
 shell::info_c()
-    throw()
 {
     XCommandInfo_impl* p = new XCommandInfo_impl( this );
     return uno::Reference< XCommandInfo >( p );
@@ -784,7 +779,6 @@ shell::info_c()
 
 uno::Reference< beans::XPropertySetInfo > SAL_CALL
 shell::info_p( const OUString& aUnqPath )
-    throw()
 {
     osl::MutexGuard aGuard( m_aMutex );
     XPropertySetInfo_impl* p = new XPropertySetInfo_impl( this,aUnqPath );
@@ -807,7 +801,6 @@ shell::info_p( const OUString& aUnqPath )
 uno::Sequence< uno::Any > SAL_CALL
 shell::setv( const OUString& aUnqPath,
              const uno::Sequence< beans::PropertyValue >& values )
-    throw()
 {
     osl::MutexGuard aGuard( m_aMutex );
 
@@ -1044,7 +1037,6 @@ uno::Reference< sdbc::XRow > SAL_CALL
 shell::getv( sal_Int32 CommandId,
              const OUString& aUnqPath,
              const uno::Sequence< beans::Property >& properties )
-    throw()
 {
     uno::Sequence< uno::Any > seq( properties.getLength() );
 
@@ -1112,7 +1104,6 @@ shell::move( sal_Int32 CommandId,
              const OUString& srcUnqPath,
              const OUString& dstUnqPathIn,
              const sal_Int32 NameClash )
-    throw()
 {
     // --> #i88446# Method notifyContentExchanged( getContentExchangedEventListeners( srcUnqPath,dstUnqPath,!isDocument ) ); crashes if
     // srcUnqPath and dstUnqPathIn are equal
@@ -1323,7 +1314,6 @@ shell::copy(
     const OUString& srcUnqPath,
     const OUString& dstUnqPathIn,
     sal_Int32 NameClash )
-    throw()
 {
     osl::FileBase::RC nError;
     OUString dstUnqPath( dstUnqPathIn );
@@ -1497,7 +1487,6 @@ shell::remove( sal_Int32 CommandId,
                const OUString& aUnqPath,
                sal_Int32 IsWhat,
                bool  MustExist )
-    throw()
 {
     sal_Int32 nMask = osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL;
 
@@ -1660,7 +1649,6 @@ bool SAL_CALL
 shell::mkdir( sal_Int32 CommandId,
               const OUString& rUnqPath,
               bool OverWrite )
-    throw()
 {
     OUString aUnqPath;
 
@@ -1722,7 +1710,6 @@ shell::mkfil( sal_Int32 CommandId,
               const OUString& aUnqPath,
               bool Overwrite,
               const uno::Reference< io::XInputStream >& aInputStream )
-    throw()
 {
     // return value unimportant
     bool bSuccess = write( CommandId,
@@ -1754,7 +1741,6 @@ shell::write( sal_Int32 CommandId,
               const OUString& aUnqPath,
               bool OverWrite,
               const uno::Reference< io::XInputStream >& aInputStream )
-    throw()
 {
     if( ! aInputStream.is() )
     {
@@ -1989,7 +1975,6 @@ shell::copy_recursive( const OUString& srcUnqPath,
                        const OUString& dstUnqPath,
                        sal_Int32 TypeToCopy,
                        bool testExistBeforeCopy )
-    throw()
 {
     osl::FileBase::RC err = osl::FileBase::E_None;
 
@@ -2061,7 +2046,6 @@ shell::copy_recursive( const OUString& srcUnqPath,
 bool SAL_CALL shell::ensuredir( sal_Int32 CommandId,
                                     const OUString& rUnqPath,
                                     sal_Int32 errorCode )
-    throw()
 {
     OUString aPath;
 
diff --git a/ucb/source/ucp/file/shell.hxx b/ucb/source/ucp/file/shell.hxx
index a136bb7..fc9de68 100644
--- a/ucb/source/ucp/file/shell.hxx
+++ b/ucb/source/ucp/file/shell.hxx
@@ -210,8 +210,7 @@ namespace fileaccess {
 
         void SAL_CALL page( sal_Int32 CommandId,
                             const OUString& aUnqPath,
-                            const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xOutputStream )
-            throw();
+                            const com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >& xOutputStream );
 
 
         /**
@@ -221,8 +220,7 @@ namespace fileaccess {
         com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL
         open( sal_Int32 CommandId,
               const OUString& aUnqPath,
-              bool bLock )
-            throw();
+              bool bLock );
 
 
         /**
@@ -233,8 +231,7 @@ namespace fileaccess {
         com::sun::star::uno::Reference< com::sun::star::io::XStream > SAL_CALL
         open_rw( sal_Int32 CommandId,
                  const OUString& aUnqPath,
-                 bool bLock )
-            throw();
+                 bool bLock );
 
 
         /**
@@ -247,8 +244,7 @@ namespace fileaccess {
             const OUString& aUnqPath,
             const sal_Int32 OpenMode,
             const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& sProperty,
-            const com::sun::star::uno::Sequence< com::sun::star::ucb::NumberedSortingInfo > & sSortingInfo )
-            throw();
+            const com::sun::star::uno::Sequence< com::sun::star::ucb::NumberedSortingInfo > & sSortingInfo );
 
 
         /**
@@ -257,13 +253,11 @@ namespace fileaccess {
 
         // Info for commands
         com::sun::star::uno::Reference< com::sun::star::ucb::XCommandInfo > SAL_CALL
-        info_c()
-            throw();
+        info_c();
 
         // Info for the properties
         com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL
-        info_p( const OUString& aUnqPath )
-            throw();
+        info_p( const OUString& aUnqPath );
 
 
         /**
@@ -272,8 +266,7 @@ namespace fileaccess {
 
         com::sun::star::uno::Sequence< com::sun::star::uno::Any > SAL_CALL
         setv( const OUString& aUnqPath,
-              const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& values )
-            throw();
+              const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& values );
 
 
         /**
@@ -284,8 +277,7 @@ namespace fileaccess {
         com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > SAL_CALL
         getv( sal_Int32 CommandId,
               const OUString& aUnqPath,
-              const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& properties )
-            throw();
+              const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& properties );
 
 
         /********************************************************************************/
@@ -300,8 +292,7 @@ namespace fileaccess {
         move( sal_Int32 CommandId,
               const OUString& srcUnqPath,   // Full file(folder)-path
               const OUString& dstUnqPath,   // Path to the destination-directory
-              const sal_Int32 NameClash )
-            throw();
+              const sal_Int32 NameClash );
 
         /**
          *  Copies the content belonging to fileURL srcUnqPath to fileURL dstUnqPath ( files and directories )
@@ -311,8 +302,7 @@ namespace fileaccess {
         copy( sal_Int32 CommandId,               // See "move"
               const OUString& srcUnqPath,
               const OUString& dstUnqPath,
-              sal_Int32 NameClash )
-            throw();
+              sal_Int32 NameClash );
 
 #define RemoveFolder   1
 #define RemoveFile    -1
@@ -326,8 +316,7 @@ namespace fileaccess {
         remove( sal_Int32 CommandId,
                 const OUString& aUnqPath,
                 sal_Int32 TypeToMove = RemoveUnknown,
-                bool  MustExist  = true )
-            throw();
+                bool  MustExist  = true );
 
 #undef RemoveUnknown
 #undef RemoveFile
@@ -346,8 +335,7 @@ namespace fileaccess {
         bool SAL_CALL
         mkdir( sal_Int32 CommandId,
                const OUString& aDirectoryName,
-               bool OverWrite )
-            throw();
+               bool OverWrite );
 
 
         /**
@@ -360,8 +348,7 @@ namespace fileaccess {
         mkfil( sal_Int32 CommandId,
                const OUString& aFileName,
                bool OverWrite,
-               const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream )
-            throw();
+               const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream );
 
 
         /**
@@ -373,8 +360,7 @@ namespace fileaccess {
         write( sal_Int32 CommandId,
                const OUString& aUnqPath,
                bool OverWrite,
-               const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream )
-            throw();
+               const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream );
 
 
 
@@ -517,8 +503,7 @@ namespace fileaccess {
         void SAL_CALL
         setFileProperties(
             const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& values,
-            sal_Int32 numberOfValues )
-            throw();
+            sal_Int32 numberOfValues );
 
 
         // Helper function for public copy
@@ -528,8 +513,7 @@ namespace fileaccess {
             const OUString& srcUnqPath,
             const OUString& dstUnqPath,
             sal_Int32 TypeToCopy,
-            bool  testExistence )
-            throw();
+            bool  testExistence );
 
 
         // Helper function for mkfil,mkdir and write
@@ -541,8 +525,7 @@ namespace fileaccess {
         bool SAL_CALL
         ensuredir( sal_Int32 CommandId,
                    const OUString& aDirectoryName,
-                   sal_Int32 errorCode )
-            throw();
+                   sal_Int32 errorCode );
 
         // General
         osl::Mutex m_aMutex;


More information about the Libreoffice-commits mailing list