[Libreoffice-commits] core.git: svx/source

Stephan Bergmann sbergman at redhat.com
Wed Sep 9 08:35:09 PDT 2015


 svx/source/items/numfmtsh.cxx |   15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

New commits:
commit 4f6dcbd444cdabd1657a0c0e706b48bc165f4385
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Sep 9 17:33:50 2015 +0200

    clang-analyzer-deadcode.DeadStores
    
    ...ever since fd069bee7e57ad529c3c0974559fd2d84ec3151a "initial import"
    
    Change-Id: Ie9fc697361f7677dae0d62ebb62a7db45e5cbe37

diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index e4d86fe..ae86e5f 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -659,9 +659,6 @@ short SvxNumberFormatShell::FillEListWithFormats_Impl( std::vector<OUString>& rL
      */
     sal_uInt16  nMyType;
 
-    DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
-
-    const SvNumberformat*   pNumEntry   = pCurFmtTable->empty() ? 0 : pCurFmtTable->begin()->second;
     sal_uInt32          nNFEntry;
     OUString            aStrComment;
     OUString            aNewFormNInfo;
@@ -674,7 +671,7 @@ short SvxNumberFormatShell::FillEListWithFormats_Impl( std::vector<OUString>& rL
     {
         nNFEntry=pFormatter->GetFormatIndex((NfIndexTableOffset)nIndex,eCurLanguage);
 
-        pNumEntry   = pFormatter->GetEntry(nNFEntry);
+        const SvNumberformat* pNumEntry   = pFormatter->GetEntry(nNFEntry);
 
         if(pNumEntry==NULL) continue;
 
@@ -700,9 +697,6 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl( std::vector<OUString>& r
 {
     sal_uInt16  nMyType;
 
-    assert(pCurFmtTable && "Unknown number format!");
-
-    const SvNumberformat*   pNumEntry   = pCurFmtTable->empty() ? 0 : pCurFmtTable->begin()->second;
     sal_uInt32          nNFEntry;
     OUString            aStrComment;
     OUString            aNewFormNInfo;
@@ -713,7 +707,7 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl( std::vector<OUString>& r
     {
         nNFEntry=pFormatter->GetFormatIndex((NfIndexTableOffset)nIndex,eCurLanguage);
 
-        pNumEntry   = pFormatter->GetEntry(nNFEntry);
+        const SvNumberformat* pNumEntry   = pFormatter->GetEntry(nNFEntry);
         if(pNumEntry!=NULL)
         {
             nMyCat=pNumEntry->GetType() & ~css::util::NumberFormat::DEFINED;
@@ -780,7 +774,6 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<OUString>& rL
 
     DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
 
-    const SvNumberformat*   pNumEntry   = pCurFmtTable->empty() ? 0 : pCurFmtTable->begin()->second;
     sal_uInt32          nNFEntry;
     OUString            aStrComment;
     OUString            aNewFormNInfo;
@@ -797,7 +790,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<OUString>& rL
     {
         nNFEntry=pFormatter->GetFormatIndex((NfIndexTableOffset)nIndex,eCurLanguage);
 
-        pNumEntry   = pFormatter->GetEntry(nNFEntry);
+        const SvNumberformat* pNumEntry   = pFormatter->GetEntry(nNFEntry);
 
         if(pNumEntry==NULL) continue;
 
@@ -822,7 +815,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<OUString>& rL
         while ( it != pCurFmtTable->end() )
         {
             sal_uInt32 nKey = it->first;
-            pNumEntry   = it->second;
+            const SvNumberformat* pNumEntry   = it->second;
 
             if ( !IsRemoved_Impl( nKey ))
             {


More information about the Libreoffice-commits mailing list