[Libreoffice-commits] core.git: 8 commits - dbaccess/source include/svx sd/source svx/source vcl/source

Caolán McNamara caolanm at redhat.com
Tue May 27 13:09:09 PDT 2014


 dbaccess/source/ui/inc/TableController.hxx         |    4 +++-
 dbaccess/source/ui/tabledesign/TableController.cxx |    4 +++-
 include/svx/unoshape.hxx                           |    4 ++--
 sd/source/ui/inc/unomodel.hxx                      |    3 ++-
 sd/source/ui/unoidl/unomodel.cxx                   |    3 ++-
 svx/source/unodraw/shapeimpl.hxx                   |    4 ++--
 svx/source/unodraw/unoshap3.cxx                    |    2 +-
 svx/source/unodraw/unoshap4.cxx                    |    6 +++---
 vcl/source/gdi/metaact.cxx                         |   13 +++++--------
 9 files changed, 23 insertions(+), 20 deletions(-)

New commits:
commit 5326c563463a8682e0433c0badf39657446f1053
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 21:03:26 2014 +0100

    Resolves: fdo#78040 nAryLen is traditionally 32bit not 16bit
    
    30bb1eddba2b4a36b4354303ffcb37a3a15f38a6 originally incorrectly
    changed some different 16bit numbers to 32bit, then
    02abb559fb506e3d3911bbf058c9a60d28b0a3b5 reverted those 16bit->32bit
    changes but accidentally changed the 32bit nAryLen to 16bit but
    that was 32bit before 30bb1eddba2b4a36b4354303ffcb37a3a15f38a6
    
    Change-Id: I36863b62418d7a3b5ccce51aef86c63c523f9598

diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index eb9217e..fee3d80 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1094,7 +1094,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
 {
     if( rAction.mpDXAry )
     {
-        const sal_uLong nAryLen = mnLen;
+        const sal_Int32 nAryLen = mnLen;
 
         mpDXAry = new sal_Int32[ nAryLen ];
         memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) );
@@ -1114,7 +1114,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
     mnIndex     ( nIndex ),
     mnLen       ( nLen )
 {
-    const sal_uLong nAryLen = pDXAry ? mnLen : 0;
+    const sal_Int32 nAryLen = pDXAry ? mnLen : 0;
 
     if( nAryLen )
     {
@@ -1177,7 +1177,7 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
     rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
     rOStm.WriteUInt16(mnIndex);
     rOStm.WriteUInt16(mnLen);
-    rOStm.WriteUInt16(nAryLen);
+    rOStm.WriteInt32(nAryLen);
 
     for (sal_Int32 i = 0; i < nAryLen; ++i)
         rOStm.WriteInt32( mpDXAry[ i ] );
@@ -1187,8 +1187,6 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
 
 void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
 {
-    sal_Int32 nAryLen;
-
     delete[] mpDXAry;
 
     VersionCompat aCompat(rIStm, STREAM_READ);
@@ -1200,9 +1198,8 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
     sal_uInt16 nTmpLen(0);
     rIStm.ReadUInt16(nTmpLen);
     mnLen = nTmpLen;
-    sal_uInt16 nTmpAryLen(0);
-    rIStm.ReadUInt16(nTmpAryLen);
-    nAryLen = nTmpAryLen;
+    sal_Int32 nAryLen(0);
+    rIStm.ReadInt32(nAryLen);
 
     if ( mnIndex + mnLen > maStr.getLength() )
     {
commit c26ba0d35e91bc16b2bede7de2466633ec240b51
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 16:57:48 2014 +0100

    coverity#1209946 Uncaught exception
    
    Change-Id: I875faea495a375b998c439a0c987b2241ca47ea8

diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 355ade6..81092d5 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -873,7 +873,7 @@ public:
 protected:
     // overide these for special property handling in subcasses. Return true if property is handled
     virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
-    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
+    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 private:
     OUString referer_;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index df603fd..36a161f 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -905,7 +905,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
 
 
 
-bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
 {
     if (   ((pProperty->nWID >= OWN_ATTR_MEDIA_URL) &&
             (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM))
commit d13b39a3d804af743872bd1f6a528d68fa2128ac
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 16:54:28 2014 +0100

    coverity#1209947 Uncaught exception
    
    Change-Id: I01501e99787118e7a7d8259dc65ae20a2932dea7

diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index 88c1989..0b8e2c6 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -64,7 +64,7 @@ class SvxAppletShape : public SvxOle2Shape
 protected:
     // overide these for special property handling in subcasses. Return true if property is handled
     virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
-    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
+    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 public:
     SvxAppletShape( SdrObject* pObj ) throw();
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 5f9898e..df603fd 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -620,7 +620,7 @@ bool SvxAppletShape::setPropertyValueImpl( const OUString& rName, const SfxItemP
     }
 }
 
-bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
 {
     if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) )
     {
commit cf5411c2bd3ce7b968c916d42d792d79c31c4523
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 16:45:33 2014 +0100

    coverity#1209948 Uncaught exception
    
    Change-Id: I095820c3abcb8e2b47e564096f050309b22cf901

diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index cc36155..88c1989 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -41,7 +41,7 @@ class SvxPluginShape : public SvxOle2Shape
 protected:
     // overide these for special property handling in subcasses. Return true if property is handled
     virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
-    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
+    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 public:
     SvxPluginShape( SdrObject* pObj ) throw();
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 2dbd917..5f9898e 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -693,7 +693,7 @@ bool SvxPluginShape::setPropertyValueImpl( const OUString& rName, const SfxItemP
     }
 }
 
-bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
 {
     if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) )
     {
commit 22b28fb784dac6ff40b699aca47333dc9c483d2a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 16:34:43 2014 +0100

    coverity#1209949 Uncaught exception
    
    Change-Id: I968c5cd5929e2587588f0e0547352acdc19e456a

diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 868724b..355ade6 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -726,7 +726,7 @@ class Svx3DCubeObject : public SvxShape
 protected:
     // overide these for special property handling in subcasses. Return true if property is handled
     virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
-    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
+    virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 public:
     Svx3DCubeObject( SdrObject* pObj ) throw();
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index 6316e75..6dc7ed7 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -546,7 +546,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const OUString& rName, const SfxItem
 
 
 
-bool Svx3DCubeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DCubeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
 {
     switch( pProperty->nWID )
     {
commit f3395a6585555252581d8458b6fd394059188b6d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 16:33:28 2014 +0100

    coverity#1209951 Uncaught exception
    
    Change-Id: I11bdec73ea12e189cca41f5f275616a138cf5793

diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index cc6308d..d6ba9c3 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -90,7 +90,8 @@ private:
     css::uno::Reference<css::uno::XInterface> create(
         OUString const & aServiceSpecifier, OUString const & referer);
 
-    SdPage* InsertSdPage( sal_uInt16 nPage, bool bDuplicate = false ) throw (css::uno::RuntimeException);
+    SdPage* InsertSdPage( sal_uInt16 nPage, bool bDuplicate = false )
+        throw (css::uno::RuntimeException, std::exception);
 
     const bool mbImpressDoc;
     bool mbClipBoard;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index a21f601..ce57995 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -440,7 +440,7 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
 *                                                                             *
 ******************************************************************************/
 SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
-    throw (css::uno::RuntimeException)
+    throw (css::uno::RuntimeException, std::exception)
 {
     sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PK_STANDARD );
     SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
commit 92814c6fe446380ce57d18a77f22571c916fbb9d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 16:32:06 2014 +0100

    coverity#1209953 Uncaught exception
    
    Change-Id: Ia167c532afc8ba900629b3f056021deed45185ea

diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index bcb6e05..cc6308d 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -90,7 +90,7 @@ private:
     css::uno::Reference<css::uno::XInterface> create(
         OUString const & aServiceSpecifier, OUString const & referer);
 
-    SdPage* InsertSdPage( sal_uInt16 nPage, bool bDuplicate = false ) throw();
+    SdPage* InsertSdPage( sal_uInt16 nPage, bool bDuplicate = false ) throw (css::uno::RuntimeException);
 
     const bool mbImpressDoc;
     bool mbClipBoard;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e8d243f..a21f601 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -439,7 +439,8 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
 /******************************************************************************
 *                                                                             *
 ******************************************************************************/
-SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate ) throw()
+SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
+    throw (css::uno::RuntimeException)
 {
     sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PK_STANDARD );
     SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
commit 116f362ef23e3b4bc2e31b720c0a49637c5257b5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 27 14:36:33 2014 +0100

    coverity#1213514 Uncaught exception
    
    Change-Id: I475b8c9bdcea120ac7ba24862000a16d9f4127c0

diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx
index bf1ee72..a6d8438 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -58,7 +58,9 @@ namespace dbaui
         void reSyncRows();
         void assignTable();                 // set the table if a name is given
         void loadData();
-        bool checkColumns(bool _bNew) throw(css::sdbc::SQLException, std::exception);      // check if we have double column names
+        bool checkColumns(bool _bNew)
+            throw (css::sdbc::SQLException,
+                   css::uno::RuntimeException, std::exception);      // check if we have double column names
         OUString createUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxTables,const OUString& _rDefault);
         void appendColumns(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& _rxColSup, bool _bNew, bool _bKeyColumns = false);
         void appendPrimaryKey(::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XKeysSupplier>& _rxSup, bool _bNew);
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 27d3757..f95f098 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -919,7 +919,9 @@ Reference<XNameAccess> OTableController::getKeyColumns() const
     return getPrimaryKeyColumns_throw(m_xTable);
 }
 
-bool OTableController::checkColumns(bool _bNew) throw(css::sdbc::SQLException, std::exception)
+bool OTableController::checkColumns(bool _bNew)
+    throw(css::sdbc::SQLException,
+          css::uno::RuntimeException, std::exception)
 {
     bool bOk = true;
     bool bFoundPKey = false;


More information about the Libreoffice-commits mailing list