[Libreoffice-commits] core.git: 16 commits - connectivity/source cppuhelper/source eventattacher/source extensions/source framework/source include/comphelper include/framework include/svx oovbaapi/ooo sal/qa sdext/source sd/source soltools/mkdepend sot/source svx/source sw/inc sw/source

Caolán McNamara caolanm at redhat.com
Sat May 24 08:11:36 PDT 2014


 connectivity/source/drivers/mork/MResultSet.cxx   |    2 
 connectivity/source/drivers/mork/MResultSet.hxx   |    2 
 cppuhelper/source/macro_expander.cxx              |    4 -
 eventattacher/source/eventattacher.cxx            |    5 --
 extensions/source/scanner/scanner.hxx             |    2 
 extensions/source/scanner/scanunx.cxx             |    3 -
 extensions/source/scanner/scanwin.cxx             |    2 
 framework/source/fwe/xml/menuconfiguration.cxx    |    2 
 include/comphelper/MasterPropertySet.hxx          |    4 +
 include/framework/menuconfiguration.hxx           |    2 
 include/svx/fmdpage.hxx                           |    2 
 include/svx/unopage.hxx                           |    2 
 oovbaapi/ooo/vba/word/XTabStops.idl               |    8 ---
 sal/qa/osl/file/osl_File.cxx                      |    3 -
 sd/source/ui/unoidl/unoobj.cxx                    |    2 
 sd/source/ui/unoidl/unoobj.hxx                    |    2 
 sd/source/ui/unoidl/unopage.cxx                   |    2 
 sd/source/ui/unoidl/unopage.hxx                   |    2 
 sdext/source/presenter/PresenterAccessibility.cxx |   50 ++++++----------------
 soltools/mkdepend/parse.c                         |    1 
 sot/source/sdstor/ucbstorage.cxx                  |    6 +-
 svx/source/form/fmdpage.cxx                       |    2 
 svx/source/unodraw/unopage.cxx                    |    2 
 sw/inc/unotext.hxx                                |    6 +-
 sw/source/core/uibase/uno/SwXDocumentSettings.cxx |    3 -
 sw/source/core/uibase/uno/SwXDocumentSettings.hxx |    4 +
 sw/source/core/unocore/unotext.cxx                |    3 -
 sw/source/ui/vba/vbatabstops.cxx                  |    2 
 sw/source/ui/vba/vbatabstops.hxx                  |    5 +-
 29 files changed, 61 insertions(+), 74 deletions(-)

New commits:
commit 675776170671ba0a1fc1b2bf9e915537cd08b080
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 16:07:28 2014 +0100

    coverity#441341 Dereference after null check
    
    Change-Id: I7c3df9438d9b81e0f50f8143772b997672ca7abb

diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 8ea792c..df435ba 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2157,7 +2157,7 @@ sal_Int16 UCBStorage_Impl::Commit()
                     if ( !pElement->m_bIsInserted )
                     {
                         // first remove all open stream handles
-                        if( !pElement->m_xStream.Is() || pElement->m_xStream->Clear() )
+                        if (pContent && (!pElement->m_xStream.Is() || pElement->m_xStream->Clear()))
                         {
                             pContent->executeCommand( OUString("delete"), makeAny( true ) );
                             nRet = COMMIT_RESULT_SUCCESS;
@@ -2199,7 +2199,7 @@ sal_Int16 UCBStorage_Impl::Commit()
                         pContent = pElement->GetContent();
                     }
 
-                    if ( pElement->m_aName != pElement->m_aOriginalName )
+                    if (pContent && pElement->m_aName != pElement->m_aOriginalName)
                     {
                         // name ( title ) of the element was changed
                         nLocalRet = COMMIT_RESULT_SUCCESS;
@@ -2208,7 +2208,7 @@ sal_Int16 UCBStorage_Impl::Commit()
                         pContent->setPropertyValue("Title", aAny );
                     }
 
-                    if ( pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType() )
+                    if (pContent && pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType())
                     {
                         // mediatype of the element was changed
                         nLocalRet = COMMIT_RESULT_SUCCESS;
commit a5219c79027bce36880270ddbe3a058fa042265e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:52:40 2014 +0100

    coverity#707241 Uncaught exception
    
    Change-Id: Ia82b685a892c376dbdf5a5b7a8e559bf318b9134

diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index b78e655..62961d4 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -94,7 +94,7 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< ::com::sun:
     // Creating a SdrObject using it's Description.
     // Can be used by derived classes to support their owen Shapes (e.g. Controls).
     virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape )
-        throw (css::uno::Exception, std::exception);
+        throw (css::uno::RuntimeException, std::exception);
 
     static SvxShape* CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj = NULL, SvxDrawPage *pPage = NULL, OUString const & referer = OUString() ) throw();
 
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 9ce4356..21e5736 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -474,7 +474,7 @@ void SAL_CALL SvxDrawPage::ungroup( const Reference< drawing::XShapeGroup >& aGr
 }
 
 SdrObject *SvxDrawPage::_CreateSdrObject(const Reference< drawing::XShape > & xShape)
-    throw (css::uno::Exception, std::exception)
+    throw (css::uno::RuntimeException, std::exception)
 {
     sal_uInt16 nType = 0;
     sal_uInt32 nInventor = 0;
commit 64da31ab884ff4a2ceaccfa4adfb2eb62fccdaf6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:48:36 2014 +0100

    coverity#738462 Uncaught exception
    
    Change-Id: I1450211333d2c04cacc80bc66eb228d5c2e7281d

diff --git a/oovbaapi/ooo/vba/word/XTabStops.idl b/oovbaapi/ooo/vba/word/XTabStops.idl
index 56e0ceb..70c68ba 100644
--- a/oovbaapi/ooo/vba/word/XTabStops.idl
+++ b/oovbaapi/ooo/vba/word/XTabStops.idl
@@ -20,21 +20,17 @@
 #define __ooo_vba_word_XTabStops_idl__
 
 #include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/script/BasicErrorException.idl>
 #include <ooo/vba/XCollection.idl>
 
-
-
-
 module ooo {  module vba {  module word {
 
-
-
 interface XTabStop;
 interface XTabStops
 {
     interface ::ooo::vba::XCollection;
 
-    XTabStop Add([in] float Position, [in] any Alignment, [in] any Leader );
+    XTabStop Add([in] float Position, [in] any Alignment, [in] any Leader ) raises ( com::sun::star::script::BasicErrorException );
     void ClearAll();
 };
 
diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx
index e51aac6..259516f 100644
--- a/sw/source/ui/vba/vbatabstops.cxx
+++ b/sw/source/ui/vba/vbatabstops.cxx
@@ -110,7 +110,7 @@ SwVbaTabStops::SwVbaTabStops( const uno::Reference< XHelperInterface >& xParent,
 {
 }
 
-uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, const uno::Any& Alignment, const uno::Any& Leader ) throw (uno::RuntimeException, std::exception)
+uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, const uno::Any& Alignment, const uno::Any& Leader ) throw (script::BasicErrorException, uno::RuntimeException, std::exception)
 {
     sal_Int32 nPosition = Millimeter::getInHundredthsOfOneMillimeter( Position );
 
diff --git a/sw/source/ui/vba/vbatabstops.hxx b/sw/source/ui/vba/vbatabstops.hxx
index f8bd0dd..e1f6692 100644
--- a/sw/source/ui/vba/vbatabstops.hxx
+++ b/sw/source/ui/vba/vbatabstops.hxx
@@ -38,7 +38,10 @@ public:
     virtual ~SwVbaTabStops() {}
 
     // Methods
-    virtual css::uno::Reference< ::ooo::vba::word::XTabStop > SAL_CALL Add( float Position, const css::uno::Any& Alignment, const css::uno::Any& Leader ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Reference< ::ooo::vba::word::XTabStop > SAL_CALL Add( float Position, const css::uno::Any& Alignment, const css::uno::Any& Leader )
+        throw (css::script::BasicErrorException,
+               css::uno::RuntimeException,
+               std::exception) SAL_OVERRIDE;
     virtual void SAL_CALL ClearAll(  ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // XEnumerationAccess
commit b2011604f881936584756d4eada4073c66f15f8a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:44:51 2014 +0100

    coverity#982175 Unchecked return value from library
    
    Change-Id: I7acba38a00dfc1101e6217bff098ef7d6f032497

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index c46f2fe..cbe9052 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -415,7 +415,8 @@ inline void changeFileMode( ::rtl::OUString & filepath, sal_Int32 mode )
     if ( isURL( filepath ) )
         ::osl::FileBase::getSystemPathFromFileURL( filepath, aUStr );
     aString = ::rtl::OUStringToOString( aUStr, RTL_TEXTENCODING_ASCII_US );
-    chmod( aString.getStr(), mode );
+    int ret = chmod( aString.getStr(), mode );
+    CPPUNIT_ASSERT(ret == 0);
 }
 #else                                          //Windows version
 inline void changeFileMode( ::rtl::OUString & filepath, sal_Int32 mode )
commit 6bd53aeb7ab9beec736440e3f372f9954a680f9d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:37:42 2014 +0100

    coverity#982647 Missing break in switch
    
    Change-Id: Ifa318214079eeb2f903b3e0c4a27c1a807787fd4

diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 0914fbc..0acc9ea 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -292,6 +292,7 @@ int deftype (line, filep, file_red, file, parse_it, symbols)
     case IFNDEF:
         debug(0,("%s, line %d: #%s %s\n",
             file->i_file, filep->f_line, directives[ret], p));
+        //fall-through
     case UNDEF:
         /*
          * separate the name of a single symbol.
commit 56abf72c459f7866d84ce3eeb7bf4fd5b7925b77
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:35:00 2014 +0100

    coverity#983622 Uncaught exception
    
    Change-Id: I3b63a42444a116afe7d88e2f806b17a709651e34

diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 0473655..d88f784 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -1060,7 +1060,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode*                 parseT
 
 
 void OResultSet::fillRowData()
-    throw( ::com::sun::star::sdbc::SQLException )
+    throw (css::sdbc::SQLException, css::uno::RuntimeException)
 {
     OSL_ENSURE( m_pStatement, "Require a statement" );
 
diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx
index c6ea4c7..f6bb8dc 100644
--- a/connectivity/source/drivers/mork/MResultSet.hxx
+++ b/connectivity/source/drivers/mork/MResultSet.hxx
@@ -248,7 +248,7 @@ protected:
             ::rtl::Reference<connectivity::OSQLColumns>  m_xParamColumns;
 
             void parseParameter( const OSQLParseNode* pNode, OUString& rMatchString );
-            void fillRowData() throw( ::com::sun::star::sdbc::SQLException );
+            void fillRowData() throw(css::sdbc::SQLException, css::uno::RuntimeException);
             void analyseWhereClause( const OSQLParseNode*                 parseTree,
                                      MQueryExpression                    &queryExpression);
 
commit 63387abb5b26225db61234d7b44ed3c2d5002003
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:33:17 2014 +0100

    coverity#983624 Uncaught exception
    
    Change-Id: Ifbd069199d725cd3b0fcc189cbcb2cf7a59f5ffb

diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx
index f215c2a..f12c9ee 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -134,7 +134,7 @@ public:
 
     // XMacroExpander impl
     virtual OUString SAL_CALL expandMacros( OUString const & exp )
-        throw (lang::IllegalArgumentException, std::exception) SAL_OVERRIDE;
+        throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) SAL_OVERRIDE;
     // XServiceInfo impl
     virtual OUString SAL_CALL getImplementationName()
         throw (RuntimeException, std::exception) SAL_OVERRIDE;
@@ -174,7 +174,7 @@ Sequence< OUString > Bootstrap_MacroExpander::getSupportedServiceNames()
 // XMacroExpander impl
 
 OUString Bootstrap_MacroExpander::expandMacros( OUString const & exp )
-    throw (lang::IllegalArgumentException, std::exception)
+    throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
 {
     return cppuhelper::detail::expandMacros( exp );
 }
commit bcbf642c4c0d076230a7ba3f5c731a615047d871
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:30:52 2014 +0100

    coverity#983657 Uncaught exception
    
    Change-Id: I4feec3aeaf5f7b821a15f3b74f7b2df1f63a6681

diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 883b49f..2ac41e9 100644
--- a/eventattacher/source/eventattacher.cxx
+++ b/eventattacher/source/eventattacher.cxx
@@ -451,7 +451,7 @@ public:
 private:
     // convert
     void convertToEventReturn( Any & rRet, const Type& rRetType )
-            throw( CannotConvertException );
+            throw (CannotConvertException, RuntimeException);
 
     EventAttacherImpl *         m_pEA;
     Reference< XInterface >     m_xEAHold;
@@ -477,10 +477,9 @@ void SAL_CALL FilterAllListenerImpl::firing(const AllEventObject& Event)
         m_AllListener->firing( Event );
 }
 
-
 // Convert to the standard event return
 void FilterAllListenerImpl::convertToEventReturn( Any & rRet, const Type & rRetType )
-    throw( CannotConvertException )
+    throw (CannotConvertException, RuntimeException)
 {
     // no return value? Set to the specified values
     if( rRet.getValueType().getTypeClass() == TypeClass_VOID )
commit 025387b6e73b15bb3d0263def21f5b5b3ee1d764
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:29:20 2014 +0100

    coverity#983672 Uncaught exception
    
    Change-Id: I1b2ff484906ba3dc85fa4926dbbf45c91a57c6be

diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx
index 200eee1..19e7761 100644
--- a/extensions/source/scanner/scanner.hxx
+++ b/extensions/source/scanner/scanner.hxx
@@ -60,7 +60,7 @@ public:
     // XScannerManager
     virtual Sequence< ScannerContext > SAL_CALL  getAvailableScanners() throw(std::exception) SAL_OVERRIDE;
     virtual sal_Bool SAL_CALL               configureScanner( ScannerContext& scanner_context ) throw( ScannerException, std::exception ) SAL_OVERRIDE;
-    virtual sal_Bool SAL_CALL               configureScannerAndScan( ScannerContext& scanner_context, const Reference< com::sun::star::lang::XEventListener >& rxListener ) throw( ScannerException, std::exception ) SAL_OVERRIDE;
+    virtual sal_Bool SAL_CALL               configureScannerAndScan( ScannerContext& scanner_context, const Reference< com::sun::star::lang::XEventListener >& rxListener ) throw (ScannerException, RuntimeException, std::exception) SAL_OVERRIDE;
     virtual void SAL_CALL                   startScan( const ScannerContext& scanner_context, const Reference< com::sun::star::lang::XEventListener >& rxListener ) throw( ScannerException, std::exception ) SAL_OVERRIDE;
     virtual ScanError SAL_CALL              getError( const ScannerContext& scanner_context ) throw( ScannerException, std::exception ) SAL_OVERRIDE;
     virtual Reference< css::awt::XBitmap > SAL_CALL    getBitmap( const ScannerContext& scanner_context ) throw( ScannerException, std::exception ) SAL_OVERRIDE;
diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx
index d7b0d6a..c57e9d8 100644
--- a/extensions/source/scanner/scanunx.cxx
+++ b/extensions/source/scanner/scanunx.cxx
@@ -267,7 +267,8 @@ Sequence< ScannerContext > ScannerManager::getAvailableScanners() throw(std::exc
 
 
 sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_context,
-                                                  const Reference< com::sun::star::lang::XEventListener >& listener ) throw( ScannerException, std::exception )
+                                                  const Reference< com::sun::star::lang::XEventListener >& listener )
+    throw (ScannerException, RuntimeException, std::exception)
 {
     bool bRet;
     bool bScan;
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index b441c99..ca03b55 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -872,7 +872,7 @@ uno::Sequence< ScannerContext > SAL_CALL ScannerManager::getAvailableScanners()
 }
 
 sal_Bool SAL_CALL ScannerManager::configureScannerAndScan( ScannerContext& rContext, const uno::Reference< lang::XEventListener >& )
-    throw( ScannerException )
+    throw (ScannerException, RuntimeException, std::exception)
 {
     osl::MutexGuard aGuard( maProtector );
     uno::Reference< XScannerManager >   xThis( this );
commit 3467112fbd38d0dac343c21d5e91e6e3554f6827
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:25:44 2014 +0100

    coverity#983680 Uncaught exception
    
    Change-Id: I62baf5b8809d915a4fe6a32788868072d55258e0

diff --git a/framework/source/fwe/xml/menuconfiguration.cxx b/framework/source/fwe/xml/menuconfiguration.cxx
index e30b890..add181e 100644
--- a/framework/source/fwe/xml/menuconfiguration.cxx
+++ b/framework/source/fwe/xml/menuconfiguration.cxx
@@ -115,7 +115,7 @@ PopupMenu* MenuConfiguration::CreateBookmarkMenu(css::uno::Reference<css::frame:
 void MenuConfiguration::StoreMenuBarConfigurationToXML(
     Reference< XIndexAccess >& rMenuBarConfiguration,
     Reference< XOutputStream >& rOutputStream )
-throw ( WrappedTargetException )
+    throw (WrappedTargetException, RuntimeException)
 {
     Reference< XWriter > xWriter = Writer::create(m_xContext);
     xWriter->setOutputStream( rOutputStream );
diff --git a/include/framework/menuconfiguration.hxx b/include/framework/menuconfiguration.hxx
index bea35d6..4e5fd87 100644
--- a/include/framework/menuconfiguration.hxx
+++ b/include/framework/menuconfiguration.hxx
@@ -98,7 +98,7 @@ class FWE_DLLPUBLIC MenuConfiguration
 
         void StoreMenuBarConfigurationToXML( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rMenuBarConfiguration,
                       ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream )
-            throw ( ::com::sun::star::lang::WrappedTargetException );
+            throw (css::lang::WrappedTargetException, css::uno::RuntimeException);
 
         void StoreToolBox( ToolBox* pToolBox,
                       ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream )
commit aca217b5fda22eb73d2fbea29099fe2f67eaabe6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:11:39 2014 +0100

    coverity#983801 Uncaught exception
    
    Change-Id: Ib47f77fbd5ab03a04d40e95fa8338af238531a3b

diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index a28043c..6b3cc2c 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -983,7 +983,7 @@ OUString SdXShape::GetPlaceholderText() const
 /** sets/reset the empty status of a presentation object
 */
 void SdXShape::SetEmptyPresObj(bool bEmpty)
-    throw (std::exception)
+    throw (css::uno::RuntimeException, std::exception)
 {
     // only possible if this actually *is* a presentation object
     if( !IsPresObj() )
diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx
index 097e8660..12e10d4 100644
--- a/sd/source/ui/unoidl/unoobj.hxx
+++ b/sd/source/ui/unoidl/unoobj.hxx
@@ -59,7 +59,7 @@ private:
 
     bool IsEmptyPresObj() const throw();
     void SetEmptyPresObj(bool bEmpty)
-        throw (std::exception);
+        throw (css::uno::RuntimeException, std::exception);
 
     bool IsMasterDepend() const throw();
     void SetMasterDepend( bool bDepend ) throw();
commit 94cf2594570576c80287362e83d85c0feec8cc3e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:08:43 2014 +0100

    coverity#983802 Uncaught exception
    
    Change-Id: I06be01500a767e600a7f391a3e74a92d05b6d73f

diff --git a/include/svx/fmdpage.hxx b/include/svx/fmdpage.hxx
index ea78b78..e564570 100644
--- a/include/svx/fmdpage.hxx
+++ b/include/svx/fmdpage.hxx
@@ -35,7 +35,7 @@ protected:
     // Creating a SdrObject based on a Description. Cann be used by derived classes to
     // support own ::com::sun::star::drawing::Shapes (for example Controls)
     virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape )
-        throw (std::exception) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // The following method is called when a SvxShape object should be created.
     // Derived classes can create a derivation or an object aggregating SvxShape.
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index a4fd2e2..3e788c8 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -386,7 +386,7 @@ SdXImpressDocument* SdGenericDrawPage::GetModel() const
 
 // this is called whenever a SdrObject must be created for a empty api shape wrapper
 SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShape >& xShape )
-    throw (std::exception)
+    throw (css::uno::RuntimeException, std::exception)
 {
     if( NULL == SvxFmDrawPage::mpPage || !xShape.is() )
         return NULL;
diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx
index e2712b0..b2ea8aa 100644
--- a/sd/source/ui/unoidl/unopage.hxx
+++ b/sd/source/ui/unoidl/unopage.hxx
@@ -105,7 +105,7 @@ public:
 
     // this is called whenever a SdrObject must be created for a empty api shape wrapper
     virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape )
-        throw (std::exception) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // SvxFmDrawPage
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >  _CreateShape( SdrObject *pObj ) const
diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx
index c0867cc..a7245b1 100644
--- a/svx/source/form/fmdpage.cxx
+++ b/svx/source/form/fmdpage.cxx
@@ -69,7 +69,7 @@ Any SAL_CALL SvxFmDrawPage::queryAggregation( const ::com::sun::star::uno::Type&
 }
 
 SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xDescr )
-    throw (std::exception)
+    throw (css::uno::RuntimeException, std::exception)
 {
     OUString aShapeType( xDescr->getShapeType() );
 
commit 31ded1744150cac86c270957fd0fa193e8437a36
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 15:07:39 2014 +0100

    coverity#983807 Uncaught exception
    
    Change-Id: Ic303dae356690db009b5917168b77da2f2d8d433

diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 3b82fd3..a4c66f0 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -226,13 +226,10 @@ protected:
 
     void UpdateState (const sal_Int16 aState, const bool bValue);
 
-    bool IsDisposed (void) const;
+    bool IsDisposed() const;
 
-    void ThrowIfDisposed (void) const
+    void ThrowIfDisposed() const
         throw (css::lang::DisposedException);
-
-    enum ExceptionType { ET_Runtime, ET_Disposed, ET_IndexOutOfBounds };
-    void ThrowException (const sal_Char* pMessage, const ExceptionType eExceptionType) const;
 };
 
 //===== AccessibleStateSet ====================================================
@@ -899,7 +896,7 @@ Reference<XAccessible> SAL_CALL
     ThrowIfDisposed();
 
     if (nIndex<0 || nIndex>=sal_Int32(maChildren.size()))
-        ThrowException("invalid child index", ET_IndexOutOfBounds);
+        throw lang::IndexOutOfBoundsException("invalid child index", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
 
     return Reference<XAccessible>(maChildren[nIndex].get());
 }
@@ -1300,13 +1297,13 @@ void PresenterAccessible::AccessibleObject::FireAccessibleEvent (
         {
             (*iListener)->notifyEvent(aEventObject);
         }
-        catch(lang::DisposedException&)
+        catch (const lang::DisposedException&)
         {
             // Listener has been disposed and should have been removed
             // already.
             removeAccessibleEventListener(*iListener);
         }
-        catch(Exception&)
+        catch (const Exception&)
         {
             // Ignore all other exceptions and assume that they are
             // caused by a temporary problem.
@@ -1314,7 +1311,7 @@ void PresenterAccessible::AccessibleObject::FireAccessibleEvent (
     }
 }
 
-awt::Point PresenterAccessible::AccessibleObject::GetRelativeLocation (void)
+awt::Point PresenterAccessible::AccessibleObject::GetRelativeLocation()
 {
     awt::Point aLocation;
     if (mxContentWindow.is())
@@ -1332,7 +1329,7 @@ awt::Point PresenterAccessible::AccessibleObject::GetRelativeLocation (void)
     return aLocation;
 }
 
-awt::Size PresenterAccessible::AccessibleObject::GetSize (void)
+awt::Size PresenterAccessible::AccessibleObject::GetSize()
 {
     if (mxContentWindow.is())
     {
@@ -1343,7 +1340,7 @@ awt::Size PresenterAccessible::AccessibleObject::GetSize (void)
         return awt::Size();
 }
 
-awt::Point PresenterAccessible::AccessibleObject::GetAbsoluteParentLocation (void)
+awt::Point PresenterAccessible::AccessibleObject::GetAbsoluteParentLocation()
 {
     Reference<XAccessibleComponent> xParentComponent;
     if (mxParentAccessible.is())
@@ -1355,35 +1352,16 @@ awt::Point PresenterAccessible::AccessibleObject::GetAbsoluteParentLocation (voi
         return awt::Point();
 }
 
-bool PresenterAccessible::AccessibleObject::IsDisposed (void) const
+bool PresenterAccessible::AccessibleObject::IsDisposed() const
 {
     return (rBHelper.bDisposed || rBHelper.bInDispose);
 }
 
-void PresenterAccessible::AccessibleObject::ThrowIfDisposed (void) const
+void PresenterAccessible::AccessibleObject::ThrowIfDisposed() const
     throw (lang::DisposedException)
 {
     if (rBHelper.bDisposed || rBHelper.bInDispose)
-        ThrowException("object has already been disposed", ET_Disposed);
-}
-
-void PresenterAccessible::AccessibleObject::ThrowException (
-    const sal_Char* pMessage,
-    const ExceptionType eExceptionType) const
-{
-    const OUString sMessage ("PresenterAccessible: " + OUString::createFromAscii(pMessage));
-    const Reference<XInterface> xObject (
-        const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
-    switch (eExceptionType)
-    {
-        default:
-        case ET_Runtime:
-            throw RuntimeException(sMessage, xObject);
-        case ET_Disposed:
-            throw lang::DisposedException(sMessage, xObject);
-        case ET_IndexOutOfBounds:
-            throw lang::IndexOutOfBoundsException(sMessage, xObject);
-    }
+        throw lang::DisposedException("object has already been disposed", uno::Reference<uno::XInterface>((uno::XWeak*)(this)));
 }
 
 //===== AccessibleStateSet ====================================================
@@ -1591,7 +1569,7 @@ sal_Unicode SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacter (sal
     ThrowIfDisposed();
 
     if (!mpParagraph)
-        ThrowException("no text support in current mode", ET_IndexOutOfBounds);
+        throw lang::IndexOutOfBoundsException("no text support in current mode", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
     return mpParagraph->GetCharacter(nIndex);
 }
 
@@ -1631,7 +1609,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo
     awt::Rectangle aCharacterBox;
     if (nIndex < 0)
     {
-        ThrowException("invalid text index", ET_IndexOutOfBounds);
+        throw lang::IndexOutOfBoundsException("invalid text index", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
     }
     else if (mpParagraph)
     {
@@ -1644,7 +1622,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo
     }
     else
     {
-        ThrowException("no text support in current mode", ET_IndexOutOfBounds);
+        throw lang::IndexOutOfBoundsException("no text support in current mode", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
     }
 
     return aCharacterBox;
commit 8bafbd2c40a156b95552d1594396e16a3053bbaa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 14:57:16 2014 +0100

    coverity#983926 Uncaught exception
    
    Change-Id: I2b0115d59c312bdce7bdd9c8ae133e07dfb9699a

diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index 515074c..b78e655 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -94,7 +94,7 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< ::com::sun:
     // Creating a SdrObject using it's Description.
     // Can be used by derived classes to support their owen Shapes (e.g. Controls).
     virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape )
-        throw (std::exception);
+        throw (css::uno::Exception, std::exception);
 
     static SvxShape* CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj = NULL, SvxDrawPage *pPage = NULL, OUString const & referer = OUString() ) throw();
 
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index ecca282..9ce4356 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -474,7 +474,7 @@ void SAL_CALL SvxDrawPage::ungroup( const Reference< drawing::XShapeGroup >& aGr
 }
 
 SdrObject *SvxDrawPage::_CreateSdrObject(const Reference< drawing::XShape > & xShape)
-    throw (std::exception)
+    throw (css::uno::Exception, std::exception)
 {
     sal_uInt16 nType = 0;
     sal_uInt32 nInventor = 0;
commit e5c863294abb1204793e0c0dd67f23813df1d522
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 14:52:27 2014 +0100

    coverity#983959 Uncaught exception
    
    Change-Id: Id2f069576ecacb66cfa461bdca394a06befd765b

diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx
index 2b60060..d7457a4 100644
--- a/sw/inc/unotext.hxx
+++ b/sw/inc/unotext.hxx
@@ -241,8 +241,10 @@ public:
             const ::com::sun::star::uno::Reference<
                     ::com::sun::star::text::XTextRange >&
                 rTextRange)
-        throw (::com::sun::star::lang::IllegalArgumentException,
-                ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+        throw (css::lang::IllegalArgumentException,
+               css::beans::UnknownPropertyException,
+               css::uno::RuntimeException,
+               std::exception) SAL_OVERRIDE;
 
     // XTextContentAppend
     virtual ::com::sun::star::uno::Reference<
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 709adc2..b89f32b 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1362,7 +1362,8 @@ SwXText::insertTextPortion(
         const uno::Sequence< beans::PropertyValue > &
             rCharacterAndParagraphProperties,
         const uno::Reference<text::XTextRange>& xInsertPosition)
-throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
+    throw (lang::IllegalArgumentException, beans::UnknownPropertyException,
+           uno::RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
 
commit 99faf61bcdfa69b307fefff1d0611ba45e5a15d9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat May 24 14:50:14 2014 +0100

    coverity#983961 Uncaught exception
    
    Change-Id: I4316d9b2465f2608ac5d5992b5a2dc07d1713100

diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx
index f0d8e0c..9ccca3d 100644
--- a/include/comphelper/MasterPropertySet.hxx
+++ b/include/comphelper/MasterPropertySet.hxx
@@ -78,7 +78,9 @@ namespace comphelper
         virtual void _preGetValues ()
             throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) = 0;
         virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
-            throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ) = 0;
+            throw (css::beans::UnknownPropertyException,
+                   css::lang::WrappedTargetException,
+                   css::uno::RuntimeException) = 0;
         virtual void _postGetValues ()
             throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) = 0;
 
diff --git a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
index 1643633..94ad4b5 100644
--- a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
@@ -832,7 +832,8 @@ void SwXDocumentSettings::_preGetValues ()
 }
 
 void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
-        throw(beans::UnknownPropertyException, lang::WrappedTargetException )
+        throw (beans::UnknownPropertyException, lang::WrappedTargetException,
+               uno::RuntimeException)
 {
     switch( rInfo.mnHandle )
     {
diff --git a/sw/source/core/uibase/uno/SwXDocumentSettings.hxx b/sw/source/core/uibase/uno/SwXDocumentSettings.hxx
index 181f553..b3759a0 100644
--- a/sw/source/core/uibase/uno/SwXDocumentSettings.hxx
+++ b/sw/source/core/uibase/uno/SwXDocumentSettings.hxx
@@ -61,7 +61,9 @@ protected:
     virtual void _preGetValues ()
         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE;
     virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
-        throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE;
+        throw (css::beans::UnknownPropertyException,
+               css::lang::WrappedTargetException,
+               css::uno::RuntimeException) SAL_OVERRIDE;
     virtual void _postGetValues ()
         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE;
 protected:


More information about the Libreoffice-commits mailing list