[Libreoffice-commits] core.git: 19 commits - dbaccess/source lotuswordpro/source sc/source sw/source vcl/source

Caolán McNamara caolanm at redhat.com
Tue Apr 22 00:44:19 PDT 2014


 dbaccess/source/ui/misc/TableCopyHelper.cxx            |   14 ++++++-----
 dbaccess/source/ui/tabledesign/TEditControl.cxx        |    4 +--
 lotuswordpro/source/filter/explode.cxx                 |    2 -
 sc/source/filter/inc/scflt.hxx                         |   20 ++++++++---------
 sc/source/filter/starcalc/scflt.cxx                    |   16 +++++++------
 sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx |    9 ++++---
 sc/source/filter/xml/XMLColumnRowGroupExport.cxx       |    5 +++-
 sc/source/filter/xml/XMLDetectiveContext.hxx           |    9 +++++--
 sc/source/filter/xml/XMLExportIterator.cxx             |    2 +
 sc/source/filter/xml/XMLStylesExportHelper.cxx         |   11 ++++++---
 sc/source/filter/xml/XMLStylesImportHelper.cxx         |    2 +
 sc/source/filter/xml/xmldpimp.cxx                      |    3 ++
 sc/source/filter/xml/xmlfilti.cxx                      |    2 +
 sc/source/ui/drawfunc/fuconuno.cxx                     |    2 +
 sw/source/filter/ww8/ww8par.cxx                        |    3 +-
 vcl/source/fontsubset/cff.cxx                          |   16 ++++++-------
 16 files changed, 75 insertions(+), 45 deletions(-)

New commits:
commit 9b0a75c7b15efe8942c88c5492db80f2b047d053
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 21:12:11 2014 +0100

    coverity#708068 Uninitialized scalar field
    
    Change-Id: Ia458cb74a0db51e5468645d1c386fd06d6c386b7

diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index a8c0831..99019dd 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -242,6 +242,8 @@ ScMyStylesImportHelper::ScMyStylesImportHelper(ScXMLImport& rTempImport)
     pPrevStyleName(NULL),
     pCurrency(NULL),
     pPrevCurrency(NULL),
+    nCellType(0),
+    nPrevCellType(0),
     bPrevRangeAdded(true)
 {
 }
commit 02c8ec2fb27d8abd0905d7548530b9439b890191
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 21:08:38 2014 +0100

    coverity#708066 Uninitialized scalar field
    
    Change-Id: I1ba5f9abf0f20373b4f719ea7ecd404d2fd2efa9

diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 2771195..1566505 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -690,9 +690,10 @@ void ScRowFormatRanges::Sort()
 
 
 ScMyFormatRange::ScMyFormatRange()
-    : nStyleNameIndex(-1),
-    nValidationIndex(-1),
-    bIsAutoStyle(true)
+    : nStyleNameIndex(-1)
+    , nValidationIndex(-1)
+    , nNumberFormat(0)
+    , bIsAutoStyle(true)
 {
 }
 
commit b08c87db567b471f79621e6929942deee6936984
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 21:06:56 2014 +0100

    coverity#708065 Uninitialized scalar field
    
    Change-Id: Iee7260e15ea0f25a2b415a803138d88c6be6e401

diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 6ed4add..2771195 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -48,6 +48,10 @@ ScMyValidation::ScMyValidation()
     sImputTitle(),
     sFormula1(),
     sFormula2(),
+    aAlertStyle(sheet::ValidationAlertStyle_STOP),
+    aValidationType(sheet::ValidationType_ANY),
+    aOperator(sheet::ConditionOperator_NONE),
+    nShowList(0),
     bShowErrorMessage(false),
     bShowImputMessage(false),
     bIgnoreBlanks(false)
commit 74680add8abb48cfd1536e7eced622bf8c27485d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 21:03:17 2014 +0100

    coverity#708063 Uninitialized scalar field
    
    Change-Id: Ic643d3c5131d88a732d8b72d75e40b4a8a188e9e

diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index 729ca41..efb9da3 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -605,6 +605,8 @@ ScMyNotEmptyCellsIterator::ScMyNotEmptyCellsIterator(ScXMLExport& rTempXMLExport
     pDetectiveObj(NULL),
     pDetectiveOp(NULL),
     rExport(rTempXMLExport),
+    nCellCol(0),
+    nCellRow(0),
     nCurrentTable(SCTAB_MAX)
 {
 }
commit acf018e6c2f2e49005962724670fe346dc55161c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 21:01:58 2014 +0100

    coverity#708061 Uninitialized scalar field
    
    Change-Id: Ifa499fb78c17a967312521b75542158b56dcff66

diff --git a/sc/source/filter/xml/XMLDetectiveContext.hxx b/sc/source/filter/xml/XMLDetectiveContext.hxx
index fa73b09..0232204 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.hxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.hxx
@@ -48,8 +48,13 @@ struct ScMyImpDetectiveOp
     ScDetOpType                 eOpType;
     sal_Int32                   nIndex;
 
-    inline                      ScMyImpDetectiveOp() : nIndex( -1 ) {}
-    bool                        operator<(const ScMyImpDetectiveOp& rDetOp) const;
+    ScMyImpDetectiveOp()
+        : eOpType(SCDETOP_ADDSUCC)
+        , nIndex(-1)
+    {
+    }
+
+    bool operator<(const ScMyImpDetectiveOp& rDetOp) const;
 };
 
 typedef ::std::list< ScMyImpDetectiveOp > ScMyImpDetectiveOpList;
commit f74938050455279982554c3ad3daa4d23c4eaeee
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 20:59:25 2014 +0100

    coverity#708060 Uninitialized scalar field
    
    Change-Id: Ice3fdf42c7b8692cd70da643333b9fa313e0eaae

diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
index 51dcb9f..7d5677f 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
@@ -27,7 +27,10 @@
 
 using namespace xmloff::token;
 
-ScMyColumnRowGroup::ScMyColumnRowGroup() : bDisplay(false)
+ScMyColumnRowGroup::ScMyColumnRowGroup()
+    : nField(0)
+    , nLevel(0)
+    , bDisplay(false)
 {
 }
 
commit 6e7bebf381197cd592c8906759b221743f77f6d1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 20:57:26 2014 +0100

    coverity#708059 Uninitialized scalar field
    
    Change-Id: If4fc4a05c7ab5414d08b08377716193cbe7432ce

diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 384dc44..9fb21cb 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -78,7 +78,8 @@ const ScCellValue& ScMyCellInfo::CreateCell( ScDocument* pDoc )
 }
 
 ScMyDeleted::ScMyDeleted()
-    : pCellInfo(NULL)
+    : nID(0)
+    , pCellInfo(NULL)
 {
 }
 
@@ -88,9 +89,9 @@ ScMyDeleted::~ScMyDeleted()
 }
 
 ScMyGenerated::ScMyGenerated(ScMyCellInfo* pTempCellInfo, const ScBigRange& aTempBigRange)
-    : aBigRange(aTempBigRange),
-    nID(0),
-    pCellInfo(pTempCellInfo)
+    : aBigRange(aTempBigRange)
+    , nID(0)
+    , pCellInfo(pTempCellInfo)
 {
 }
 
commit 4eda84aec936ad2f69e466b043e7324f7410c32c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 21 20:53:37 2014 +0100

    coverity#708056 Uninitialized scalar field
    
    Change-Id: I1031b3125bc562fd30b3e6c9518367e83fe760c3

diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx
index a01ee99..19e331c 100644
--- a/sc/source/filter/inc/scflt.hxx
+++ b/sc/source/filter/inc/scflt.hxx
@@ -528,16 +528,16 @@ public:
     sal_uInt8               PitchAndFamily;
     sal_Char            FaceName[32];
 
-                        Sc10FontData( const Sc10FontData& rData ) :
-                            ScDataObject( rData ),
-                            Height( rData.Height ),
-                            CharSet( rData.CharSet ),
-                            PitchAndFamily( rData.PitchAndFamily )
-                                {
-                                    strncpy( FaceName, rData.FaceName, sizeof(FaceName) );
-                                    FaceName[sizeof(FaceName)-1] = 0;
-                                }
-                        Sc10FontData( SvStream& rStream );
+    Sc10FontData( const Sc10FontData& rData )
+        : ScDataObject( rData )
+        , Height( rData.Height )
+        , CharSet( rData.CharSet )
+        , PitchAndFamily( rData.PitchAndFamily )
+    {
+        strncpy( FaceName, rData.FaceName, sizeof(FaceName) );
+        FaceName[sizeof(FaceName)-1] = 0;
+    }
+    Sc10FontData( SvStream& rStream );
     virtual ScDataObject*   Clone() const SAL_OVERRIDE { return new Sc10FontData(*this); }
 };
 
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 37fe8dd..91da40f 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -407,11 +407,14 @@ template < typename T > sal_uLong insert_new( ScCollection* pCollection, SvStrea
 
 
 Sc10FontData::Sc10FontData(SvStream& rStream)
+    : Height(0)
+    , CharSet(0)
+    , PitchAndFamily(0)
 {
     rStream.ReadInt16( Height );
     rStream.ReadUChar( CharSet );
     rStream.ReadUChar( PitchAndFamily );
-    sal_uInt16 nLen;
+    sal_uInt16 nLen(0);
     rStream.ReadUInt16( nLen );
     if (nLen < sizeof(FaceName))
         rStream.Read(FaceName, nLen);
@@ -419,16 +422,15 @@ Sc10FontData::Sc10FontData(SvStream& rStream)
         rStream.SetError(ERRCODE_IO_WRONGFORMAT);
 }
 
-
-Sc10FontCollection::Sc10FontCollection(SvStream& rStream) :
-    ScCollection (4, 4),
-    nError     (0)
+Sc10FontCollection::Sc10FontCollection(SvStream& rStream)
+    : ScCollection(4, 4)
+    , nError(0)
 {
-  sal_uInt16 ID;
+  sal_uInt16 ID(0);
   rStream.ReadUInt16( ID );
   if (ID == FontID)
   {
-    sal_uInt16 nAnz;
+    sal_uInt16 nAnz(0);
     rStream.ReadUInt16( nAnz );
     for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
     {
commit 9e41835048d04609089b22a24895a21c83bd58d6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 22:06:55 2014 +0100

    coverity#708074 Uninitialized scalar field
    
    Change-Id: Ifa887cdaacf5c3d711333f95f0b4c041932ce4f8

diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 1e1fed9..ee4b038 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -985,6 +985,8 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport,
     fStep(0.0),
     nUsedHierarchy(1),
     nGroupPart(0),
+    nFunction(0),
+    nOrientation(0),
     bSelectedPage(false),
     bIsGroupField(false),
     bDateValue(false),
commit fbe7a6e1306afde784923a4f824fd0a105caf4bf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 22:05:39 2014 +0100

    coverity#708075 Uninitialized scalar field
    
    Change-Id: Iecf2eceb3bc1da5d5cd81c37e4a3520d2686dac4

diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 15cab91..1e1fed9 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -113,6 +113,7 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport,
     pDPDimSaveData(NULL),
     sDataPilotTableName(),
     sApplicationData(),
+    nSourceType(SQL),
     mnRowFieldCount(0),
     mnColFieldCount(0),
     mnPageFieldCount(0),
commit 5cd3e4f7ea9372d443c4a323596758507350c0ad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 22:03:12 2014 +0100

    coverity#708078 Uninitialized scalar field
    
    Change-Id: I06c2defdaaff4159954169ab3ad987988d68623c

diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index ebf8119..d0aec05 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -534,6 +534,7 @@ ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport,
     bSkipDuplicates(false),
     bCopyOutputData(false),
     bUseRegularExpressions(false),
+    bIsCaseSensitive(false),
     bConnectionOr(true),
     bNextConnectionOr(true),
     bConditionSourceRange(false)
commit 05b8b34668944fb70e94b572ebcce985dc382a65
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 22:01:17 2014 +0100

    coverity#708080 Uninitialized scalar field
    
    Change-Id: I7741dd72a9ef065aed6b0bf1a0bc5be0f6fdba9b

diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 35569d3..ebf8119 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -756,6 +756,7 @@ ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport,
     SvXMLImportContext( rImport, nPrfx, rLName ),
     pFilterContext(pTempFilterContext),
     sDataType(GetXMLToken(XML_TEXT)),
+    nField(0),
     bIsCaseSensitive(false)
 {
 
commit 9f3ebfe97f0e8708913c1384c4427d565f517c5c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 21:59:54 2014 +0100

    coverity#708090 Uninitialized scalar field
    
    Change-Id: I9278e66067afadac09b11b0e4419cd804b88969f

diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index 21e89c6..d9bb3a5 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -32,6 +32,8 @@
 FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP,
                    SdrModel* pDoc, SfxRequest& rReq)
     : FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
+    , nInventor(0)
+    , nIdentifier(0)
 {
     SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, false );
     SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, false );
commit 9309e82bc6e4c530e83cd87cf950442dc8ac11e2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 21:09:59 2014 +0100

    coverity#1202749 Bad bit shift operation
    
    these longs are really intended as x86 longs, i.e. 32bit
    
    Change-Id: I19b68556b0ed57cbcb59338f1d0b4174878fd993

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index a6c9e02..8dc4c90 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -338,7 +338,7 @@ private:
     void    convertOneTypeOp( void);
     void    convertOneTypeEsc( void);
     void    callType2Subr( bool bGlobal, int nSubrNumber);
-    long    getReadOfs( void) const { return (long)(mpReadPtr - mpBasePtr);}
+    sal_Int32 getReadOfs( void) const { return (sal_Int32)(mpReadPtr - mpBasePtr);}
 
     const U8* mpBasePtr;
     const U8* mpBaseEnd;
@@ -350,7 +350,7 @@ private:
     bool    mbSawError;
     bool    mbNeedClose;
     bool    mbIgnoreHints;
-    long    mnCntrMask;
+    sal_Int32 mnCntrMask;
 
 private:
     int     seekIndexData( int nIndexBase, int nDataIndex);
@@ -824,7 +824,7 @@ void CffSubsetterContext::convertOneTypeOp( void)
         mpReadPtr += (mnHintSize + 15) / 16;
 #else
         {
-        long nHintMask = 0;
+        sal_Int32 nHintMask = 0;
         int nCntrBits[2] = {0,0};
         U8 nMaskBit = 0;
         U8 nMaskByte = 0;
@@ -1471,7 +1471,7 @@ void CffSubsetterContext::initialCffRead( void)
     seekIndexEnd( mnNameIdxBase);
 
     // get the TopDict index
-    const long nTopDictBase = getReadOfs();
+    const sal_Int32 nTopDictBase = getReadOfs();
     const int nTopDictCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
     if( nTopDictCount) {
         for( int i = 0; i < nTopDictCount; ++i) {
@@ -2166,10 +2166,10 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
         fXFactor = 1000.0F * maFontMatrix[0];
         fYFactor = 1000.0F * maFontMatrix[3];
     }
-    rFSInfo.m_aFontBBox = Rectangle( Point( static_cast<long>(maFontBBox[0] * fXFactor),
-                                        static_cast<long>(maFontBBox[1] * fYFactor) ),
-                                    Point( static_cast<long>(maFontBBox[2] * fXFactor),
-                                        static_cast<long>(maFontBBox[3] * fYFactor) ) );
+    rFSInfo.m_aFontBBox = Rectangle( Point( static_cast<sal_Int32>(maFontBBox[0] * fXFactor),
+                                        static_cast<sal_Int32>(maFontBBox[1] * fYFactor) ),
+                                    Point( static_cast<sal_Int32>(maFontBBox[2] * fXFactor),
+                                        static_cast<sal_Int32>(maFontBBox[3] * fYFactor) ) );
     // PDF-Spec says the values below mean the ink bounds!
     // TODO: use better approximations for these ink bounds
     rFSInfo.m_nAscent  = +rFSInfo.m_aFontBBox.Bottom(); // for capital letters
commit 54505496c24e6babe54570d42223e8da24f4ff3f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 21:05:41 2014 +0100

    coverity#1202751 max huffman code word len is 31
    
    Change-Id: I7ef74df22a65c1de396fc9211ac1adefc48fe849

diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx
index cc8f34c..1ae4248 100644
--- a/lotuswordpro/source/filter/explode.cxx
+++ b/lotuswordpro/source/filter/explode.cxx
@@ -167,7 +167,7 @@ Decompression::Decompression(SvStream * pInStream, SvStream * pOutStream)
  */
 sal_uInt32 Decompression::ReadBits(sal_uInt16 iCount, sal_uInt32 & nBits)
 {
-    if ( (iCount == 0) || (iCount > 32 ) )
+    if ( (iCount == 0) || (iCount > 31 ) )
     {
         return 1;
     }
commit d2ce9699781f0722eea6817a31192380b617c207
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 20:54:26 2014 +0100

    coverity#703938 Unchecked return value
    
    Change-Id: I7bbd7b536227902b3692137340a21eb755aa5ed8

diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 4ce6a8b..8f38214 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -195,15 +195,16 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
         try
         {
             DropDescriptor aTrans;
+            bool bOk;
             if ( _nFormatId != SOT_FORMAT_RTF )
-                const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,aTrans.aHtmlRtfStorage);
+                bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,aTrans.aHtmlRtfStorage);
             else
-                const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMAT_RTF,aTrans.aHtmlRtfStorage);
+                bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMAT_RTF,aTrans.aHtmlRtfStorage);
 
             aTrans.nType            = E_TABLE;
             aTrans.bHtml            = SOT_FORMATSTR_ID_HTML == _nFormatId;
             aTrans.sDefaultTableName = GetTableNameForAppend();
-            if ( !copyTagTable(aTrans,false,_xConnection) )
+            if ( !bOk || !copyTagTable(aTrans,false,_xConnection) )
                 m_pController->showError(SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, OUString("S1000"), 0, Any()));
         }
         catch(const SQLException&)
commit 31035f0ebcb9f89a60ed8644b8b40ca33f242120
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 20:52:43 2014 +0100

    coverity#703939 Unchecked return value
    
    Change-Id: Ic19f4c41d3e0e32ae1ebffb690b821260d7e00d0

diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index c04c4fe..4ce6a8b 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -270,15 +270,16 @@ bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData
     bool bHtml = _aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML);
     if ( bHtml || _aDroppedData.HasFormat(SOT_FORMAT_RTF) )
     {
+        bool bOk;
         if ( bHtml )
-            const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,_rAsyncDrop.aHtmlRtfStorage);
+            bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,_rAsyncDrop.aHtmlRtfStorage);
         else
-            const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMAT_RTF,_rAsyncDrop.aHtmlRtfStorage);
+            bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMAT_RTF,_rAsyncDrop.aHtmlRtfStorage);
 
         _rAsyncDrop.bHtml           = bHtml;
         _rAsyncDrop.bError          = !copyTagTable(_rAsyncDrop,true,_xConnection);
 
-        bRet = ( !_rAsyncDrop.bError && _rAsyncDrop.aHtmlRtfStorage.Is() );
+        bRet = ( !_rAsyncDrop.bError && bOk && _rAsyncDrop.aHtmlRtfStorage.Is() );
         if ( bRet )
         {
             // now we need to copy the stream
commit 3df9783efa839f8c025891edb5cf9e9f12620d3f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 20:51:08 2014 +0100

    coverity#703941 Unchecked return value
    
    Change-Id: Ifdc48318a21a1334da00b11fae62c9d25585793c

diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 0295bc9..310e2b5 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -798,8 +798,8 @@ void OTableEditorCtrl::InsertRows( long nRow )
     if(aTransferData.HasFormat(SOT_FORMATSTR_ID_SBA_TABED))
     {
         SotStorageStreamRef aStreamRef;
-        aTransferData.GetSotStorageStream(SOT_FORMATSTR_ID_SBA_TABED,aStreamRef);
-        if(aStreamRef.Is())
+        bool bOk = aTransferData.GetSotStorageStream(SOT_FORMATSTR_ID_SBA_TABED,aStreamRef);
+        if (bOk && aStreamRef.Is())
         {
             aStreamRef->Seek(STREAM_SEEK_TO_BEGIN);
             aStreamRef->ResetError();
commit 7ce02fbe19c2e5ff5288a68c6e7f6945170d33c8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Apr 20 20:48:55 2014 +0100

    coverity#1202759 Unchecked return value
    
    Change-Id: I5042340f7b320f5a07e9cad4a5cc8aa90646d688

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 8f4927d..4ebfff7 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6211,8 +6211,9 @@ bool SwMSDffManager::GetOLEStorageName(long nOLEId, OUString& rStorageName,
                 wwSprmParser aSprmParser(rReader.pWwFib->GetFIBVersion());
                 while (nStartCp <= nEndCp && !nPictureId)
                 {
+                    if (!pChp->SeekPos( nStartCp))
+                        break;
                     WW8PLCFxDesc aDesc;
-                    pChp->SeekPos( nStartCp );
                     pChp->GetSprms( &aDesc );
 
                     if (aDesc.nSprmsLen && aDesc.pMemPos) // Attributes present


More information about the Libreoffice-commits mailing list