[Libreoffice-commits] core.git: 6 commits - basic/source extensions/source fpicker/source include/oox sc/source sd/source

Norbert Thiebaud nthiebaud at gmail.com
Tue Jul 1 03:44:35 PDT 2014


 basic/source/classes/sbunoobj.cxx      |    6 +-----
 extensions/source/scanner/sanedlg.cxx  |   12 +++++++-----
 fpicker/source/office/commonpicker.cxx |   14 ++++++--------
 include/oox/ole/axbinaryreader.hxx     |    2 +-
 sc/source/filter/excel/xepivot.cxx     |    6 +++++-
 sd/source/ui/view/outlview.cxx         |    2 +-
 6 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 42fcd888ae537152f9d59c03e945d4bf9aaeb7dd
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jul 1 12:20:22 2014 +0200

    coverity#735397 dead code
    
    Change-Id: If8d82a39af7a506f42b6c13d8408ffc479b564e7

diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index ec82700..1d8dc31 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4974,7 +4974,6 @@ OUString SbUnoStructRefObject::Impl_DumpProperties()
             // Is it in Uno a sequence?
             SbxDataType eType = pVar->GetFullType();
 
-            bool bMaybeVoid = false;
             OUString aName( pVar->GetName() );
             StructFieldInfo::iterator it = maFields.find( aName );
 
@@ -4991,10 +4990,7 @@ OUString SbUnoStructRefObject::Impl_DumpProperties()
                 }
             }
             aPropStr.append( Dbg_SbxDataType2String( eType ) );
-            if( bMaybeVoid )
-            {
-                aPropStr.appendAscii( "/void" );
-            }
+
             aPropStr.appendAscii( " " );
             aPropStr.append( pVar->GetName() );
 
commit 611b419562dbde945d532ce27d7233be5d55fda1
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jul 1 11:17:32 2014 +0200

    coverity#704299 Dead code
    
    Change-Id: I41d4c99216cc19302f2d65db1471cb49016a784a

diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 712dbe2..e6fe17e 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1033,7 +1033,7 @@ SdrTextObj* OutlineView::CreateOutlineTextObject(SdPage* pPage)
         // we already have a layout with a text but the text
         // object was deleted, create a new one
         pPage->InsertAutoLayoutShape( 0,
-                                      (eNewLayout == AUTOLAYOUT_TITLE) ? PRESOBJ_TEXT : PRESOBJ_OUTLINE,
+                                      PRESOBJ_OUTLINE,
                                       false, pPage->GetLayoutRect(), true );
     }
 
commit 691f0b3c387033e34bba4b6cb65f2ad1250ef818
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jul 1 11:12:02 2014 +0200

    coverity#704262 coverity#704263 Dead code
    
    Change-Id: I3f015ea89a9a542226d18d0d203eb493f08b46a0

diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 444cc5a..5878af8 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1712,14 +1712,18 @@ void XclExpPivotTable::WriteQsiSxTag( XclExpStream& rStrm ) const
     rStrm << nRecordType << nDummyFlags << nTableType;
 
     // General flags
+    sal_uInt16 nFlags = 0x0001;
+#if 0
+    // for doc purpose
+    sal_uInt16 nFlags = 0x0000;
     bool bEnableRefresh = true;
     bool bPCacheInvalid = false;
     bool bOlapPTReport  = false;
 
-    sal_uInt16 nFlags = 0x0000;
     if (bEnableRefresh) nFlags |= 0x0001;
     if (bPCacheInvalid) nFlags |= 0x0002;
     if (bOlapPTReport)  nFlags |= 0x0004;
+#endif
     rStrm << nFlags;
 
     // Feature-specific options.  The value differs depending on the table
commit 69ea62a069f89f5efae8d3cee93a64a4b7ba8ba8
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jul 1 10:33:46 2014 +0200

    coverity#703975 Unchecked return value
    
    Change-Id: Icef20c193a64b7de410e21124edaa4d0699d8a66

diff --git a/include/oox/ole/axbinaryreader.hxx b/include/oox/ole/axbinaryreader.hxx
index 1aff2a1..7905e98 100644
--- a/include/oox/ole/axbinaryreader.hxx
+++ b/include/oox/ole/axbinaryreader.hxx
@@ -131,7 +131,7 @@ public:
     void                skipIntProperty() { if( startNextProperty() ) maInStrm.skipAligned< StreamType >(); }
     /** Skips the next boolean property value in the stream, if the respective
         flag in the property mask is set. */
-    void                skipBoolProperty() { startNextProperty(); }
+    void                skipBoolProperty() { (void)startNextProperty(); }
     /** Skips the next pair property in the stream, if the respective flag in
         the property mask is set. */
     void                skipPairProperty() { readPairProperty( maDummyPairData ); }
commit 5371bc50c0ea931e9859186f0f05644bbdb51246
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jul 1 10:24:05 2014 +0200

    coverity#703963 Unchecked return value
    
    also avoid pointless double Guard
    
    Change-Id: Ie7707fc3baf46f9363fdef6213df098123183ab9

diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx
index 963a7fb..6e70b78 100644
--- a/fpicker/source/office/commonpicker.cxx
+++ b/fpicker/source/office/commonpicker.cxx
@@ -99,12 +99,12 @@ namespace svt
 
     void OCommonPicker::prepareDialog()
     {
-        if ( !getDialog() )
-            createPicker();
-
-        // set the title
-        if ( !m_aTitle.isEmpty() )
-            getDialog()->SetText( m_aTitle );
+        if(createPicker())
+        {
+            // set the title
+            if ( !m_aTitle.isEmpty() )
+                m_pDlg->SetText( m_aTitle );
+        }
     }
 
 
@@ -199,8 +199,6 @@ namespace svt
 
     bool OCommonPicker::createPicker()
     {
-        SolarMutexGuard aGuard;
-
         if ( !m_pDlg )
         {
             m_pDlg = implCreateDialog( VCLUnoHelper::GetWindow( m_xDialogParent ) );
commit 1f7a67083dddee3550e9dd6be8e0d592ed69d28b
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jul 1 09:59:11 2014 +0200

    coverity#703955 Unchecked return value
    
    Change-Id: If10c9643474620855e21caaa1fdcbbc4b7fd07ac

diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 6e431bd..42b032b 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -755,11 +755,13 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit )
             char pBuf[256];
             mnCurrentElement = mpVectorBox->GetValue()-1;
             double fValue;
-            mrSane.GetOptionValue( mnCurrentOption, fValue, mnCurrentElement );
-            sprintf( pBuf, "%g", fValue );
-            OUString aValue( pBuf, strlen(pBuf), osl_getThreadTextEncoding() );
-            mpNumericEdit->SetText( aValue );
-            mpQuantumRangeBox->SelectEntry( aValue );
+            if( mrSane.GetOptionValue( mnCurrentOption, fValue, mnCurrentElement ))
+            {
+                sprintf( pBuf, "%g", fValue );
+                OUString aValue( pBuf, strlen(pBuf), osl_getThreadTextEncoding() );
+                mpNumericEdit->SetText( aValue );
+                mpQuantumRangeBox->SelectEntry( aValue );
+            }
         }
         else if( pEdit == mpTopField )
         {


More information about the Libreoffice-commits mailing list