[Libreoffice-commits] core.git: 5 commits - onlineupdate/source svl/source svx/source sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Tue Aug 11 13:05:03 PDT 2015


 onlineupdate/source/update/common/updatelogging.cxx |    4 +++-
 svl/source/numbers/zforscan.hxx                     |    4 ++++
 svx/source/table/tableundo.hxx                      |    9 +++++++++
 svx/source/unodraw/unoshtxt.cxx                     |    2 +-
 sw/qa/core/data/ww8/pass/hang-3.doc                 |binary
 sw/source/filter/ww8/ww8par.cxx                     |    4 ++--
 6 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit 0592da19b625975886d3442477f4399660736a69
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 11 20:58:22 2015 +0100

    avoid another hang with certain .docs
    
    Change-Id: If16e90c5ba1a43ceb9702e752835928da7b3ef32

diff --git a/sw/qa/core/data/ww8/pass/hang-3.doc b/sw/qa/core/data/ww8/pass/hang-3.doc
new file mode 100644
index 0000000..4188b80
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/hang-3.doc differ
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 96c71b7..aca1430 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2287,7 +2287,7 @@ void SwWW8ImplReader::Read_HdFtText(WW8_CP nStart, WW8_CP nLen, SwFrameFormat* p
 bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
 {
     // Each CP of Plcfhdd MUST be less than FibRgLw97.ccpHdd
-    return (nHeaderCP < m_pWwFib->ccpHdr);
+    return (nHeaderCP < m_pWwFib->ccpHdr && nHeaderCP >= 0);
 }
 
 bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt,
@@ -2304,7 +2304,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIh
             {
                 bool bOk = true;
                 if( m_bVer67 )
-                    bOk = ( m_pHdFt->GetTextPos(grpfIhdt, nI, nStart, nLen ) && nLen >= 2 );
+                    bOk = ( m_pHdFt->GetTextPos(grpfIhdt, nI, nStart, nLen ) && nStart >= 0 && nLen >= 2 );
                 else
                 {
                     m_pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), nStart, nLen);
commit 7b09e2a90cd8b69b466601f70d0513cfe2862e7c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 11 21:01:35 2015 +0100

    cppcheck: nullPointerRedundantCheck
    
    Change-Id: I8f893fe86d1f09a6ed7256830bca5599f94a187b

diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index b6577ae..1ff2e0e 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -643,7 +643,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
             mpOutliner->SetText( *pOutlinerParaObject );
 
             // #91254# put text to object and set EmptyPresObj to FALSE
-            if( mpText && bOwnParaObj && pOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsReallyEdited() )
+            if( mpText && bOwnParaObj && mpObject->IsEmptyPresObj() && pTextObj->IsReallyEdited() )
             {
                 mpObject->SetEmptyPresObj( false );
                 static_cast< SdrTextObj* >( mpObject)->NbcSetOutlinerParaObjectForText( pOutlinerParaObject, mpText );
commit cf58196691785d284fcffc653626fcf135c9ba69
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 11 20:49:50 2015 +0100

    cppcheck: uninitMemberVar
    
    Change-Id: I7c6addac04246eb17827033e7a291dd2e5600384

diff --git a/svx/source/table/tableundo.hxx b/svx/source/table/tableundo.hxx
index 630068e..e18974d 100644
--- a/svx/source/table/tableundo.hxx
+++ b/svx/source/table/tableundo.hxx
@@ -186,6 +186,15 @@ private:
         bool    mbIsVisible;
         bool    mbIsStartOfNewPage;
         OUString maName;
+
+        Data()
+            : mnColumn(0)
+            , mnWidth(0)
+            , mbOptimalWidth(false)
+            , mbIsVisible(false)
+            , mbIsStartOfNewPage(false)
+        {
+        }
     };
 
     void setData( const Data& rData );
commit 3d80bb27d2416086026f4edf08ba2bff953901d6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 11 20:46:52 2015 +0100

    cppcheck: noCopyConstructor
    
    Change-Id: I20dabf3106d8f74fac5cc59f93a006875b9e1f91

diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index 54eec03..5f51eda 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -194,6 +194,10 @@ private: // Private section
 
     sal_uInt8 nNatNumModifier;                  // Thai T speciality
 
+    // Copy assignment is forbidden and not implemented.
+    ImpSvNumberformatScan (const ImpSvNumberformatScan &) SAL_DELETED_FUNCTION;
+    ImpSvNumberformatScan & operator= (const ImpSvNumberformatScan &) SAL_DELETED_FUNCTION;
+
     void InitKeywords() const;
     void InitSpecialKeyword( NfKeywordIndex eIdx ) const;
     void InitCompatCur() const;
commit a2c6c2e50054ff6cee70cff936d3682a5b0f5a55
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 11 20:44:19 2015 +0100

    cppcheck: uninitMemberVar
    
    Change-Id: I78acdab89764a27291ca05b0bb1d448608202208

diff --git a/onlineupdate/source/update/common/updatelogging.cxx b/onlineupdate/source/update/common/updatelogging.cxx
index 4044e26..2f1472e 100644
--- a/onlineupdate/source/update/common/updatelogging.cxx
+++ b/onlineupdate/source/update/common/updatelogging.cxx
@@ -14,7 +14,9 @@
 
 #include "updatelogging.h"
 
-UpdateLog::UpdateLog() : logFP(nullptr)
+UpdateLog::UpdateLog()
+    : logFP(nullptr)
+    , sourcePath(nullptr)
 {
 }
 


More information about the Libreoffice-commits mailing list