[Libreoffice-commits] core.git: 15 commits - chart2/source cui/source framework/source sc/inc sc/source svx/source sw/inc sw/source test/source vcl/generic

Caolán McNamara caolanm at redhat.com
Sun Mar 30 13:22:00 PDT 2014


 chart2/source/controller/dialogs/res_BarGeometry.cxx |    6 +++---
 chart2/source/controller/dialogs/res_BarGeometry.hxx |    6 +++---
 cui/source/options/optgdlg.cxx                       |    2 +-
 framework/source/fwe/classes/addonsoptions.cxx       |    7 -------
 sc/inc/scabstdlg.hxx                                 |    6 +++---
 sc/source/ui/attrdlg/scdlgfact.cxx                   |    6 +++---
 sc/source/ui/attrdlg/scdlgfact.hxx                   |    6 +++---
 sc/source/ui/inc/shtabdlg.hxx                        |    6 +++---
 sc/source/ui/miscdlgs/mvtabdlg.cxx                   |    2 +-
 sc/source/ui/miscdlgs/shtabdlg.cxx                   |   10 +++-------
 svx/source/sdr/properties/textproperties.cxx         |    2 +-
 sw/inc/swabstdlg.hxx                                 |    4 ++--
 sw/source/core/doc/doctxm.cxx                        |    7 +++++--
 sw/source/core/uibase/inc/selglos.hxx                |    4 ++--
 sw/source/core/uibase/uiview/view.cxx                |    4 ++--
 sw/source/core/uibase/utlui/numfmtlb.cxx             |    2 +-
 sw/source/core/unocore/unostyle.cxx                  |   18 +++++++++---------
 sw/source/ui/dialog/swdlgfact.cxx                    |    4 ++--
 sw/source/ui/dialog/swdlgfact.hxx                    |    4 ++--
 sw/source/ui/misc/outline.cxx                        |    2 +-
 test/source/bootstrapfixture.cxx                     |    2 +-
 vcl/generic/print/prtsetup.hxx                       |    2 +-
 22 files changed, 52 insertions(+), 60 deletions(-)

New commits:
commit 383c7a6913291af010e7e49f337de9b8450e8930
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 21:17:10 2014 +0100

    coverity#1194905 Explicit null dereferenced
    
    Change-Id: I397765007afb9bc8fdb7cd224c31fdcda924de17

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index c3ef6d1..e33ddc8 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -492,8 +492,9 @@ void    SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
     case  TOX_BIBLIOGRAPHY:      prBase = &mpDefTOXBases->pBiblioBase; break;
     case  TOX_CITATION: /** TODO */break;
     }
-    if(*prBase)
-        delete (*prBase);
+    if (!prBase)
+        return;
+    delete (*prBase);
     (*prBase) = new SwTOXBase(rBase);
 }
 
commit 720574cfecff6bf5f45f651d2f88a08d58581cdd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 21:15:43 2014 +0100

    coverity#1194904 Explicit null dereferenced
    
    Change-Id: I50c6547206a33d3f8e06688c99ccf7bffbc75bfc

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index c37bc37..c3ef6d1 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -466,6 +466,8 @@ const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, bool bCreate )
     case  TOX_BIBLIOGRAPHY:      prBase = &mpDefTOXBases->pBiblioBase; break;
     case  TOX_CITATION: /** TODO */break;
     }
+    if (!prBase)
+        return NULL;
     if(!(*prBase) && bCreate)
     {
         SwForm aForm(eTyp);
commit f9f7b70bd0e88d0094369257f07919182b1f2bdb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 21:02:36 2014 +0100

    coverity#1194929 String not null terminated
    
    Change-Id: I749f4cb8340b4642040baed7f3363e2f1e4b65ad

diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index c7f8da1..dc7c7b0 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -131,7 +131,7 @@ OString loadFile(const OUString& rURL)
     sal_uInt64 nBytesRead;
     aFile.read(aBytes.get(), nSize, nBytesRead);
     CPPUNIT_ASSERT_EQUAL(nSize, nBytesRead);
-    OString aContent(aBytes.get());
+    OString aContent(aBytes.get(), nBytesRead);
 
     return aContent;
 }
commit 1062aaf005b429fa4b480c2857c3479488208ed8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:59:33 2014 +0100

    coverity#1194922 Overflowed return value
    
    Change-Id: Id00dc5b37685ac81125e5ed075680c4dab2426c9

diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx
index 13a16e7..725b2cc 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.cxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx
@@ -44,17 +44,17 @@ void BarGeometryResources::Enable( bool bEnable )
     m_pLB_Geometry->Enable( bEnable );
 }
 
-sal_uInt16 BarGeometryResources::GetSelectEntryCount() const
+sal_Int32 BarGeometryResources::GetSelectEntryCount() const
 {
     return m_pLB_Geometry->GetSelectEntryCount();
 }
 
-sal_uInt16 BarGeometryResources::GetSelectEntryPos() const
+sal_Int32 BarGeometryResources::GetSelectEntryPos() const
 {
     return m_pLB_Geometry->GetSelectEntryPos();
 }
 
-void BarGeometryResources::SelectEntryPos( sal_uInt16 nPos )
+void BarGeometryResources::SelectEntryPos(sal_Int32 nPos)
 {
     if( nPos < m_pLB_Geometry->GetEntryCount() )
         m_pLB_Geometry->SelectEntryPos( nPos );
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.hxx b/chart2/source/controller/dialogs/res_BarGeometry.hxx
index b74e1cc..60af3af 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.hxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.hxx
@@ -34,9 +34,9 @@ public:
     void Show( bool bShow );
     void Enable( bool bEnable );
 
-    sal_uInt16 GetSelectEntryCount() const;
-    sal_uInt16 GetSelectEntryPos() const;
-    void SelectEntryPos( sal_uInt16 nPos );
+    sal_Int32 GetSelectEntryCount() const;
+    sal_Int32 GetSelectEntryPos() const;
+    void SelectEntryPos(sal_Int32 nPos);
 
     void SetSelectHdl( const Link& rLink );
 
commit 85ed65f83981ac07215cb01024e8e66d705f1267
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:57:35 2014 +0100

    coverity#1194921 Overflowed return value
    
    Change-Id: I872835c3a20eda807d571fa27794dbe2bf858e7a

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index e28fdbf..04e0a4e 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -286,10 +286,10 @@ class AbstractScShowTabDlg : public VclAbstractDialog
 {
 public:
     virtual void    Insert( const OUString& rString, bool bSelected ) = 0;
-    virtual sal_uInt16  GetSelectEntryCount() const = 0;
+    virtual sal_Int32 GetSelectEntryCount() const = 0;
     virtual void SetDescription(const OUString& rTitle, const OUString& rFixedText, const OString& nDlgHelpId, const OString& nLbHelpId ) = 0;
-    virtual OUString  GetSelectEntry(sal_uInt16 nPos) const = 0;
-    virtual sal_uInt16  GetSelectEntryPos(sal_uInt16 nPos) const = 0;
+    virtual OUString  GetSelectEntry(sal_Int32 nPos) const = 0;
+    virtual sal_Int32 GetSelectEntryPos(sal_Int32 nPos) const = 0;
 };
 
 class AbstractScSortWarningDlg : public VclAbstractDialog
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 5685b92..bc4928d 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -555,7 +555,7 @@ void AbstractScShowTabDlg_Impl::Insert( const OUString& rString, bool bSelected
     pDlg->Insert( rString, bSelected);
 }
 
-sal_uInt16  AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
+sal_Int32 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const
 {
     return pDlg->GetSelectEntryCount();
 }
@@ -567,12 +567,12 @@ void    AbstractScShowTabDlg_Impl::SetDescription(
     pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId );
 }
 
-sal_uInt16  AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_uInt16 nPos) const
+sal_Int32 AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_Int32 nPos) const
 {
     return pDlg->GetSelectEntryPos( nPos);
 }
 
-OUString AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const
+OUString AbstractScShowTabDlg_Impl::GetSelectEntry(sal_Int32 nPos) const
 {
     return pDlg->GetSelectEntry(nPos);
 }
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 1796a82..9b5625b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -338,10 +338,10 @@ class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg
 {
     DECL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl,ScShowTabDlg)
     virtual void    Insert( const OUString& rString, bool bSelected ) SAL_OVERRIDE;
-    virtual sal_uInt16  GetSelectEntryCount() const SAL_OVERRIDE;
+    virtual sal_Int32 GetSelectEntryCount() const SAL_OVERRIDE;
     virtual void SetDescription(const OUString& rTitle, const OUString& rFixedText, const OString& sDlgHelpId, const OString& sLbHelpId ) SAL_OVERRIDE;
-    virtual OUString  GetSelectEntry(sal_uInt16 nPos) const SAL_OVERRIDE;
-    virtual sal_uInt16  GetSelectEntryPos(sal_uInt16 nPos) const SAL_OVERRIDE;
+    virtual OUString  GetSelectEntry(sal_Int32 nPos) const SAL_OVERRIDE;
+    virtual sal_Int32 GetSelectEntryPos(sal_Int32 nPos) const SAL_OVERRIDE;
 };
 
 class AbstractScSortWarningDlg_Impl : public AbstractScSortWarningDlg
diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx
index ce4994b..db8fe9a 100644
--- a/sc/source/ui/inc/shtabdlg.hxx
+++ b/sc/source/ui/inc/shtabdlg.hxx
@@ -46,9 +46,9 @@ public:
     /** Inserts a string into the ListBox. */
     void    Insert( const OUString& rString, bool bSelected );
 
-    sal_uInt16  GetSelectEntryCount() const;
-    OUString    GetSelectEntry(sal_uInt16 nPos) const;
-    sal_uInt16  GetSelectEntryPos(sal_uInt16 nPos) const;
+    sal_Int32 GetSelectEntryCount() const;
+    OUString    GetSelectEntry(sal_Int32 nPos) const;
+    sal_Int32 GetSelectEntryPos(sal_Int32 nPos) const;
 };
 
 
diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx
index 6f511c5..1f04f4f 100644
--- a/sc/source/ui/miscdlgs/shtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/shtabdlg.cxx
@@ -64,25 +64,21 @@ void ScShowTabDlg::Insert( const OUString& rString, bool bSelected )
         m_pLb->SelectEntryPos( m_pLb->GetEntryCount() - 1 );
 }
 
-
-
-sal_uInt16 ScShowTabDlg::GetSelectEntryCount() const
+sal_Int32 ScShowTabDlg::GetSelectEntryCount() const
 {
     return m_pLb->GetSelectEntryCount();
 }
 
-OUString ScShowTabDlg::GetSelectEntry(sal_uInt16 nPos) const
+OUString ScShowTabDlg::GetSelectEntry(sal_Int32 nPos) const
 {
     return m_pLb->GetSelectEntry(nPos);
 }
 
-sal_uInt16 ScShowTabDlg::GetSelectEntryPos(sal_uInt16 nPos) const
+sal_Int32 ScShowTabDlg::GetSelectEntryPos(sal_Int32 nPos) const
 {
     return m_pLb->GetSelectEntryPos(nPos);
 }
 
-
-
 IMPL_LINK_NOARG_INLINE_START(ScShowTabDlg, DblClkHdl)
 {
     EndDialog( RET_OK );
commit a1b352a8da7394dfce580ccd0ae5de4e00275e71
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:54:12 2014 +0100

    coverity#1194919 Overflowed return value
    
    Change-Id: I57c8bdba2762e512104346c02d1e7d7d26423bd0

diff --git a/sw/source/core/uibase/utlui/numfmtlb.cxx b/sw/source/core/uibase/utlui/numfmtlb.cxx
index ecd4dee..e4b87b2 100644
--- a/sw/source/core/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/core/uibase/utlui/numfmtlb.cxx
@@ -353,7 +353,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
 
 sal_uLong NumFormatListBox::GetFormat() const
 {
-    sal_uInt16 nPos = GetSelectEntryPos();
+    sal_Int32 nPos = GetSelectEntryPos();
 
     return (sal_uLong)GetEntryData(nPos);
 }
commit 688e0cec3c00a8278b201f2a83f747e9b72e1404
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:53:33 2014 +0100

    coverity#1194917 Overflowed return value
    
    Change-Id: I87a8b8ec70a11f88dc225392964707f582905805

diff --git a/vcl/generic/print/prtsetup.hxx b/vcl/generic/print/prtsetup.hxx
index dd1d109..27a46a7 100644
--- a/vcl/generic/print/prtsetup.hxx
+++ b/vcl/generic/print/prtsetup.hxx
@@ -90,7 +90,7 @@ public:
 
     void update();
 
-    sal_uInt16 getOrientation() { return m_pOrientBox->GetSelectEntryPos(); }
+    sal_Int32 getOrientation() const { return m_pOrientBox->GetSelectEntryPos(); }
 };
 
 class RTSDevicePage : public TabPage
commit cbedb5a64229dc3a7b6528fd1486e47f6233be71
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:52:26 2014 +0100

    coverity#1194916 Overflowed return value
    
    Change-Id: I26614f6d95276ec2b3b57301bd38ac53ea8f225d

diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 54453fa..1e6a40e 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -205,7 +205,7 @@ void ScMoveTableDlg::CheckNewTabName()
 
 ScDocument* ScMoveTableDlg::GetSelectedDoc()
 {
-    sal_uInt16 nPos = pLbDoc->GetSelectEntryPos();
+    sal_Int32 nPos = pLbDoc->GetSelectEntryPos();
     return static_cast<ScDocument*>(pLbDoc->GetEntryData(nPos));
 }
 
commit f21d478b8599668553dc1b2dcb08ae53d783a1a8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:49:46 2014 +0100

    coverity#1194913 Overflowed return value
    
    Change-Id: I4fc25ec677167a064c349d250352576490fcedcd

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index d5736be..c6695612 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -255,8 +255,8 @@ class AbstractSwSelGlossaryDlg : public VclAbstractDialog
 {
 public:
     virtual void InsertGlos(const OUString &rRegion, const OUString &rGlosName) = 0;    // inline
-    virtual sal_uInt16 GetSelectedIdx() const = 0;  // inline
-    virtual void SelectEntryPos(sal_uInt16 nIdx) = 0;   // inline
+    virtual sal_Int32 GetSelectedIdx() const = 0;  // inline
+    virtual void SelectEntryPos(sal_Int32 nIdx) = 0;   // inline
 };
 
 class AbstractSwAutoFormatDlg : public VclAbstractDialog
diff --git a/sw/source/core/uibase/inc/selglos.hxx b/sw/source/core/uibase/inc/selglos.hxx
index 734c098..01ade93 100644
--- a/sw/source/core/uibase/inc/selglos.hxx
+++ b/sw/source/core/uibase/inc/selglos.hxx
@@ -39,11 +39,11 @@ public:
         const OUString aTmp = rRegion + ":" + rGlosName;
         m_pGlosBox->InsertEntry(aTmp);
     }
-    sal_uInt16 GetSelectedIdx() const
+    sal_Int32 GetSelectedIdx() const
     {
         return m_pGlosBox->GetSelectEntryPos();
     }
-    void SelectEntryPos(sal_uInt16 nIdx)
+    void SelectEntryPos(sal_Int32 nIdx)
     {
         m_pGlosBox->SelectEntryPos(nIdx);
     }
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 6de37ed..06baaf3 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -298,12 +298,12 @@ void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const OUString &rRegion, const OU
     pDlg->InsertGlos( rRegion, rGlosName );
 }
 
-sal_uInt16 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
+sal_Int32 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
 {
     return pDlg->GetSelectedIdx();
 }
 
-void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx)
+void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx)
 {
     pDlg->SelectEntryPos( nIdx );
 }
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 8654412..e68de8d 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -184,8 +184,8 @@ class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg
 {
     DECL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl,SwSelGlossaryDlg)
     virtual void InsertGlos(const OUString &rRegion, const OUString &rGlosName) SAL_OVERRIDE;    // inline
-    virtual sal_uInt16 GetSelectedIdx() const SAL_OVERRIDE;  // inline
-    virtual void SelectEntryPos(sal_uInt16 nIdx) SAL_OVERRIDE;   // inline
+    virtual sal_Int32 GetSelectedIdx() const SAL_OVERRIDE;  // inline
+    virtual void SelectEntryPos(sal_Int32 nIdx) SAL_OVERRIDE;   // inline
 };
 
 class AbstractSwAutoFormatDlg_Impl : public AbstractSwAutoFormatDlg
commit 5129ed7014b7e065f82e2781caac4a459ca9766d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:47:21 2014 +0100

    coverity#1194912 Overflowed return value
    
    Change-Id: Ia32931ddb122e31bcd1cb18ecca694ae562d5d7f

diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index f72267c..6a19d90 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -73,7 +73,7 @@ public:
     SwNumNamesDlg(Window *pParent);
     void SetUserNames(const OUString *pList[]);
     OUString GetName() const { return m_pFormEdit->GetText(); }
-    sal_uInt16 GetCurEntryPos() const { return m_pFormBox->GetSelectEntryPos(); }
+    sal_Int32 GetCurEntryPos() const { return m_pFormBox->GetSelectEntryPos(); }
 };
 
 // remember selected entry
commit 582ecb83fb6e9bca9ea61634c764487259b62686
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:46:19 2014 +0100

    coverity#1194908 Explicit null dereferenced
    
    Change-Id: I404d9990a060ef38915af126bf239136a9d00af2

diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index abd41ed..59c9291 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -283,7 +283,7 @@ namespace sdr
 
                                     SdrModel* pModel = rObj.GetModel();
                                     SfxStyleSheetBasePool* pStylePool = (pModel != NULL) ? pModel->GetStyleSheetPool() : 0L;
-                                    SfxStyleSheet* pNewStyle = (SfxStyleSheet*)pStylePool->Find(aNewStyleSheetName, GetStyleSheet()->GetFamily());
+                                    SfxStyleSheet* pNewStyle = pStylePool ? (SfxStyleSheet*)pStylePool->Find(aNewStyleSheetName, GetStyleSheet()->GetFamily()) : NULL;
                                     DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
 
                                     if(pNewStyle)
commit d637997d69ba3bd7bbad6f8cc1e0213f2c18d0d1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:45:17 2014 +0100

    coverity#1194915 Integer overflowed argument
    
    Change-Id: I6c05a1094fcf3dd51079a6b67ee02b31cc2c6a6c

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index c3794a8..4453b50 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1288,7 +1288,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
 
     // Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default.
     OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString();
-    sal_uInt16 nCurrPos = m_pCurrencyLB->GetSelectEntryPos();
+    sal_Int32 nCurrPos = m_pCurrencyLB->GetSelectEntryPos();
     const NfCurrencyEntry* pCurr = (const NfCurrencyEntry*)
         m_pCurrencyLB->GetEntryData( nCurrPos );
     OUString sNewCurr;
commit 1978655c32fe4b0c79bf98ee5b20c899ba59ba98
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:43:48 2014 +0100

    coverity#1194897 Logically dead code
    
    Change-Id: I4cf8d63822c4a68b7cdc126a8d76c1ce7b064655

diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 97784d0..05b296b 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -842,7 +842,6 @@ bool AddonsOptions_Impl::ReadOfficeToolBarSet( AddonToolBars& rAddonOfficeToolBa
 
 bool AddonsOptions_Impl::ReadToolBarItemSet( const OUString& rToolBarItemSetNodeName, Sequence< Sequence< PropertyValue > >& rAddonOfficeToolBarSeq )
 {
-    bool                     bInsertSeparator        = false;
     sal_uInt32               nToolBarItemCount       = rAddonOfficeToolBarSeq.getLength();
     OUString                 aAddonToolBarItemSetNode( rToolBarItemSetNodeName + m_aPathDelimiter );
     Sequence< OUString >     aAddonToolBarItemSetNodeSeq = GetNodeNames( rToolBarItemSetNodeName );
@@ -865,12 +864,6 @@ bool AddonsOptions_Impl::ReadToolBarItemSet( const OUString& rToolBarItemSetNode
         // Read the ToolBarItem
         if ( ReadToolBarItem( aToolBarItemNode, aToolBarItem ) )
         {
-            if ( bInsertSeparator )
-            {
-                bInsertSeparator = false;
-                InsertToolBarSeparator( rAddonOfficeToolBarSeq );
-            }
-
             // Successfully read a toolbar item, append to our list
             sal_uInt32 nAddonCount = rAddonOfficeToolBarSeq.getLength();
             rAddonOfficeToolBarSeq.realloc( nAddonCount+1 );
commit d085cc1203880d0bfb52c4a99f1af30b99a726fd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:41:24 2014 +0100

    coverity#1194894 Logically dead code
    
    Change-Id: Ib55520d0cf5b4c37e8358aa0b4a1ab68f7c3a0e5

diff --git a/sw/source/core/uibase/uiview/view.cxx b/sw/source/core/uibase/uiview/view.cxx
index fdb8b5d..1fdf0bf 100644
--- a/sw/source/core/uibase/uiview/view.cxx
+++ b/sw/source/core/uibase/uiview/view.cxx
@@ -1518,8 +1518,8 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
     pValue->Value.setValue ( &bIsSelected, ::getBooleanCppuType() );
     nIndex++;
 
-    if ( nIndex < NUM_VIEW_SETTINGS )
-        rSequence.realloc ( nIndex );
+    assert(nIndex == NUM_VIEW_SETTINGS);
+    (void)nIndex;
 }
 #undef NUM_VIEW_SETTINGS
 
commit 02b4ad51e154244a55a4e0ff277232c86661aaf7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Mar 30 20:37:43 2014 +0100

    coverity#1194893 mismerge (Logically dead code)
    
    regression since 6e61ecd09679a66060f932835622821d39e92f01
    mismerge of b635b4fa4e42053d30ab639643d2236a20243f62
    
    Change-Id: Ib83ca9b8ce09abd1de22ca063f8263da7196d741

diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 52c71f8..4625416 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1951,21 +1951,21 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
                     SwPageDesc* pPageDesc = SwPageDesc::GetByName(*pDoc, sDescName);
                     if(pPageDesc)
                     {
-                            pNewDesc->RegisterToPageDesc( *pPageDesc );
-                            bPut = sal_True;
+                        pNewDesc->RegisterToPageDesc( *pPageDesc );
+                        bPut = sal_True;
                     }
                     else
                     {
                         throw lang::IllegalArgumentException();
                     }
-                    if(!bPut)
-                    {
-                        rStyleSet.ClearItem(RES_BREAK);
-                        rStyleSet.Put(SwFmtPageDesc());
-                    }
-                    else
-                        rStyleSet.Put(*pNewDesc);
                 }
+                if(!bPut)
+                {
+                    rStyleSet.ClearItem(RES_BREAK);
+                    rStyleSet.Put(SwFmtPageDesc());
+                }
+                else
+                    rStyleSet.Put(*pNewDesc);
 
                 delete pNewDesc;
                 bDone = true;


More information about the Libreoffice-commits mailing list