[Libreoffice-commits] core.git: 7 commits - l10ntools/source sfx2/source svtools/source sw/source tools/bootstrp tools/source ucbhelper/source

Julien Nabet serval2412 at yahoo.fr
Wed Feb 13 11:58:39 PST 2013


 l10ntools/source/xrmmerge.cxx             |    6 ++----
 sfx2/source/appl/module.cxx               |    2 +-
 svtools/source/control/roadmap.cxx        |   15 ++++++++-------
 sw/source/filter/ww8/rtfsdrexport.cxx     |    1 +
 tools/bootstrp/rscdep.cxx                 |    2 +-
 tools/source/stream/stream.cxx            |    3 +--
 ucbhelper/source/provider/registerucb.cxx |    3 ++-
 7 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit e52792c9e0aec6e095137cf8d2f68d1cbec90e80
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 20:54:58 2013 +0100

    Fix member variable 'RoadmapImpl::InCompleteHyperLabel' not initialized in CTR
    
    + replace '<' by '!=' when comparing current it with end iterator
    
    Change-Id: Iea8416a5143aafdea863397c78b58512bb54b427

diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index 6a23688..7d7e2b4 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -138,6 +138,7 @@ namespace svt
             ,m_iCurItemID( -1 )
             ,m_bInteractive( sal_True )
             ,m_bComplete( sal_True )
+            ,InCompleteHyperLabel ( NULL )
         {
         }
 
@@ -238,7 +239,7 @@ namespace svt
     {
         HL_Vector aItemsCopy = m_pImpl->getHyperLabels();
         m_pImpl->getHyperLabels().clear();
-        for ( HL_Vector::iterator i = aItemsCopy.begin(); i< aItemsCopy.end(); ++i )
+        for ( HL_Vector::iterator i = aItemsCopy.begin(); i != aItemsCopy.end(); ++i )
         {
             delete *i;
         }
@@ -309,7 +310,7 @@ namespace svt
 
         const HL_Vector& rItems = m_pImpl->getHyperLabels();
         for (   HL_Vector::const_iterator i = rItems.begin();
-                i < rItems.end();
+                i != rItems.end();
                 ++i
             )
         {
@@ -348,7 +349,7 @@ namespace svt
         {
             RoadmapItem* pItem = NULL;
             for (   HL_Vector::const_iterator i = rItems.begin() + _nIndex;
-                    i< rItems.end();
+                    i != rItems.end();
                     ++i, ++_nIndex
                 )
             {
@@ -435,7 +436,7 @@ namespace svt
 
             const HL_Vector& rItems = m_pImpl->getHyperLabels();
             for (   HL_Vector::const_iterator i = rItems.begin() + _nStartIndex;
-                    i < rItems.end();
+                    i != rItems.end();
                     ++i
                 )
             {
@@ -458,7 +459,7 @@ namespace svt
         ItemId nLocID = 0;
         const HL_Vector& rItems = m_pImpl->getHyperLabels();
         for (   HL_Vector::const_iterator i = rItems.begin() + _nStartIndex;
-                i < rItems.end();
+                i != rItems.end();
                 ++i
             )
         {
@@ -530,7 +531,7 @@ namespace svt
     {
         const HL_Vector& rItems = m_pImpl->getHyperLabels();
         for (   HL_Vector::const_iterator i = rItems.begin();
-                i < rItems.end();
+                i != rItems.end();
                 ++i
             )
         {
@@ -630,7 +631,7 @@ namespace svt
     {
         const HL_Vector& rItems = m_pImpl->getHyperLabels();
         for (   HL_Vector::const_iterator i = rItems.begin();
-                i < rItems.end();
+                i != rItems.end();
                 ++i
             )
         {
commit 0787dc99aa546f68f4003afd5e60cdcca56cad1d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 20:45:52 2013 +0100

    Add parenthesis to calm down cppcheck
    
    Change-Id: If62959d80c9a7e207291fff05b5e085b0c84866f

diff --git a/ucbhelper/source/provider/registerucb.cxx b/ucbhelper/source/provider/registerucb.cxx
index 6d4bf3e..8b2e5e0 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -116,6 +116,7 @@ registerAtUcb(
 
     bool bSuccess = false;
     if (rManager.is() && xProvider.is())
+    {
         try
         {
             rManager->registerContentProvider(xProvider, rTemplate, true);
@@ -143,7 +144,7 @@ registerAtUcb(
                 catch (uno::RuntimeException const &) {}
             throw;
         }
-
+    }
     if (bSuccess && pInfo)
     {
         pInfo->m_xProvider = xOriginalProvider;
commit c7e65b12ff3e7a795a583bf655784126e886289f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 20:43:00 2013 +0100

    Reduce scope xrmmerge.cxx
    
    Change-Id: I70018ce13dc5dc45d59fdb339e9d0a14348a4195

diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 5871948..680f0ca 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -400,12 +400,10 @@ void XRMResExport::WorkOnDesc(
     rtl::OString sDescFileName(
         sInputFileName.replaceAll("description.xml", rtl::OString()));
     sDescFileName += GetAttribute( rOpenTag, "xlink:href" );
-    int size;
-    char * memblock;
     ifstream file (sDescFileName.getStr(), ios::in|ios::binary|ios::ate);
     if (file.is_open()) {
-        size = static_cast<int>(file.tellg());
-        memblock = new char [size+1];
+        int size = static_cast<int>(file.tellg());
+        char* memblock = new char [size+1];
         file.seekg (0, ios::beg);
         file.read (memblock, size);
         file.close();
commit 92bdbbed7ff1c75c7798cf4df3636e4e132aee8a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 20:40:58 2013 +0100

    Fix member variable m_pSdrObject not initialized in the constructor
    
    Change-Id: If957ac222b635aef0518c8d47f3f59351677cef5

diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 2ca7ed6..b21f671 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -34,6 +34,7 @@ RtfSdrExport::RtfSdrExport( RtfExport &rExport )
     : EscherEx( EscherExGlobalRef( new EscherExGlobal ), 0 ),
       m_rExport( rExport ),
       m_rAttrOutput( (RtfAttributeOutput&)m_rExport.AttrOutput() ),
+      m_pSdrObject( NULL ),
       m_nShapeType( ESCHER_ShpInst_Nil ),
       m_pShapeStyle( new OStringBuffer( 200 ) ),
       m_pShapeTypeWritten( new bool[ ESCHER_ShpInst_COUNT ] )
commit 42f03b75682b1fa8b89df2e89d05f66ce32afad3
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 20:40:20 2013 +0100

    Reduce scope
    
    Change-Id: I6bdff92cee194d79af98227d48c68304ee56593b

diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 68c9dc9..9516581 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -417,9 +417,8 @@ SvStream::SvStream( SvLockBytes* pLockBytesP )
 
     ImpInit();
     xLockBytes = pLockBytesP;
-    const SvStream* pStrm;
     if( pLockBytesP ) {
-        pStrm = pLockBytesP->GetStream();
+        const SvStream* pStrm = pLockBytesP->GetStream();
         if( pStrm ) {
             SetError( pStrm->GetErrorCode() );
         }
commit a5ad4e7459b8cbb76478fd7fd621cd96853e67af
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 20:30:58 2013 +0100

    Fix member variables not initialized in the constructor
    
    Change-Id: Ibd7138a185e4d4f87f36d59acd398387a52e9d34

diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 9264d59..a73445c 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -63,7 +63,7 @@ public:
 };
 
 SfxModule_Impl::SfxModule_Impl()
- : pSlotPool(0)
+ : pSlotPool(0), pTbxCtrlFac(0), pStbCtrlFac(0), pMenuCtrlFac(0), pFactArr(0), pImgListSmall(0), pImgListBig(0)
 {
 }
 
commit b15a80f003fe27163e9a5c86ff170ffe0fbdf41a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Feb 13 20:28:39 2013 +0100

    Fix Buffer overrun possible for long command line arguments
    
    Change-Id: I5e66ded25afd08f4e203ce8484001e11e0022fca

diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx
index 9d29d86..04ae7a1 100644
--- a/tools/bootstrp/rscdep.cxx
+++ b/tools/bootstrp/rscdep.cxx
@@ -81,7 +81,7 @@ int main( int argc, char** argv )
 
     for ( int i=1; i<argc; i++)
     {
-        strcpy( aBuf, (const char *)argv[i] );
+        strncpy( aBuf, (const char *)argv[i], sizeof(aBuf) );
         const sal_Int32 nLength (strlen(aBuf));
 
 #ifdef DEBUG


More information about the Libreoffice-commits mailing list