[Libreoffice-commits] core.git: 41 commits - basegfx/source chart2/source cppcanvas/source cui/source dbaccess/source editeng/source hwpfilter/source i18npool/source include/editeng package/source pyuno/source sal/osl sc/qa sc/source svtools/source svx/source sw/source vcl/source writerfilter/source

Caolán McNamara caolanm at redhat.com
Thu Aug 7 10:01:23 PDT 2014


 basegfx/source/polygon/b3dpolypolygontools.cxx  |   20 +++---
 chart2/source/view/charttypes/GL3DBarChart.cxx  |   13 ++-
 cppcanvas/source/mtfrenderer/textaction.cxx     |   22 +++---
 cui/source/dialogs/hangulhanjadlg.cxx           |    1 
 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx  |   45 -------------
 dbaccess/source/ui/dlg/ConnectionPageSetup.hxx  |    1 
 dbaccess/source/ui/dlg/detailpages.cxx          |    1 
 editeng/source/editeng/eerdll.cxx               |   10 ++-
 hwpfilter/source/hbox.cxx                       |    8 +-
 hwpfilter/source/hwpeq.cxx                      |   10 +--
 i18npool/source/localedata/LocaleNode.cxx       |   80 +++++++++---------------
 i18npool/source/localedata/LocaleNode.hxx       |   11 ---
 include/editeng/eerdll.hxx                      |    3 
 package/source/zippackage/zipfileaccess.cxx     |   10 +--
 pyuno/source/module/pyuno_runtime.cxx           |    2 
 sal/osl/unx/socket.c                            |    7 --
 sc/qa/unit/ucalc_sharedformula.cxx              |    7 +-
 sc/source/ui/condformat/condformatdlg.cxx       |    1 
 sc/source/ui/dbgui/filtdlg.cxx                  |   13 ++-
 sc/source/ui/vba/vbachartobjects.cxx            |   31 ++++++++-
 svtools/source/control/valueset.cxx             |    2 
 svx/source/dialog/dialmgr.cxx                   |    6 -
 svx/source/form/fmvwimp.cxx                     |    2 
 sw/source/core/access/acctextframe.cxx          |   15 ++--
 sw/source/core/doc/SwStyleNameMapper.cxx        |    3 
 sw/source/core/docnode/node.cxx                 |    2 
 sw/source/core/layout/fly.cxx                   |   26 ++++---
 sw/source/core/layout/flyincnt.cxx              |    9 +-
 sw/source/core/layout/tabfrm.cxx                |    8 +-
 sw/source/filter/html/wrthtml.cxx               |   58 ++++++++++++-----
 sw/source/filter/ww8/ww8par2.cxx                |    2 
 sw/source/uibase/utlui/glbltree.cxx             |    5 +
 vcl/source/filter/sgvmain.cxx                   |    1 
 vcl/source/filter/sgvmain.hxx                   |   39 +++++++++++
 writerfilter/source/dmapper/StyleSheetTable.cxx |    4 -
 35 files changed, 266 insertions(+), 212 deletions(-)

New commits:
commit 444600442beb69365d47de188a30a3565c45eafc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 17:54:14 2014 +0100

    coverity#706946 Uncaught exception
    
    Change-Id: I836e353ae3a8274842465719b3d8ae82ad433375

diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index cdb300e..1b6928a 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -43,9 +43,34 @@ public:
     ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {}
     virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE
     {
-        uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
-        // parent Object is sheet
-        return uno::makeAny(  uno::Reference< excel::XChartObject > ( new ScVbaChartObject(  m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) );
+        uno::Any ret;
+
+        try
+        {
+            uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+            // parent Object is sheet
+            ret = uno::makeAny(  uno::Reference< excel::XChartObject > ( new ScVbaChartObject(  m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) );
+        }
+        catch (const lang::WrappedTargetException&)
+        {
+            throw;
+        }
+        catch (const container::NoSuchElementException&)
+        {
+            throw;
+        }
+        catch (const uno::RuntimeException&)
+        {
+            throw;
+        }
+        catch (const uno::Exception& e)
+        {
+            throw lang::WrappedTargetException(
+                    "Error creating ScVbaChartObject!",
+                    static_cast < OWeakObject * > ( this ),
+                    makeAny( e ) );
+        }
+        return ret;
     }
 };
 
commit e88157144d59f277190f40492790a3375acc3bbb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 17:15:22 2014 +0100

    coverity#706587 Uncaught exception
    
    Change-Id: I33836bfc2d0e18a12774a9e65d814f50ae10d7b8

diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 7ee2298..c070d83 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -350,7 +350,7 @@ sal_Bool SAL_CALL OZipFileAccess::hasElements()
         throw lang::DisposedException(THROW_WHERE );
 
     if ( !m_pZipFile )
-        throw io::NotConnectedException(THROW_WHERE );
+        throw uno::RuntimeException(THROW_WHERE);
 
     return ( m_pZipFile->GetEntryHash().size() != 0 );
 }
commit 80231ff414371a0cd052639efc1329c396eb4f7f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 17:11:10 2014 +0100

    coverity#706588 Uncaught exception
    
    Change-Id: Ia1672fe61f9bf158a300d5855e46de2747754ca2

diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index b64f840..7ee2298 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -336,7 +336,7 @@ uno::Type SAL_CALL OZipFileAccess::getElementType()
         throw lang::DisposedException(THROW_WHERE );
 
     if ( !m_pZipFile )
-        throw io::NotConnectedException(THROW_WHERE );
+        throw uno::RuntimeException(THROW_WHERE);
 
     return cppu::UnoType<io::XInputStream>::get();
 }
commit 3a1c2d9b4194ffde30bce6ff4381faac8caf1120
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 17:09:58 2014 +0100

    coverity#706589 Uncaught exception
    
    Change-Id: I60820ab1ea8b13ed6d16e714cd22abce3c2588e5

diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index e806cdb..b64f840 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -286,7 +286,7 @@ uno::Sequence< OUString > SAL_CALL OZipFileAccess::getElementNames()
         throw lang::DisposedException(THROW_WHERE );
 
     if ( !m_pZipFile )
-        throw io::NotConnectedException(THROW_WHERE );
+        throw uno::RuntimeException(THROW_WHERE);
 
     uno::Sequence< OUString > aNames( m_pZipFile->GetEntryHash().size() );
     sal_Int32 nLen = 0;
commit 58edf5120d227575f313d4ca52cee19f2d4dcff7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 17:08:19 2014 +0100

    coverity#706593 Uncaught exception
    
    Change-Id: I9cb2057a866d11dec97e5bfd03d0663d09f079f7

diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 619446f..e806cdb 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -238,7 +238,7 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName )
         throw lang::DisposedException(THROW_WHERE );
 
     if ( !m_pZipFile )
-        throw io::NotConnectedException(THROW_WHERE );
+        throw uno::RuntimeException(THROW_WHERE);
 
     EntryHash::iterator aIter = m_pZipFile->GetEntryHash().find( aName );
     if ( aIter == m_pZipFile->GetEntryHash().end() )
commit a92bd2988ecda92ceed1d55dba083a68cc0f86b0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 17:07:39 2014 +0100

    coverity#706596 Uncaught exception
    
    Change-Id: I1fb6ccbe12e3ec760a5474826170bcbf6b5146f9

diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 688f389..619446f 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -320,7 +320,7 @@ sal_Bool SAL_CALL OZipFileAccess::hasByName( const OUString& aName )
         throw lang::DisposedException(THROW_WHERE );
 
     if ( !m_pZipFile )
-        throw io::NotConnectedException(THROW_WHERE );
+        throw uno::RuntimeException(THROW_WHERE);
 
     EntryHash::iterator aIter = m_pZipFile->GetEntryHash().find( aName );
 
commit 45c2c0272052f7f23aed0bef11a6289545a49749
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:56:35 2014 +0100

    coverity#983561 Arguments in wrong order
    
    and
    
    coverity#983562 Arguments in wrong order
    
    Change-Id: Ia9e95c8c5dbbf0a12ac06162e4fc3ff5e568f035

diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index ab41ff4..e77cb91 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -220,12 +220,12 @@ namespace basegfx
             return aRetval;
         }
 
-        // helper for getting the 3D Point from given cartesian coordiantes. fVer is defined from
-        // [F_PI2 .. -F_PI2], fHor from [0.0 .. F_2PI]
-        inline B3DPoint getPointFromCartesian(double fVer, double fHor)
+        // helper for getting the 3D Point from given cartesian coordiantes. fHor is defined from
+        // [F_PI2 .. -F_PI2], fVer from [0.0 .. F_2PI]
+        inline B3DPoint getPointFromCartesian(double fHor, double fVer)
         {
-            const double fCosHor(cos(fHor));
-            return B3DPoint(fCosHor * cos(fVer), sin(fHor), fCosHor * -sin(fVer));
+            const double fCosVer(cos(fVer));
+            return B3DPoint(fCosVer * cos(fHor), sin(fVer), fCosVer * -sin(fHor));
         }
 
         B3DPolyPolygon createUnitSpherePolyPolygon(
commit 092e10a58283a5aef7f4118db54c1f6ac8637a0b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:51:16 2014 +0100

    coverity#983562 Arguments in wrong order
    
    attempt to silence this warning
    
    Change-Id: Icd8fa41a63bd3fe70b956f7af1818325b471e0f6

diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index f61a09c..ab41ff4 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -354,20 +354,20 @@ namespace basegfx
             // vertical loop
             for(sal_uInt32 a(0L); a < nVerSeg; a++)
             {
-                const double fVer(fVerStart + (((fVerStop - fVerStart) * a) / nVerSeg));
+                const double fVer1(fVerStart + (((fVerStop - fVerStart) * a) / nVerSeg));
                 const double fVer2(fVerStart + (((fVerStop - fVerStart) * (a + 1)) / nVerSeg));
 
                 // horizontal loop
                 for(sal_uInt32 b(0L); b < nHorSeg; b++)
                 {
-                    const double fHor(fHorStart + (((fHorStop - fHorStart) * b) / nHorSeg));
+                    const double fHor1(fHorStart + (((fHorStop - fHorStart) * b) / nHorSeg));
                     const double fHor2(fHorStart + (((fHorStop - fHorStart) * (b + 1)) / nHorSeg));
                     B3DPolygon aNew;
 
-                    aNew.append(getPointFromCartesian(fHor, fVer));
-                    aNew.append(getPointFromCartesian(fHor2, fVer));
+                    aNew.append(getPointFromCartesian(fHor1, fVer1));
+                    aNew.append(getPointFromCartesian(fHor2, fVer1));
                     aNew.append(getPointFromCartesian(fHor2, fVer2));
-                    aNew.append(getPointFromCartesian(fHor, fVer2));
+                    aNew.append(getPointFromCartesian(fHor1, fVer2));
 
                     if(bNormals)
                     {
commit 539a0d00f9463412ab714ecc606118b6f4b08580
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:20:44 2014 +0100

    coverity#704901 Dereference after null check
    
    Change-Id: I1545151a71b44d85bbf1e990837154e4e1b6f3c4

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 2e4fd01..bcf9209 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -985,7 +985,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
         case RES_URL:
             // The interface changes the frame size when interacting with text frames,
             // the Map, however, needs to be relative to FrmSize().
-            if ( (!Lower() || !Lower()->IsNoTxtFrm()) &&
+            if ( (!Lower() || !Lower()->IsNoTxtFrm()) && pNew && pOld &&
                  ((SwFmtURL*)pNew)->GetMap() && ((SwFmtURL*)pOld)->GetMap() )
             {
                 const SwFmtFrmSize &rSz = GetFmt()->GetFrmSize();
@@ -1006,6 +1006,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
             break;
 
         case RES_CHAIN:
+            if (pNew)
             {
                 SwFmtChain *pChain = (SwFmtChain*)pNew;
                 if ( pChain->GetNext() )
commit 39790317a9edb85cf25244dc112c4a2ffe473b26
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:18:33 2014 +0100

    coverity#704902 Dereference after null check
    
    Change-Id: Ib0c590f452b0fd2df042a200015c935b46070fde

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 6aa2579..2e4fd01 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -919,17 +919,20 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
                 getRootFrm()->InvalidateBrowseWidth();
             SwRect aNew( GetObjRectWithSpaces() );
             SwRect aOld( maFrm );
-            if ( RES_UL_SPACE == nWhich )
-            {
-                const SvxULSpaceItem &rUL = *(SvxULSpaceItem*)pNew;
-                aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
-                aOld.SSize().Height()+= rUL.GetLower();
-            }
-            else
+            if (pNew)
             {
-                const SvxLRSpaceItem &rLR = *(SvxLRSpaceItem*)pNew;
-                aOld.Left  ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
-                aOld.SSize().Width() += rLR.GetRight();
+                if ( RES_UL_SPACE == nWhich )
+                {
+                    const SvxULSpaceItem &rUL = *(SvxULSpaceItem*)pNew;
+                    aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
+                    aOld.SSize().Height()+= rUL.GetLower();
+                }
+                else
+                {
+                    const SvxLRSpaceItem &rLR = *(SvxLRSpaceItem*)pNew;
+                    aOld.Left  ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
+                    aOld.SSize().Width() += rLR.GetRight();
+                }
             }
             aNew.Union( aOld );
             NotifyBackground( FindPageFrm(), aNew, PREP_CLEAR );
commit 349b218add66fd8d694c2dd95047a7d9caef4f0d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:16:35 2014 +0100

    coverity#704904 Dereference after null check
    
    Change-Id: I5ef95b90f7eeb4777f9a847c42a09f2fab5f1e0c

diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 3f0bc43..14e0ad9 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -84,12 +84,13 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
 {
     bool bCallPrepare = false;
     sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
-    if( RES_ATTRSET_CHG == nWhich )
+    if (RES_ATTRSET_CHG == nWhich && pNew)
     {
-        if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
-            GetItemState( RES_SURROUND, false ) ||
+        if(pOld &&
+            (SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
+            GetItemState(RES_SURROUND, false) ||
             SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
-            GetItemState( RES_FRMMACRO, false ) )
+            GetItemState(RES_FRMMACRO, false)) )
         {
             SwAttrSetChg aOld( *(SwAttrSetChg*)pOld );
             SwAttrSetChg aNew( *(SwAttrSetChg*)pNew );
commit 41a5730b07d0b1749fa9a1b7f9ceea64b3b2cacf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:11:53 2014 +0100

    coverity#704921 Dereference after null check
    
    Change-Id: Ie2e8726cec7d21b5cc15fccb9a8b2a034ac938cc

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index bf81545..14ab1da 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4920,16 +4920,16 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
         }
     }
 
-    if ( ( bAttrSetChg &&
+    if ( ( bAttrSetChg && pNew &&
            SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) ||
-         RES_PROTECT == pNew->Which() )
+         ( pNew && RES_PROTECT == pNew->Which()) )
     {
         SwViewShell *pSh = getRootFrm()->GetCurrShell();
         if( pSh && pSh->GetLayout()->IsAnyShellAccessible() )
             pSh->Imp()->InvalidateAccessibleEditableState( true, this );
     }
 
-    if ( bAttrSetChg &&
+    if ( bAttrSetChg && pNew &&
          SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, false, &pItem ) )
     {
         SetDerivedVert( false );
@@ -4937,7 +4937,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
     }
 
     // #i29550#
-    if ( bAttrSetChg &&
+    if ( bAttrSetChg && pNew &&
          SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) )
     {
         SwFrm* pTmpUpper = GetUpper();
commit 88de419ea62736cae6724f909bfdb8bd68f5fed5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:10:04 2014 +0100

    coverity#704947 Dereference after null check
    
    Change-Id: I3e2e3d78e84515cc6e1caa6e105762726d2b9e56

diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index e7c8c6b..c514f54 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -956,7 +956,7 @@ void SwCntntNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewV
     case RES_FMT_CHG:
         // If the Format parent was switched, register the Attrset at the new one
         // Skip own Modify!
-        if( GetpSwAttrSet() &&
+        if( GetpSwAttrSet() && pNewValue &&
             ((SwFmtChg*)pNewValue)->pChangedFmt == GetRegisteredIn() )
         {
             // Attach Set to the new parent
commit 8acf970d8a55271cd1565ee7b33ab26c88b70280
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:08:27 2014 +0100

    coverity#705003 Dereference after null check
    
    Change-Id: I3841f9d067d006810d99d04cd874bbb26a0812bb

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 3b67391..e61f569 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3192,7 +3192,7 @@ void WW8TabDesc::TableCellEnd()
     SetPamInCell(nAktCol, true);
 
     // finish Annotated Level Numbering ?
-    if (pIo->bAnl && !pIo->bAktAND_fNumberAcross)
+    if (pIo->bAnl && !pIo->bAktAND_fNumberAcross && pActBand)
         pIo->StopAllAnl(IsValidCell(nAktCol));
 }
 
commit 4e77d6251ebf12f2f9a24d64c0285cb3fc6aad42
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 16:06:17 2014 +0100

    coverity#705041 Dereference after null check
    
    Change-Id: I71b9fa34ee6d885381eede39d8b753f228f1196c

diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 34fdd1c..276a930 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -826,7 +826,10 @@ void    SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
         case CTX_EDIT:
         {
             OSL_ENSURE(pCont, "edit without entry ? " );
-            EditContent(pCont);
+            if (pCont)
+            {
+                EditContent(pCont);
+            }
         }
         break;
         case CTX_EDIT_LINK:
commit f97eb186bf44d01073c010d6875b0bc4c889b17e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:51:38 2014 +0100

    coverity#735805 Explicit null dereferenced
    
    Change-Id: I6641930b42f233096f4a0067ab320383ff07a72a

diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index ca0fdee..f0860c2 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -267,14 +267,19 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
                 if (aQueryStr.isEmpty())
                 {
                     if (rItem.meType == ScQueryEntry::ByValue)
-                        pDoc->GetFormatTable()->GetInputLineString( rItem.mfVal, 0, aValStr);
+                    {
+                        if (pDoc)
+                        {
+                            pDoc->GetFormatTable()->GetInputLineString(rItem.mfVal, 0, aValStr);
+                        }
+                    }
                     else if (rItem.meType == ScQueryEntry::ByDate)
                     {
-                        if(pDoc)
+                        if (pDoc)
                         {
                             SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
-                            pFormatter->GetInputLineString( rItem.mfVal,
-                                                            pFormatter->GetStandardFormat( NUMBERFORMAT_DATE), aValStr);
+                            pFormatter->GetInputLineString(rItem.mfVal,
+                                                           pFormatter->GetStandardFormat( NUMBERFORMAT_DATE), aValStr);
                         }
                     }
                     else
commit 4d22bebe5464ce6fb905bcaaf13db3b6587d24d2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:49:48 2014 +0100

    coverity#735867 Dereference after null check
    
    Change-Id: I6dce94b0f6ad68e9e748b258cd511119201245b9

diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index d6b4905..9dddc67 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -965,7 +965,7 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/)
 
         // ensure that the control is visible
         // 80210 - 12/07/00 - FS
-        const Window* pCurrentWindow = dynamic_cast< const Window* >( m_pView->GetActualOutDev() );
+        const Window* pCurrentWindow = m_pView ? dynamic_cast<const Window*>(m_pView->GetActualOutDev()) : NULL;
         if ( pCurrentWindow )
         {
             awt::Rectangle aRect = xControlWindow->getPosSize();
commit 65ed07a8638f2e9fcb866932a051150455b4766a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:47:48 2014 +0100

    coverity#1078601 Dereference after null check
    
    Change-Id: Ie708384cbf0a2b0faa82d0653ceb87816bcdcbfd

diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index 5aa437c..2c0c1b1 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -83,11 +83,14 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
         // #i73249#
         case RES_TITLE_CHANGED:
         {
-            const OUString& sOldTitle(
-                        dynamic_cast<const SwStringMsgPoolItem&>(*pOld).GetString() );
-            const OUString& sNewTitle(
-                        dynamic_cast<const SwStringMsgPoolItem&>(*pNew).GetString() );
-            if ( sOldTitle == sNewTitle )
+            OUString sOldTitle, sNewTitle;
+            const SwStringMsgPoolItem *pOldItem = dynamic_cast<const SwStringMsgPoolItem*>(pOld);
+            if (pOldItem)
+                sOldTitle = pOldItem->GetString();
+            const SwStringMsgPoolItem *pNewItem = dynamic_cast<const SwStringMsgPoolItem*>(pNew);
+            if (pNewItem)
+                sNewTitle = pNewItem->GetString();
+            if (sOldTitle == sNewTitle)
             {
                 break;
             }
@@ -100,7 +103,7 @@ void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
 
             const SwFlyFrmFmt* pFlyFrmFmt =
                             dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
-            if ( !pFlyFrmFmt->GetObjDescription().isEmpty() )
+            if (!pFlyFrmFmt || !pFlyFrmFmt->GetObjDescription().isEmpty())
             {
                 break;
             }
commit 013b19212b5bc37c85b1f1a72b0b71f75854b997
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:43:33 2014 +0100

    coverity#1130195 Unchecked dynamic_cast
    
    Change-Id: I10159fb938da56381989a97db7e518914db40f7e

diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 96e5686..50e9b7e 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -572,8 +572,8 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
                 TblStylePrHandlerPtr pTblStylePrHandler(new TblStylePrHandler(m_pImpl->m_rDMapper));
                 pProperties->resolve(*pTblStylePrHandler);
                 StyleSheetEntry* pEntry = m_pImpl->m_pCurrentEntry.get();
-                TableStyleSheetEntry* pTableEntry = dynamic_cast<TableStyleSheetEntry*>(pEntry);
-                pTableEntry->AppendInteropGrabBag(pTblStylePrHandler->getInteropGrabBag("tcPr"));
+                TableStyleSheetEntry& rTableEntry = dynamic_cast<TableStyleSheetEntry&>(*pEntry);
+                rTableEntry.AppendInteropGrabBag(pTblStylePrHandler->getInteropGrabBag("tcPr"));
             }
         }
         break;
commit dbe74ab1b38bbd97c8c5304957f8327f064fc21b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:42:14 2014 +0100

    coverity#1209529 Dereference after null check
    
    Change-Id: I58fbc34996157e7118983a245d31f471b603361f

diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index deabe3c..b4a4af1 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -474,7 +474,8 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
     }
 
     // Proceed if we have a pointer to a hash, and the hash hasn't already been populated
-    if ( pHashPointer && !*pHashPointer )
+    assert(pHashPointer && "null hash pointer");
+    if (!*pHashPointer )
     {
         // Compute the size of the hash we need to build
         sal_uInt16 nSize = std::accumulate( vIndexes.begin(), vIndexes.end(), 0, lcl_AccumulateIndexCount );
commit 086611d2ce95f67a55efbd169ee4636dd60f68c5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:38:00 2014 +0100

    coverity#1202783 Division or modulo by zero
    
    Change-Id: I17892b9daa3be450001ac88239008d0d27f4a01f

diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index d1a0409..ebad0fe 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1819,7 +1819,7 @@ void ValueSet::SelectItem( sal_uInt16 nItemId )
         bool bNewLine = false;
 
         // if necessary scroll to the visible area
-        if ( mbScroll && nItemId )
+        if (mbScroll && nItemId && mnCols)
         {
             sal_uInt16 nNewLine = (sal_uInt16)(nItemPos / mnCols);
             if ( nNewLine < mnFirstLine )
commit 9823f73137bdbd7e890aff61e4bc34df384029e8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:31:24 2014 +0100

    coverity#1130480 Uninitialized pointer field
    
    Change-Id: I318b8b5d219240ad0620fd020b74dfcd8c91bdec

diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 6e05841..2a5f8e5 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -88,12 +88,51 @@ static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] =
     "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
 
 SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL )
-    : bCfgOutStyles( false )
+    : pHTMLPosFlyFrms(NULL)
+    , pNumRuleInfo(new SwHTMLNumRuleInfo)
+    , pNextNumRuleInfo(NULL)
+    , nHTMLMode(0)
+    , eCSS1Unit(FUNIT_NONE)
+    , pFootEndNotes(NULL)
+    , pxFormComps(NULL)
+    , pTemplate(NULL)
+    , pDfltColor(NULL)
+    , pStartNdIdx(NULL)
+    , pCurrPageDesc(NULL)
+    , pFmtFtn(NULL)
+    , nWarn(0)
+    , nLastLFPos(0)
+    , nLastParaToken(0)
+    , nBkmkTabPos(-1)
+    , nImgMapCnt(1)
+    , nFormCntrlCnt(0)
+    , nEndNote(0)
+    , nFootNote(0)
+    , nLeftMargin(0)
+    , nDfltLeftMargin(0)
+    , nDfltRightMargin(0)
+    , nFirstLineIndent(0)
+    , nDfltFirstLineIndent(0)
+    , nDfltTopMargin(0)
+    , nDfltBottomMargin(0)
+    , nIndentLvl(0)
+    , nWhishLineLen(0)
+    , nDefListLvl(0)
+    , nDefListMargin(0)
+    , nHeaderFooterSpace(0)
+    , nTxtAttrsToIgnore(0)
+    , nExportMode(0)
+    , nCSS1OutMode(0)
+    , nCSS1Script(CSS1_OUTMODE_WESTERN)
+    , nDirection(FRMDIR_HORI_LEFT_TOP)
+    , eDestEnc(RTL_TEXTENCODING_MS_1252)
+    , eLang(LANGUAGE_DONTKNOW)
+    , bCfgOutStyles( false )
     , bCfgPreferStyles( false )
     , bCfgFormFeed( false )
     , bCfgStarBasic( false )
     , bCfgCpyLinkedGrfs( false )
-    , bFirstLine( false )
+    , bFirstLine(true)
     , bTagOn( false )
     , bTxtAttr( false )
     , bOutOpts( false )
@@ -112,21 +151,8 @@ SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL )
     , bPreserveForm( false )
     , bCfgNetscape4( false )
     , mbSkipImages(false)
-
 {
-    SetBaseURL( rBaseURL );
-    bFirstLine = true;
-    nBkmkTabPos = -1;
-    pDfltColor = 0;
-    nImgMapCnt = 1;
-    pStartNdIdx = 0;
-    pTemplate = 0;
-    pNumRuleInfo = new SwHTMLNumRuleInfo;
-    pNextNumRuleInfo = 0;
-    pFootEndNotes = 0;
-    pFmtFtn = 0;
-    eDestEnc = RTL_TEXTENCODING_MS_1252;
-    nDirection = FRMDIR_HORI_LEFT_TOP;
+    SetBaseURL(rBaseURL);
 }
 
 SwHTMLWriter::~SwHTMLWriter()
commit 70e9f271258455c114cd711036d06a13f1c1d818
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:12:49 2014 +0100

    coverity#1228875 Uninitialized scalar field
    
    Change-Id: Iadd56e64f2ec2ef032147e4eec3bd2f0e3cd12cb

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 95a2e76..3a39896 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -177,11 +177,13 @@ void RenderAnimationThread::execute()
 class RenderBenchMarkThread : public RenderThread
 {
 public:
-    RenderBenchMarkThread(GL3DBarChart * pChart):
-    RenderThread(pChart),
-    mbExecuting(false),
-    mbNeedFlyBack(false),
-    miFrameCount(0)
+    RenderBenchMarkThread(GL3DBarChart * pChart)
+        : RenderThread(pChart)
+        , mbExecuting(false)
+        , mbNeedFlyBack(false)
+        , mnStep(0)
+        , mnStepsTotal(0)
+        , miFrameCount(0)
     {
         osl_getSystemTime(&mafpsRenderStartTime);
         osl_getSystemTime(&mafpsRenderEndTime);
commit b09911d509e242106a7364f9d13476dba63db910
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:09:49 2014 +0100

    coverity#1219805 Uninitialized scalar field
    
    Change-Id: Iff8cbfce480d63986b680b66c2837851e6e24555

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 2baecf7..95a2e76 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -432,6 +432,7 @@ GL3DBarChart::GL3DBarChart(
     mbCameraInit(false),
     mbRenderDie(false),
     maRenderEvent(EVENT_NONE),
+    mSelectBarId(0),
     miScrollRate(0),
     mbScrollFlg(false)
 {
commit 945d6444ad06fc27de33c7e3093387a73d09d4f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 15:01:10 2014 +0100

    coverity#1158491 Uninitialized pointer field
    
    Change-Id: I618427793885f6dce918e432e5d532f30bed71ad

diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index f5cbf34..d9a08f8 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -39,6 +39,7 @@ ScCondFormatList::ScCondFormatList(Window* pParent, WinBits nStyle)
     , mbHasScrollBar(false)
     , mpScrollBar(new ScrollBar(this, WB_VERT ))
     , mpDoc(NULL)
+    , mpDialogParent(NULL)
 {
     mpScrollBar->SetScrollHdl( LINK( this, ScCondFormatList, ScrollHdl ) );
     mpScrollBar->EnableDrag();
commit 37276d1636a7473290dda6dbfe64230ea037468b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 14:57:12 2014 +0100

    move null termination outside ifdefs for both branches
    
    so the strncpy branch is guaranteed null terminated too
    
    Change-Id: I79df96d69633a4db76f865301690c7ce7533fce9

diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 2bbe95a..d28413b 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1057,11 +1057,10 @@ oslSocketResult SAL_CALL osl_psz_getLocalHostname (
 
         strncpy(LocalHostname, uts.nodename, sizeof( LocalHostname ));
 #else  /* BSD compatible */
-
         if (gethostname(LocalHostname, sizeof(LocalHostname)-1) != 0)
             return osl_Socket_Error;
-        LocalHostname[sizeof(LocalHostname)-1] = 0;
 #endif /* SYSV */
+        LocalHostname[sizeof(LocalHostname)-1] = 0;
 
         /* check if we have an FQDN */
         if (strchr(LocalHostname, '.') == NULL)
@@ -1256,7 +1255,6 @@ oslSocketResult SAL_CALL osl_psz_getHostnameOfSocketAddr(oslSocketAddr pAddr,
     if (pHostAddr)
     {
         strncpy(pBuffer, pHostAddr->pHostName, BufferSize);
-
         pBuffer[BufferSize - 1] = '\0';
 
         osl_destroyHostAddr(pHostAddr);
commit eb8d96fe7f6379e72c1c5cf945511cc3e3b2f152
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 14:55:14 2014 +0100

    coverity#706155 Copy into fixed size buffer
    
    Change-Id: Ib795dc1b64d908942a836d09bfcde9f19d318b1b

diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 000e2e0..2bbe95a 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1073,7 +1073,8 @@ oslSocketResult SAL_CALL osl_psz_getLocalHostname (
 
             if ((pStr = osl_psz_getHostnameOfHostAddr(Addr)) != NULL)
             {
-                strcpy(LocalHostname, pStr);
+                strncpy(LocalHostname, pStr, sizeof( LocalHostname ));
+                LocalHostname[sizeof(LocalHostname)-1] = 0;
             }
             osl_destroyHostAddr(Addr);
         }
commit f488aed4a1e96514e12b963fc97e00f8a48d06f7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 14:40:31 2014 +0100

    coverity#706150 Copy into fixed size buffer
    
    Change-Id: Iee86d6233771a9e07a037257786e928c6f18addd

diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 7f60fa8..2c59ccc 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -302,24 +302,10 @@ void LocaleNode::incError( const OUString& rStr ) const
     incError( OSTR( rStr));
 }
 
-char* LocaleNode::prepareErrorFormat( const char* pFormat, const char* pDefaultConversion ) const
-{
-    static char buf[2048];
-    strcpy( buf, "Error: ");
-    strncat( buf, pFormat, 2000);
-    char* p = buf;
-    while (((p = strchr( p, '%')) != 0) && p[1] == '%')
-        p += 2;
-    if (!p)
-        strcat( buf, pDefaultConversion);
-    strcat( buf, "\n");
-    return buf;
-}
-
 void LocaleNode::incErrorInt( const char* pStr, int nVal ) const
 {
     ++nError;
-    fprintf( stderr, prepareErrorFormat( pStr, ": %d"), nVal);
+    fprintf( stderr, pStr, nVal);
 }
 
 void LocaleNode::incErrorStr( const char* pStr, const OUString& rVal ) const
@@ -718,7 +704,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
         aFormatIndex = currNodeAttr.getValueByName("formatindex");
         sal_Int16 formatindex = (sal_Int16)aFormatIndex.toInt32();
         if (!aFormatIndexSet.insert( formatindex).second)
-            incErrorInt( "Duplicated formatindex=\"%d\" in FormatElement.", formatindex);
+            incErrorInt( "Error: Duplicated formatindex=\"%d\" in FormatElement.", formatindex);
         of.writeIntParameter("Formatindex", formatCount, formatindex);
 
         // Ensure only one default per usage and type.
@@ -816,7 +802,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                     {
                         OUString aCode( n->getValue());
                         if (aCode.indexOf( "[CURRENCY]" ) >= 0)
-                            incErrorInt( "[CURRENCY] replaceTo not found for formatindex=\"%d\".", formatindex);
+                            incErrorInt( "Error: [CURRENCY] replaceTo not found for formatindex=\"%d\".", formatindex);
                     }
                     break;
             }
@@ -835,7 +821,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                     {
                         nDec = aCode.indexOf( pSep->getValue());
                         if (nDec < 0)
-                            incErrorInt( "DecimalSeparator not present in FormatCode formatindex=\"%d\".",
+                            incErrorInt( "Error: DecimalSeparator not present in FormatCode formatindex=\"%d\".",
                                     formatindex);
                     }
                     pSep = pCtype->findNode( "ThousandSeparator");
@@ -845,11 +831,11 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                     {
                         nGrp = aCode.indexOf( pSep->getValue());
                         if (nGrp < 0)
-                            incErrorInt( "ThousandSeparator not present in FormatCode formatindex=\"%d\".",
+                            incErrorInt( "Error: ThousandSeparator not present in FormatCode formatindex=\"%d\".",
                                     formatindex);
                     }
                     if (nDec >= 0 && nGrp >= 0 && nDec <= nGrp)
-                        incErrorInt( "Ordering of ThousandSeparator and DecimalSeparator not correct in formatindex=\"%d\".",
+                        incErrorInt( "Error: Ordering of ThousandSeparator and DecimalSeparator not correct in formatindex=\"%d\".",
                                 formatindex);
                 }
                 if (formatindex == cssi::NumberFormatIndex::TIME_MMSS00 ||
@@ -864,7 +850,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                     {
                         nTime = aCode.indexOf( pSep->getValue());
                         if (nTime < 0)
-                            incErrorInt( "TimeSeparator not present in FormatCode formatindex=\"%d\".",
+                            incErrorInt( "Error: TimeSeparator not present in FormatCode formatindex=\"%d\".",
                                     formatindex);
                     }
                     pSep = pCtype->findNode( "Time100SecSeparator");
@@ -874,17 +860,17 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                     {
                         n100s = aCode.indexOf( pSep->getValue());
                         if (n100s < 0)
-                            incErrorInt( "Time100SecSeparator not present in FormatCode formatindex=\"%d\".",
+                            incErrorInt( "Error: Time100SecSeparator not present in FormatCode formatindex=\"%d\".",
                                     formatindex);
                         OUStringBuffer a100s( pSep->getValue());
                         a100s.appendAscii( "00");
                         n100s = aCode.indexOf( a100s.makeStringAndClear());
                         if (n100s < 0)
-                            incErrorInt( "Time100SecSeparator+00 not present in FormatCode formatindex=\"%d\".",
+                            incErrorInt( "Error: Time100SecSeparator+00 not present in FormatCode formatindex=\"%d\".",
                                     formatindex);
                     }
                     if (n100s >= 0 && nTime >= 0 && n100s <= nTime)
-                        incErrorInt( "Ordering of Time100SecSeparator and TimeSeparator not correct in formatindex=\"%d\".",
+                        incErrorInt( "Error: Ordering of Time100SecSeparator and TimeSeparator not correct in formatindex=\"%d\".",
                                 formatindex);
                 }
                 if (nSavErr != nError)
@@ -930,16 +916,16 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                         // generated internally
                         break;
                     default:
-                        incErrorInt( "FormatElement formatindex=\"%d\" not present.", nNext);
+                        incErrorInt( "Error: FormatElement formatindex=\"%d\" not present.", nNext);
                 }
             }
             switch (nHere)
             {
                 case cssi::NumberFormatIndex::BOOLEAN :
-                    incErrorInt( "FormatElement formatindex=\"%d\" reserved for internal ``BOOLEAN''.", nNext);
+                    incErrorInt( "Error: FormatElement formatindex=\"%d\" reserved for internal ``BOOLEAN''.", nNext);
                     break;
                 case cssi::NumberFormatIndex::TEXT :
-                    incErrorInt( "FormatElement formatindex=\"%d\" reserved for internal ``@'' (TEXT).", nNext);
+                    incErrorInt( "Error: FormatElement formatindex=\"%d\" reserved for internal ``@'' (TEXT).", nNext);
                     break;
                 default:
                     ;   // nothing
@@ -1620,7 +1606,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
                 daysNode = calNode -> getChildAt(nChild);
             nbOfDays[i] = sal::static_int_cast<sal_Int16>( daysNode->getNumberOfChildren() );
             if (bGregorian && nbOfDays[i] != 7)
-                incErrorInt( "A Gregorian calendar must have 7 days per week, this one has %d", nbOfDays[i]);
+                incErrorInt( "Error: A Gregorian calendar must have 7 days per week, this one has %d", nbOfDays[i]);
             elementTag = "day";
             for (j = 0; j < nbOfDays[i]; j++) {
                 LocaleNode *currNode = daysNode -> getChildAt(j);
@@ -1653,7 +1639,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
                 monthsNode = calNode -> getChildAt(nChild);
             nbOfMonths[i] = sal::static_int_cast<sal_Int16>( monthsNode->getNumberOfChildren() );
             if (bGregorian && nbOfMonths[i] != 12)
-                incErrorInt( "A Gregorian calendar must have 12 months, this one has %d", nbOfMonths[i]);
+                incErrorInt( "Error: A Gregorian calendar must have 12 months, this one has %d", nbOfMonths[i]);
             elementTag = "month";
             for (j = 0; j < nbOfMonths[i]; j++) {
                 LocaleNode *currNode = monthsNode -> getChildAt(j);
@@ -1689,7 +1675,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
                 genitiveMonthsNode = calNode -> getChildAt(nChild);
             nbOfGenitiveMonths[i] = sal::static_int_cast<sal_Int16>( genitiveMonthsNode->getNumberOfChildren() );
             if (bGregorian && nbOfGenitiveMonths[i] != 12)
-                incErrorInt( "A Gregorian calendar must have 12 genitive months, this one has %d", nbOfGenitiveMonths[i]);
+                incErrorInt( "Error: A Gregorian calendar must have 12 genitive months, this one has %d", nbOfGenitiveMonths[i]);
             elementTag = "genitiveMonth";
             for (j = 0; j < nbOfGenitiveMonths[i]; j++) {
                 LocaleNode *currNode = genitiveMonthsNode -> getChildAt(j);
@@ -1726,7 +1712,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
                 partitiveMonthsNode = calNode -> getChildAt(nChild);
             nbOfPartitiveMonths[i] = sal::static_int_cast<sal_Int16>( partitiveMonthsNode->getNumberOfChildren() );
             if (bGregorian && nbOfPartitiveMonths[i] != 12)
-                incErrorInt( "A Gregorian calendar must have 12 partitive months, this one has %d", nbOfPartitiveMonths[i]);
+                incErrorInt( "Error: A Gregorian calendar must have 12 partitive months, this one has %d", nbOfPartitiveMonths[i]);
             elementTag = "partitiveMonth";
             for (j = 0; j < nbOfPartitiveMonths[i]; j++) {
                 LocaleNode *currNode = partitiveMonthsNode -> getChildAt(j);
@@ -1759,7 +1745,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
                 erasNode = calNode -> getChildAt(nChild);
             nbOfEras[i] = sal::static_int_cast<sal_Int16>( erasNode->getNumberOfChildren() );
             if (bGregorian && nbOfEras[i] != 2)
-                incErrorInt( "A Gregorian calendar must have 2 eras, this one has %d", nbOfEras[i]);
+                incErrorInt( "Error: A Gregorian calendar must have 2 eras, this one has %d", nbOfEras[i]);
             elementTag = "era";
             for (j = 0; j < nbOfEras[i]; j++) {
                 LocaleNode *currNode = erasNode -> getChildAt(j);
@@ -1795,7 +1781,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
         str = calNode ->getChildAt(nChild)-> getValue();
         sal_Int16 nDays = sal::static_int_cast<sal_Int16>( str.toInt32() );
         if (nDays < 1 || (0 < nbOfDays[i] && nbOfDays[i] < nDays))
-            incErrorInt( "Bad value of MinimalDaysInFirstWeek: %d, must be 1 <= value <= days_in_week",  nDays);
+            incErrorInt( "Error: Bad value of MinimalDaysInFirstWeek: %d, must be 1 <= value <= days_in_week",  nDays);
         of.writeIntParameter("minimalDaysInFirstWeek", i, nDays);
     }
     if (!bHasGregorian)
diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx
index 2c48206..2767b56 100644
--- a/i18npool/source/localedata/LocaleNode.hxx
+++ b/i18npool/source/localedata/LocaleNode.hxx
@@ -127,17 +127,12 @@ public:
     void incError( const char* pStr ) const;
     // ++nError with output to stderr
     void incError( const OUString& rStr ) const;
-    // ++nError with output to stderr, pStr should contain "%d", otherwise appended
+    // ++nError with output to stderr, pStr should contain "%d"
     void incErrorInt( const char* pStr, int nVal ) const;
-    // ++nError with output to stderr, pStr should contain "%s", otherwise appended
+    // ++nError with output to stderr, pStr should contain "%s"
     void incErrorStr( const char* pStr, const OUString& rVal ) const;
-    // ++nError with output to stderr, pStr should contain "%s %s", otherwise
-    // appended
+    // ++nError with output to stderr, pStr should contain "%s %s"
     void incErrorStrStr( const char* pStr, const OUString& rVal1, const OUString& rVal2 ) const;
-    // used by incError...(), returns a pointer to a static buffer,
-    // pDefaultConversion is appended if pFormat doesn't contain a %
-    // specification and should be something like ": %d" or ": %s" or similar.
-    char* prepareErrorFormat( const char* pFormat, const char* pDefaultConversion ) const;
     static LocaleNode* createNode (const OUString& name,const Reference< XAttributeList > & attr);
 };
 
commit df29ac9072eb4fdd0dae373ba6ceeead2e1cd394
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 14:37:39 2014 +0100

    drop prepareErrorFormat from LocaleNode::incErrorStr
    
    Change-Id: I3489f84ee66628d2ea9fcdaa1dd89dcd8523aa8a

diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index e1f25f5..7f60fa8 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -325,7 +325,7 @@ void LocaleNode::incErrorInt( const char* pStr, int nVal ) const
 void LocaleNode::incErrorStr( const char* pStr, const OUString& rVal ) const
 {
     ++nError;
-    fprintf( stderr, prepareErrorFormat( pStr, ": %s"), OSTR( rVal));
+    fprintf( stderr, pStr, OSTR( rVal));
 }
 
 void LocaleNode::incErrorStrStr( const char* pStr, const OUString& rVal1, const OUString& rVal2 ) const
@@ -347,7 +347,7 @@ void LCInfoNode::generateCode (const OFileWriter &of) const
     {
         aLanguage = languageNode->getChildAt(0)->getValue();
         if (!(aLanguage.getLength() == 2 || aLanguage.getLength() == 3))
-            incErrorStr( "langID not 2-3 characters", aLanguage);
+            incErrorStr( "Error: langID '%s' not 2-3 characters", aLanguage);
         of.writeParameter("langID", aLanguage);
         of.writeParameter("langDefaultName", languageNode->getChildAt(1)->getValue());
     }
@@ -357,7 +357,7 @@ void LCInfoNode::generateCode (const OFileWriter &of) const
     {
         OUString aCountry( countryNode->getChildAt(0)->getValue());
         if (!(aCountry.isEmpty() || aCountry.getLength() == 2))
-            incErrorStr( "countryID not empty or more than 2 characters", aCountry);
+            incErrorStr( "Error: countryID '%s' not empty or more than 2 characters", aCountry);
         of.writeParameter("countryID", aCountry);
         of.writeParameter("countryDefaultName", countryNode->getChildAt(1)->getValue());
     }
@@ -368,7 +368,7 @@ void LCInfoNode::generateCode (const OFileWriter &of) const
         // If given Variant must be at least ll-Ssss and language must be 'qlt'
         OUString aVariant( variantNode->getValue());
         if (!(aVariant.isEmpty() || (aVariant.getLength() >= 7 && aVariant.indexOf('-') >= 2)))
-            incErrorStr( "invalid Variant", aVariant);
+            incErrorStr( "Error: invalid Variant '%s'", aVariant);
         if (!(aVariant.isEmpty() || aLanguage == "qlt"))
             incErrorStrStr( "Error: Variant '%s' given but Language '%s' is not 'qlt'", aVariant, aLanguage);
         of.writeParameter("Variant", aVariant);
@@ -688,7 +688,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
         }
         if ( currNode->getName() != "FormatElement" )
         {
-            incErrorStr( "Undefined element in LC_FORMAT", currNode->getName());
+            incErrorStr( "Error: Undefined element '%s' in LC_FORMAT", currNode->getName());
             --formatCount;
             continue;   // for
         }
@@ -702,7 +702,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
 
         str = currNodeAttr.getValueByName("msgid");
         if (!aMsgIdSet.insert( str).second)
-            incErrorStr( "Duplicated msgid=\"%s\" in FormatElement.", str);
+            incErrorStr( "Error: Duplicated msgid=\"%s\" in FormatElement.", str);
         of.writeParameter("FormatKey", str, formatCount);
 
         str = currNodeAttr.getValueByName("default");
@@ -1194,7 +1194,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
         OUString aPattern( aPatternBuf.makeStringAndClear());
         if (((nDetected & 7) != 7) || aPattern.getLength() < 5)
         {
-            incErrorStr( "failed to extract full date acceptance pattern", aPattern);
+            incErrorStr( "Error: failed to extract full date acceptance pattern: %s", aPattern);
             fprintf( stderr, "       with DateSeparator '%s' from FormatCode '%s' (formatindex=\"%d\")\n",
                     OSTR( OUString( cDateSep)), OSTR( sTheDateEditFormat),
                     (int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY);
@@ -1213,7 +1213,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
             OUString aPattern2( aPatternBuf2.makeStringAndClear());
             if (aPattern2.getLength() < 5)
             {
-                incErrorStr( "failed to extract  2nd date acceptance pattern", aPattern2);
+                incErrorStr( "Error: failed to extract 2nd date acceptance pattern: %s", aPattern2);
                 fprintf( stderr, "       with DateSeparator '%s' from FormatCode '%s' (formatindex=\"%d\")\n",
                         OSTR( OUString( cDateSep2)), OSTR( sTheDateEditFormat),
                         (int)cssi::NumberFormatIndex::DATE_SYS_DDMMYYYY);
@@ -1258,7 +1258,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
             {
                 if (aIt != aComp && *aIt == *aComp)
                 {
-                    incErrorStr( "Duplicated DateAcceptancePattern", *aComp);
+                    incErrorStr( "Error: Duplicated DateAcceptancePattern: %s", *aComp);
                     aComp = theDateAcceptancePatterns.erase( aComp);
                 }
                 else
@@ -1787,7 +1787,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const
                     break;  // for
             }
             if (j >= nbOfDays[i])
-                incErrorStr( "<StartDayOfWeek> <DayID> must be one of the <DaysOfWeek>, but is", str);
+                incErrorStr( "Error: <StartDayOfWeek> <DayID> must be one of the <DaysOfWeek>, but is: %s", str);
         }
         of.writeParameter("startDayOfWeek", str, i);
         ++nChild;
commit a3c05bc0c6961639100a319cf9a0aa636d7bdbb5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 14:33:18 2014 +0100

    incErrorStrStr always called with two %s
    
    so we don't really need prepareErrorFormat
    
    Change-Id: I3f5ae846ad4ba59468f90eba2f8e0eac2a7da9ae

diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 6f72cc2..e1f25f5 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -331,7 +331,7 @@ void LocaleNode::incErrorStr( const char* pStr, const OUString& rVal ) const
 void LocaleNode::incErrorStrStr( const char* pStr, const OUString& rVal1, const OUString& rVal2 ) const
 {
     ++nError;
-    fprintf( stderr, prepareErrorFormat( pStr, ": %s %s"), OSTR( rVal1), OSTR( rVal2));
+    fprintf(stderr, pStr, OSTR(rVal1), OSTR(rVal2));
 }
 
 void LCInfoNode::generateCode (const OFileWriter &of) const
@@ -370,7 +370,7 @@ void LCInfoNode::generateCode (const OFileWriter &of) const
         if (!(aVariant.isEmpty() || (aVariant.getLength() >= 7 && aVariant.indexOf('-') >= 2)))
             incErrorStr( "invalid Variant", aVariant);
         if (!(aVariant.isEmpty() || aLanguage == "qlt"))
-            incErrorStrStr( "Variant '%s' given but Language '%s' is not 'qlt'", aVariant, aLanguage);
+            incErrorStrStr( "Error: Variant '%s' given but Language '%s' is not 'qlt'", aVariant, aLanguage);
         of.writeParameter("Variant", aVariant);
     }
     else
@@ -651,7 +651,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
         if (!strFrom.isEmpty() && strFrom != "[CURRENCY]") //???
         {
             incErrorStrStr(
-                "non-empty replaceFrom=\"%s\" with non-empty ref=\"%s\".",
+                "Error: non-empty replaceFrom=\"%s\" with non-empty ref=\"%s\".",
                 strFrom, useLocale);
         }
         useLocale = useLocale.replace( '-', '_');
@@ -1936,7 +1936,7 @@ void LCCurrencyNode :: generateCode (const OFileWriter &of) const
         // couldn't had been determined from the current locale (i.e. is
         // empty), silently assume the referred locale has things right.
         if (bCompatible && !sTheCompatibleCurrency.isEmpty() && sTheCompatibleCurrency != str)
-            incErrorStrStr( "CurrencySymbol \"%s\" flagged as usedInCompatibleFormatCodes doesn't match \"%s\" determined from format codes.", str, sTheCompatibleCurrency);
+            incErrorStrStr( "Error: CurrencySymbol \"%s\" flagged as usedInCompatibleFormatCodes doesn't match \"%s\" determined from format codes.", str, sTheCompatibleCurrency);
         str = currencyNode -> findNode ("BankSymbol") -> getValue();
         of.writeParameter("bankSymbol", str, nbOfCurrencies);
         // BankSymbol currently must be ISO 4217. May change later if
commit a944363d352122250d167072250fe10df6374ddc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 14:26:58 2014 +0100

    unused return
    
    Change-Id: I1b61151df81c75bf794fbeda967769501026bb05

diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index b1206c8..3b5e9fc 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -402,8 +402,7 @@ static const hwpeq *lookup_eqn(char *str)
 }
 
 /* 첫자만 대문자이거나 전부 대문자면 소문자로 바꾼다. */
-
-static char *make_keyword( char *keyword, const char *token)
+void make_keyword( char *keyword, const char *token)
 {
   assert(keyword);
   char  *ptr;
@@ -415,9 +414,8 @@ static char *make_keyword( char *keyword, const char *token)
   else
     strcpy(keyword, token);
 
-  if( (token[0] & 0x80) || islower(token[0]) ||
-      strlen(token) < 2 )
-    return keyword;
+  if( (token[0] & 0x80) || islower(token[0]) || strlen(token) < 2 )
+    return;
 
   int capital = isupper(keyword[1]);
   for( ptr = keyword + 2; *ptr && result; ptr++ )
@@ -434,7 +432,7 @@ static char *make_keyword( char *keyword, const char *token)
       ptr++;
     }
   }
-  return keyword;
+  return;
 }
 
 // token reading function
commit 92c5536cd5a3d1854be7fc0c50664aa6e20465d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 14:00:44 2014 +0100

    coverity#982278 Resource leak in object
    
    Change-Id: I0d0cf666ac8ecd55b4d3ba783b1e17670d6eb566

diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index ba0821d..af588fc 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -200,7 +200,6 @@ EditResId::EditResId( sal_uInt16 nId ):
 EditDLL::EditDLL()
 {
     pGlobalData = new GlobalEditData;
-    pResMgr = ResMgr::CreateResMgr( "editeng", Application::GetSettings().GetUILanguageTag() );
 }
 
 EditDLL::~EditDLL()
@@ -208,4 +207,13 @@ EditDLL::~EditDLL()
     delete pGlobalData;
 }
 
+static ResMgr* pResMgr=0;
+
+ResMgr* EditDLL::GetResMgr()
+{
+    if (!pResMgr)
+        pResMgr = ResMgr::CreateResMgr("editeng", Application::GetSettings().GetUILanguageTag());
+    return pResMgr;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/eerdll.hxx b/include/editeng/eerdll.hxx
index c92e70c..2f7912e 100644
--- a/include/editeng/eerdll.hxx
+++ b/include/editeng/eerdll.hxx
@@ -34,14 +34,13 @@ public:
 
 class EditDLL
 {
-    ResMgr*         pResMgr;
     GlobalEditData* pGlobalData;
 
 public:
     EditDLL();
     ~EditDLL();
 
-    ResMgr*         GetResMgr() const       { return pResMgr; }
+    static ResMgr* GetResMgr();
     GlobalEditData* GetGlobalData() const   { return pGlobalData; }
     static EditDLL& Get();
 };
diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx
index bf9f976..b0d29ca 100644
--- a/svx/source/dialog/dialmgr.cxx
+++ b/svx/source/dialog/dialmgr.cxx
@@ -24,12 +24,10 @@
 
 static ResMgr* pResMgr=0;
 
-// struct DialogsResMgr --------------------------------------------------
 ResMgr* DialogsResMgr::GetResMgr()
 {
-    if ( !pResMgr )
-        pResMgr = ResMgr::CreateResMgr( "svx", Application::GetSettings().GetUILanguageTag() );
-
+    if (!pResMgr)
+        pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILanguageTag());
     return pResMgr;
 }
 
commit e5e24bdc33723ed4e055a609a9574edb644d580f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:52:07 2014 +0100

    coverity#1202907 Uninitialized scalar variable
    
    Change-Id: I8cec0ea104fedfd7d89ac91a5b7f395246da8db0

diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index 1785e69..2d6a29b 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -260,7 +260,6 @@ SvStream& ReadTextType(SvStream& rInp, TextType& rText)
 }
 SvStream& ReadBmapType(SvStream& rInp, BmapType& rBmap)
 {
-    memset((char*)&rBmap.Last, 0, BmapSize);
     rInp.Read((char*)&rBmap.Last,BmapSize);
 #if defined OSL_BIGENDIAN
     SWAPOBJK (rBmap);
diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx
index 7268152..cb93d79 100644
--- a/vcl/source/filter/sgvmain.hxx
+++ b/vcl/source/filter/sgvmain.hxx
@@ -29,6 +29,11 @@
 struct PointType {
     sal_Int16 x;
     sal_Int16 y;
+    PointType()
+        : x(0)
+        , y(0)
+    {
+    }
 };
 
 #define SgfDpmm 40
@@ -95,6 +100,16 @@ struct ObjAreaType {
     sal_uInt8   FDummy1;
     sal_Int16   FDummy2;
     sal_uInt16  FMuster;   //  [Index] incl. Invers, transparency
+
+    ObjAreaType()
+        : FFarbe(0)
+        , FBFarbe(0)
+        , FIntens(0)
+        , FDummy1(0)
+        , FDummy2(0)
+        , FMuster(0)
+    {
+    }
 };
 
 #define ObjTextTypeSize 64
@@ -138,6 +153,14 @@ public:
     PointType      ObjMax;     // XY maximum of the object
     sal_uInt8      Art;
     sal_uInt8      Layer;
+    ObjkType()
+        : Last(0)
+        , Next(0)
+        , MemSize(0)
+        , Art(0)
+        , Layer(0)
+    {
+    }
     friend SvStream& ReadObjkType(SvStream& rIStream, ObjkType& rObjk);
     friend bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk);
     virtual void Draw(OutputDevice& rOut) SAL_OVERRIDE;
@@ -270,6 +293,22 @@ public:
     bool    LightOut;     // brighten? (SD20)
     sal_uInt8   GrfFlg;       // (SD20) 0=nSGF 1=Pcx 2=HPGL 4=Raw $FF=Undef (to fix DrawBmp)
     INetURLObject aFltPath;   // for GraphicFilter
+
+    BmapType()
+        : Flags(0)
+        , Reserve(0)
+        , DrehWink(0)
+        , Slant(0)
+        , Format(NoGraf)
+        , nPlanes(0)
+        , RawOut(false)
+        , InvOut(false)
+        , LightOut(false)
+        , GrfFlg(0)
+    {
+        memset(Filename, 0, sizeof(Filename));
+    }
+
     friend SvStream& ReadBmapType(SvStream& rIStream, BmapType& rBmap);
     virtual void Draw(OutputDevice& rOut) SAL_OVERRIDE;
     void SetPaths( const INetURLObject& rFltPath );
commit 7a9abd681b7fc5f84e81aded9085feb09743f385
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:37:59 2014 +0100

    coverity#982756 Dereference null return value
    
    Change-Id: I0f2ef4cb61a5774c3d2251897ee914f959ae44a8

diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 0f16d99..c6d1629 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -481,7 +481,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
     {
         PyRef excClass = getClass( a.getValueType().getTypeName(), *this );
         PyRef value = PyRef( PyUNO_new_UNCHECKED (a, getImpl()->cargo->xInvocation), SAL_NO_ACQUIRE);
-        PyRef argsTuple( PyTuple_New( 1 ) , SAL_NO_ACQUIRE );
+        PyRef argsTuple( PyTuple_New( 1 ) , SAL_NO_ACQUIRE, NOT_NULL );
         PyTuple_SetItem( argsTuple.get() , 0 , value.getAcquired() );
         PyRef ret( PyObject_CallObject( excClass.get() , argsTuple.get() ), SAL_NO_ACQUIRE );
         if( ! ret.is() )
commit c3e8faa10e90b99601a19b2d46b83deac51d39d5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:35:50 2014 +0100

    coverity#1228877 Structurally dead code
    
    Change-Id: If3a3de8bae4c2d1b8e39d3255cd8ee7e985b4404

diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 7173357..ca2ff16 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -2144,6 +2144,8 @@ namespace cppcanvas
 
             const ::Color aEmptyColor( COL_AUTO );
 
+            ActionSharedPtr ret;
+
             // no DX array, and no need to subset - no need to store
             // DX array, then.
             if( !pDXArray && !bSubsettable )
@@ -2158,7 +2160,7 @@ namespace cppcanvas
                     // nope
                     if( rParms.maTextTransformation.is_initialized() )
                     {
-                        return ActionSharedPtr( new TextAction(
+                        ret = ActionSharedPtr( new TextAction(
                                                     aStartPoint,
                                                     rText,
                                                     nStartPos,
@@ -2169,7 +2171,7 @@ namespace cppcanvas
                     }
                     else
                     {
-                        return ActionSharedPtr( new TextAction(
+                        ret = ActionSharedPtr( new TextAction(
                                                     aStartPoint,
                                                     rText,
                                                     nStartPos,
@@ -2182,7 +2184,7 @@ namespace cppcanvas
                 {
                     // at least one of the effects requested
                     if( rParms.maTextTransformation.is_initialized() )
-                        return ActionSharedPtr( new EffectTextAction(
+                        ret = ActionSharedPtr( new EffectTextAction(
                                                     aStartPoint,
                                                     aReliefOffset,
                                                     rReliefColor,
@@ -2196,7 +2198,7 @@ namespace cppcanvas
                                                     rState,
                                                     *rParms.maTextTransformation ) );
                     else
-                        return ActionSharedPtr( new EffectTextAction(
+                        ret = ActionSharedPtr( new EffectTextAction(
                                                     aStartPoint,
                                                     aReliefOffset,
                                                     rReliefColor,
@@ -2221,7 +2223,7 @@ namespace cppcanvas
                 {
                     // nope
                     if( rParms.maTextTransformation.is_initialized() )
-                        return ActionSharedPtr( new TextArrayAction(
+                        ret = ActionSharedPtr( new TextArrayAction(
                                                     aStartPoint,
                                                     rText,
                                                     nStartPos,
@@ -2231,7 +2233,7 @@ namespace cppcanvas
                                                     rState,
                                                     *rParms.maTextTransformation ) );
                     else
-                        return ActionSharedPtr( new TextArrayAction(
+                        ret = ActionSharedPtr( new TextArrayAction(
                                                     aStartPoint,
                                                     rText,
                                                     nStartPos,
@@ -2244,7 +2246,7 @@ namespace cppcanvas
                 {
                     // at least one of the effects requested
                     if( rParms.maTextTransformation.is_initialized() )
-                        return ActionSharedPtr( new EffectTextArrayAction(
+                        ret = ActionSharedPtr( new EffectTextArrayAction(
                                                     aStartPoint,
                                                     aReliefOffset,
                                                     rReliefColor,
@@ -2259,7 +2261,7 @@ namespace cppcanvas
                                                     rState,
                                                     *rParms.maTextTransformation ) );
                     else
-                        return ActionSharedPtr( new EffectTextArrayAction(
+                        ret = ActionSharedPtr( new EffectTextArrayAction(
                                                     aStartPoint,
                                                     aReliefOffset,
                                                     rReliefColor,
@@ -2274,9 +2276,7 @@ namespace cppcanvas
                                                     rState ) );
                 }
             }
-#if defined(__GNUC__)
-            return ActionSharedPtr();
-#endif
+            return ret;
         }
     }
 }
commit 93a37a649755034d306767880572a5d81a43eceb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:32:45 2014 +0100

    coverity#1224982 Out-of-bounds access
    
    Change-Id: I028148a1112cdbe83ff7fb439cc4280a7723338b

diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index b22e9cf..4fd3b4d 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -189,7 +189,7 @@ hchar_string DateCode::GetString()
             cbuf[4] = 0;
                 break;
         case '*':
-            strncat(cbuf, en_mon[date[MONTH] - 1], 255);
+            strncat(cbuf, en_mon[date[MONTH] - 1], sizeof(cbuf) - strlen(cbuf) - 1);
             break;
         case '3':                             /* 'D' is day of korean */
             num = date[DAY];
@@ -231,17 +231,17 @@ hchar_string DateCode::GetString()
             cbuf[4] = 0;
             break;
         case '_':
-            strncat(cbuf, en_week[date[WEEK]], 256);
+            strncat(cbuf, en_week[date[WEEK]], sizeof(cbuf) - strlen(cbuf) - 1);
             break;
         case '7':
             ret.push_back(0xB5A1);
             ret.push_back((is_pm) ? 0xD281 : 0xB8E5);
             break;
         case '&':
-            strncat(cbuf, (is_pm) ? "p.m." : "a.m.", 256);
+            strncat(cbuf, (is_pm) ? "p.m." : "a.m.", sizeof(cbuf) - strlen(cbuf) - 1);
             break;
         case '+':
-            strncat(cbuf, (is_pm) ? "P.M." : "A.M.", 256);
+            strncat(cbuf, (is_pm) ? "P.M." : "A.M.", sizeof(cbuf) - strlen(cbuf) - 1);
             break;
         case '8':                             // 2.5 feature
         case '9':
commit f7f943d71faa8117f902289f95b9ffc7582a5320
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:20:25 2014 +0100

    coverity#1229887 Resource leak
    
    Change-Id: I5f8ac14892682490d8cc93266368419107376206

diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 1d17b98..d6ccdc5 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -1449,6 +1449,8 @@ void Test::testSharedFormulaUpdateOnDBChange()
     // Define database range 'MyRange' for A1:A2.
     ScDBData* pData = new ScDBData("MyRange", 0, 0, 0, 0, 1);
     bool bInserted = pDBs->getNamedDBs().insert(pData);
+    if (!bInserted)
+        delete pData;
     CPPUNIT_ASSERT_MESSAGE("Failed to insert a new database range.", bInserted);
 
     // Insert in C2:C4 a group of formula cells that reference MyRange.
commit 0273e9cde0626774dce273a9ff1b4ccbd4e75d9c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:19:21 2014 +0100

    coverity#1229888 Resource leak
    
    Change-Id: I5a50c23581ac31b81549cdbab038521598c2abf3

diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 8c49076..1d17b98 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -1470,7 +1470,10 @@ void Test::testSharedFormulaUpdateOnDBChange()
 
     // Change the range referenced by MyRange to A1:A4.
     ScDBCollection aNewDBs(m_pDoc);
-    bInserted = aNewDBs.getNamedDBs().insert(new ScDBData("MyRange", 0, 0, 0, 0, 3));
+    ScDBData* pNewData = new ScDBData("MyRange", 0, 0, 0, 0, 3);
+    bInserted = aNewDBs.getNamedDBs().insert(pNewData);
+    if (!bInserted)
+        delete pNewData;
     CPPUNIT_ASSERT_MESSAGE("Failed to insert a new database range.", bInserted);
 
     std::vector<ScRange> aDeleted;
commit 3db3184dc9415673099b88d4696bfe53c10e8dca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:15:16 2014 +0100

    coverity#1229890 Uninitialized pointer field
    
    Change-Id: Ica36715d932157fdeedadced7c7fba71babb4e0a

diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 4bf718b..49d9c7c 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -66,6 +66,7 @@ namespace dbaui
         ,m_pOptionsLabel(NULL)
         ,m_pOptions(NULL)
         ,m_pDataConvertFixedLine(NULL)
+        ,m_pDataConvertLabel(NULL)
         ,m_pCharsetLabel(NULL)
         ,m_pCharset(NULL)
         ,m_pAutoFixedLine(NULL)
commit 59828ae2fcdd72e69504619f2d826ae75dec3aba
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:13:57 2014 +0100

    coverity#1229891 Uninitialized scalar field
    
    Change-Id: I5e7e0f95b0a93c6b0db5b8ec313822fadbbc4a07

diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index ad88184..5953a21 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -105,6 +105,7 @@ namespace svx
     };
 
     PseudoRubyText::PseudoRubyText()
+        : m_ePosition(eAbove)
     {
     }
 
commit a33f9d080be4a51e816b25f94d19f591b2d9b75d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 7 12:12:37 2014 +0100

    coverity#1229892 Uninitialized pointer field
    
    Change-Id: Ida750e33efd8d18ee754d1bf8b123295581365c8

diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 9717d69..836679c 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -90,51 +90,6 @@ namespace dbaui
         return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, USHRT_MAX, USHRT_MAX, STR_COMMONURL);
     }
 
-    // OConnectionTabPageSetup
-    OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId)
-        :OConnectionHelper(pParent, ModuleRes(_rId), _rCoreAttrs)
-        ,m_bUserGrabFocus(true)
-        ,m_pHelpText(new FixedText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT)))
-    {
-
-        if ( USHRT_MAX != _nHelpTextResId )
-        {
-            OUString sHelpText = ModuleRes(_nHelpTextResId);
-            m_pHelpText->SetText(sHelpText);
-        }
-        else
-            m_pHelpText->Hide();
-
-        if ( USHRT_MAX != _nHeaderResId )
-            SetHeaderText(FT_AUTOWIZARDHEADER, _nHeaderResId);
-
-        if ( USHRT_MAX != _nUrlResId )
-        {
-            OUString sLabelText = ModuleRes(_nUrlResId);
-            m_pFT_Connection->SetText(sLabelText);
-            if ( USHRT_MAX == _nHelpTextResId )
-            {
-                Point aPos = m_pHelpText->GetPosPixel();
-                Point aFTPos = m_pFT_Connection->GetPosPixel();
-                Point aEDPos = m_pConnectionURL->GetPosPixel();
-                Point aPBPos = m_pPB_Connection->GetPosPixel();
-
-                aEDPos.Y() = aPos.Y() + aEDPos.Y() - aFTPos.Y();
-                aPBPos.Y() = aPos.Y() + aPBPos.Y() - aFTPos.Y();
-                aFTPos.Y() = aPos.Y();
-                m_pFT_Connection->SetPosPixel(aFTPos);
-                m_pConnectionURL->SetPosPixel(aEDPos);
-                m_pPB_Connection->SetPosPixel(aPBPos);
-            }
-        }
-        else
-            m_pFT_Connection->Hide();
-
-        m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified));
-
-        SetRoadmapStateValue(false);
-    }
-
     OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId)
         :OConnectionHelper(pParent, _rId, _rUIXMLDescription, _rCoreAttrs)
         ,m_bUserGrabFocus(true)
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index 350fb22..02dbbdf 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -68,7 +68,6 @@ namespace dbaui
         OUString getConnectionURL( ) const;
 
     protected:
-        OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
         OConnectionTabPageSetup(Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
         virtual bool checkTestConnection() SAL_OVERRIDE;
             // nControlFlags is a combination of the CBTP_xxx-constants


More information about the Libreoffice-commits mailing list