[Libreoffice-commits] core.git: 10 commits - include/unotools include/vbahelper oovbaapi/ooo sw/source ucb/source unotools/source unoxml/source uui/source vbahelper/source vcl/source

Caolán McNamara caolanm at redhat.com
Sat Apr 5 13:12:35 PDT 2014


 include/unotools/ucblockbytes.hxx       |    2 --
 include/vbahelper/vbacollectionimpl.hxx |    2 +-
 oovbaapi/ooo/vba/XCollection.idl        |    2 +-
 oovbaapi/ooo/vba/word/XSelection.idl    |    2 +-
 sw/source/ui/vba/vbaselection.cxx       |    3 ++-
 sw/source/ui/vba/vbaselection.hxx       |    3 ++-
 sw/source/ui/vba/vbastyles.cxx          |    7 +++++--
 sw/source/ui/vba/vbastyles.hxx          |    5 +++--
 ucb/source/ucp/file/prov.cxx            |   12 +++---------
 unotools/source/ucbhelper/tempfile.cxx  |    8 +++++---
 unoxml/source/events/testlistener.hxx   |    5 ++++-
 uui/source/loginerr.hxx                 |   11 ++++++-----
 vbahelper/source/msforms/vbalistbox.cxx |    4 +++-
 vcl/source/gdi/graphictools.cxx         |    1 +
 14 files changed, 37 insertions(+), 30 deletions(-)

New commits:
commit b26aaf5f64853ad2085a73bf762826dbc2a40f94
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 21:09:27 2014 +0100

    coverity#708562 Uninitialized scalar field
    
    Change-Id: I93a760e0f3b8a1669f7ce9995808b7cff52fa1fa

diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 8072153..0a1ebf1 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -84,26 +84,20 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpfile_component_getFactory(
 /*                                                                          */
 /*                                                                          */
 /****************************************************************************/
-
-
-
 FileProvider::FileProvider( const Reference< XComponentContext >& rxContext )
-    : m_xContext( rxContext ),
-      m_pMyShell( 0 )
+    : m_xContext(rxContext)
+    , m_FileSystemNotation(FileSystemNotation::UNKNOWN_NOTATION)
+    , m_pMyShell(NULL)
 {
 }
 
-
 FileProvider::~FileProvider()
 {
     if( m_pMyShell )
         delete m_pMyShell;
 }
 
-
-
 // XInitialization
-
 void SAL_CALL FileProvider::init()
 {
     if( ! m_pMyShell )
commit 880762357ea158d4875047abff5f14e0b224a30c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 21:07:38 2014 +0100

    coverity#708566 Uninitialized scalar field
    
    Change-Id: I4a9c3faa194ae0885dc27571cc14c4c8cee8cb0f

diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 9585639..4821714 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -54,9 +54,11 @@ struct TempFile_Impl
     SvStream*   pStream;
     bool        bIsDirectory;
 
-                TempFile_Impl()
-                    : pStream(0)
-                    {}
+    TempFile_Impl()
+        : pStream(0)
+        , bIsDirectory(false)
+    {
+    }
 };
 
 OUString getParentName( const OUString& aFileName )
commit 473183aad3295719feec0a25f36955b8a5446fc5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 21:06:06 2014 +0100

    coverity#708567 unused member variables
    
    Change-Id: I36b276a95bdea804defd5d7cb162ee0b8f378fad

diff --git a/include/unotools/ucblockbytes.hxx b/include/unotools/ucblockbytes.hxx
index a8b854a..8ebac86 100644
--- a/include/unotools/ucblockbytes.hxx
+++ b/include/unotools/ucblockbytes.hxx
@@ -105,8 +105,6 @@ class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes
     void*                   m_pCommandThread; // is alive only for compatibility reasons
     UcbLockBytesHandlerRef  m_xHandler;
 
-    sal_uInt32              m_nRead;
-    sal_uInt32              m_nSize;
     ErrCode                 m_nError;
 
     bool                    m_bTerminated;
commit d2e65c7ba7f7aaa071b9798bdd012c24c582d913
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 21:04:12 2014 +0100

    coverity#708568 Uninitialized scalar field
    
    Change-Id: I0aeb615809001bd17d51eb66c0ebf429f960bca3

diff --git a/unoxml/source/events/testlistener.hxx b/unoxml/source/events/testlistener.hxx
index de77c7b6..bfa5961 100644
--- a/unoxml/source/events/testlistener.hxx
+++ b/unoxml/source/events/testlistener.hxx
@@ -75,7 +75,10 @@ namespace DOM { namespace events
         CTestListener(
                 const Reference< ::com::sun::star::lang::XMultiServiceFactory >&
                     rSMgr)
-            : m_factory(rSMgr){};
+            : m_factory(rSMgr)
+            , m_capture(sal_False)
+        {
+        }
 
         virtual ~CTestListener();
 
commit 826e43eda6bda9610ea3e07e2a27b37c93f529f4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 21:02:53 2014 +0100

    coverity#708569 Uninitialized scalar field
    
    Change-Id: Ibe5ff56f9b068dd438ecd92f99fdd2a91b604165

diff --git a/uui/source/loginerr.hxx b/uui/source/loginerr.hxx
index 60bb266..a5b620e 100644
--- a/uui/source/loginerr.hxx
+++ b/uui/source/loginerr.hxx
@@ -48,11 +48,12 @@ private:
     bool   m_bRecommendToOpenReadonly;
 
 public:
-                    LoginErrorInfo()
-                    : m_nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ),
-                      m_nRet( ERRCODE_BUTTON_CANCEL )
-                    {
-                    }
+    LoginErrorInfo()
+        : m_nFlags(LOGINERROR_FLAG_MODIFY_USER_NAME)
+        , m_nRet(ERRCODE_BUTTON_CANCEL)
+        , m_bRecommendToOpenReadonly(false)
+    {
+    }
 
     const OUString&   GetTitle() const                    { return m_aTitle; }
     const OUString&   GetServer() const                   { return m_aServer; }
commit 0825c92c0b9ffc2cc28aa4e3a17fdfdbee5e5e39
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 21:01:49 2014 +0100

    coverity#708570 Uninitialized scalar field
    
    Change-Id: I0b5a12181d67db6b096807b7b32836214c71ebc8

diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx
index c3fdcf3..28aa435 100644
--- a/vbahelper/source/msforms/vbalistbox.cxx
+++ b/vbahelper/source/msforms/vbalistbox.cxx
@@ -32,7 +32,9 @@ const static OUString SELECTEDITEMS( "SelectedItems" );
 const static OUString ITEMS( "StringItemList" );
 
 
-ScVbaListBox::ScVbaListBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
+ScVbaListBox::ScVbaListBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper )
+    : ListBoxImpl_BASE(xParent, xContext, xControl, xModel, pGeomHelper)
+    : m_nIndex(0)
 {
     mpListHelper.reset( new ListControlHelper( m_xProps ) );
 }
commit f121e10c0f5e95037acdfb65a3cda6ab64e95f78
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 21:00:43 2014 +0100

    coverity#708597 Uninitialized scalar field
    
    Change-Id: I8f4e4a4502075a0672438cc4c59eddc5ee922228

diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 7c913ab..fe2b760 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -190,6 +190,7 @@ SvtGraphicFill::SvtGraphicFill() :
     maFillRule(),
     maFillType(),
     maFillTransform(),
+    mbTiling( false ),
     maHatchType(),
     maHatchColor( COL_BLACK ),
     maGradientType(),
commit b852bf36d37cd5a6949edbf06fba11a782562549
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 20:54:48 2014 +0100

    coverity#707400 Uncaught exception
    
    Change-Id: I4c68ea7061af04616eda27365b16cfa57200ffbc

diff --git a/oovbaapi/ooo/vba/word/XSelection.idl b/oovbaapi/ooo/vba/word/XSelection.idl
index 9fee2cf..3706acb 100644
--- a/oovbaapi/ooo/vba/word/XSelection.idl
+++ b/oovbaapi/ooo/vba/word/XSelection.idl
@@ -61,7 +61,7 @@ interface XSelection
     void InsertParagraphBefore();
     void InsertParagraphAfter();
     void TypeBackspace();
-    XRange GoTo( [in] any What, [in] any Which, [in] any Count, [in] any Name );
+    XRange GoTo( [in] any What, [in] any Which, [in] any Count, [in] any Name ) raises (com::sun::star::script::BasicErrorException);
     any Information( [in] long Type );
     void InsertBreak( [in] any Type );
     any ShapeRange();
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 15728fc..bba8cf7 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -552,7 +552,8 @@ SwVbaSelection::TypeBackspace() throw ( uno::RuntimeException, std::exception )
     dispatchRequests( mxModel,url );
 }
 
-uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _what, const uno::Any& _which, const uno::Any& _count, const uno::Any& _name ) throw (uno::RuntimeException, std::exception)
+uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _what, const uno::Any& _which, const uno::Any& _count, const uno::Any& _name )
+    throw (script::BasicErrorException, uno::RuntimeException, std::exception)
 {
     sal_Int32 nWhat = 0;
     if( !( _what >>= nWhat ) )
diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx
index 48eb48a..abe70b3 100644
--- a/sw/source/ui/vba/vbaselection.hxx
+++ b/sw/source/ui/vba/vbaselection.hxx
@@ -76,7 +76,8 @@ public:
     virtual void SAL_CALL setStyle( const css::uno::Any& _xStyle ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual void SAL_CALL TypeBackspace() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL GoTo( const css::uno::Any& _what, const css::uno::Any& _which, const css::uno::Any& _count, const css::uno::Any& _name ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL GoTo( const css::uno::Any& _what, const css::uno::Any& _which, const css::uno::Any& _count, const css::uno::Any& _name )
+        throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual ::sal_Int32 SAL_CALL getLanguageID( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual css::uno::Any SAL_CALL Information( sal_Int32 _type ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
commit 7969655b958e3f0f0fc4f7049ca505f118242dcc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 20:48:43 2014 +0100

    coverity#707406 Uncaught exception
    
    Change-Id: I5fc9d24390d0a90f89c3e71e87bf37ddd9c2fe67

diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index f7f03c5..2f57ab1 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -286,7 +286,7 @@ public:
         return m_xIndexAccess->getCount();
     }
 
-    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw (css::uno::RuntimeException)
+    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
     {
         if ( Index1.getValueTypeClass() != css::uno::TypeClass_STRING )
         {
diff --git a/oovbaapi/ooo/vba/XCollection.idl b/oovbaapi/ooo/vba/XCollection.idl
index 781da81..a2d3ad2 100644
--- a/oovbaapi/ooo/vba/XCollection.idl
+++ b/oovbaapi/ooo/vba/XCollection.idl
@@ -36,7 +36,7 @@ interface XCollection
 
     [attribute, readonly] long Count;
 
-    any  Item( [in] any Index1, [in] any Index2 );
+    any  Item( [in] any Index1, [in] any Index2 ) raises(com::sun::star::script::BasicErrorException);
 };
 
 }; };
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index 728e1ff..f8ca1d4 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -293,7 +293,8 @@ SwVbaStyles::createEnumeration() throw (uno::RuntimeException)
 }
 
 uno::Any SAL_CALL
-SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::RuntimeException)
+SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 )
+    throw (script::BasicErrorException, uno::RuntimeException)
 {
     //handle WdBuiltinStyle
     sal_Int32 nIndex = 0;
diff --git a/sw/source/ui/vba/vbastyles.hxx b/sw/source/ui/vba/vbastyles.hxx
index b2dd38c..8b1ebc3 100644
--- a/sw/source/ui/vba/vbastyles.hxx
+++ b/sw/source/ui/vba/vbastyles.hxx
@@ -31,7 +31,7 @@ public:
     SwVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel )
         throw ( css::script::BasicErrorException, css::uno::RuntimeException );
 
-    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
+    virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE;
     // XEnumerationAccess
     virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) SAL_OVERRIDE;
     virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) SAL_OVERRIDE;
commit 39d792c18047f1baca8f3467af7d090cca662f5a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 5 20:43:53 2014 +0100

    coverity#707408 Uncaught exception
    
    Change-Id: Ie4b540b2d49841182769946c4ce8d39cb2d7a3fe

diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index ee1ab13..728e1ff 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -266,7 +266,9 @@ public:
     }
 };
 
-SwVbaStyles::SwVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException ) : SwVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new StyleCollectionHelper( xModel )  ) ), mxModel( xModel )
+SwVbaStyles::SwVbaStyles( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel )
+    throw ( script::BasicErrorException, uno::RuntimeException )
+    : SwVbaStyles_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new StyleCollectionHelper( xModel )  ) ), mxModel( xModel )
 {
     mxMSF.set( mxModel, uno::UNO_QUERY_THROW );
 }
diff --git a/sw/source/ui/vba/vbastyles.hxx b/sw/source/ui/vba/vbastyles.hxx
index 0a36c0b..b2dd38c 100644
--- a/sw/source/ui/vba/vbastyles.hxx
+++ b/sw/source/ui/vba/vbastyles.hxx
@@ -28,7 +28,8 @@ class SwVbaStyles: public SwVbaStyles_BASE
     css::uno::Reference< css::frame::XModel > mxModel;
     css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF;
 public:
-    SwVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::script::BasicErrorException );
+    SwVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel )
+        throw ( css::script::BasicErrorException, css::uno::RuntimeException );
 
     virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
     // XEnumerationAccess


More information about the Libreoffice-commits mailing list