[Libreoffice-commits] .: oox/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sun Jun 12 14:18:36 PDT 2011


 oox/source/drawingml/chart/objectformatter.cxx |    6 +++---
 oox/source/drawingml/customshapegeometry.cxx   |    2 +-
 oox/source/drawingml/table/tableproperties.cxx |    2 +-
 oox/source/drawingml/textrun.cxx               |    4 ++--
 oox/source/ppt/timenodelistcontext.cxx         |    2 +-
 oox/source/xls/formulaparser.cxx               |    5 +++--
 oox/source/xls/sheetdatabuffer.cxx             |    4 ++--
 7 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 066be9664e938a9162c94ebf27b9f4c1f5b1bf39
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jun 12 23:18:17 2011 +0200

    Some cppcheck cleaning+1TODO (func not implemented)

diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 56f56c5..abd2819 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -676,7 +676,7 @@ public:
     void                convertFormatting(
                             ShapePropertyMap& rPropMap,
                             const ModelRef< Shape >& rxShapeProp,
-                            sal_Int32 nSeriesIdx );
+                            sal_Int32 nSeriesIdx ) const;
 };
 
 // ----------------------------------------------------------------------------
@@ -931,8 +931,8 @@ EffectFormatter::EffectFormatter( ObjectFormatterData& rData, const AutoFormatEn
     DetailFormatterBase( rData, pAutoFormatEntry )
 {
 }
-
-void EffectFormatter::convertFormatting( ShapePropertyMap& /*rPropMap*/, const ModelRef< Shape >& /*rxShapeProp*/, sal_Int32 /*nSeriesIdx*/ )
+//TODO :
+void EffectFormatter::convertFormatting( ShapePropertyMap& /*rPropMap*/, const ModelRef< Shape >& /*rxShapeProp*/, sal_Int32 /*nSeriesIdx*/ ) const
 {
 }
 
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index fe39cf4..33ee37b 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -483,7 +483,7 @@ static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapePro
     while ( nIndex >= 0 );
 
     rtl::OUString aEquation;
-    if ( aTokens.size() )
+    if ( !aTokens.empty() )
     {
         sal_Int32 i, nParameters = aTokens.size() - 1;
         if ( nParameters > 3 )
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index 31d1208..cd07f7f 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -128,7 +128,7 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt
                 pTableStyle = &const_cast< TableStyle& >( *aIter );
                 break;	// we get the correct style
             }
-            aIter++;
+            ++aIter;
         }
     }
     if ( !pTableStyle )
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 705a464..7a9d616 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -83,13 +83,13 @@ sal_Int32 TextRun::insertAt(
             else
             {
                 OUString aLatinFontName, aSymbolFontName;
-                sal_Int16 nLatinFontPitch = 0, nSymbolFontPitch = 0;
-                sal_Int16 nLatinFontFamily = 0, nSymbolFontFamily = 0;
+                sal_Int16 nSymbolFontFamily = 0, nSymbolFontPitch = 0;
 
                 if ( !aTextCharacterProps.maSymbolFont.getFontData( aSymbolFontName, nSymbolFontPitch, nSymbolFontFamily, rFilterBase ) )
                     xText->insertString( xStart, getText(), sal_False );
                 else if ( getText().getLength() )
                 {	// !!#i113673<<<
+                    sal_Int16 nLatinFontPitch = 0, nLatinFontFamily = 0;
                     aTextCharacterProps.maLatinFont.getFontData( aLatinFontName, nLatinFontPitch, nLatinFontFamily, rFilterBase );
 
                     sal_Int32 nIndex = 0;
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index 8d4b3e6..00d5cac 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -647,7 +647,7 @@ namespace oox { namespace ppt {
 
                     NodePropertyMap & aProps( mpNode->getNodeProperties() );
                     end = maTavList.end();
-                    for(iter = maTavList.begin(), i=0; iter != end; iter++,i++)
+                    for(iter = maTavList.begin(), i=0; iter != end; ++iter,++i)
                     {
                         // TODO what to do if it is Timing_INFINITE ?
                         Any aTime = GetTimeAnimateValueTime( iter->msTime );
diff --git a/oox/source/xls/formulaparser.cxx b/oox/source/xls/formulaparser.cxx
index 41d507e..7fa0129 100644
--- a/oox/source/xls/formulaparser.cxx
+++ b/oox/source/xls/formulaparser.cxx
@@ -593,6 +593,7 @@ FormulaParserImpl::FormulaParserImpl( const FormulaParser& rParent ) :
     mnMaxXlsRow( rParent.getAddressConverter().getMaxXlsAddress().Row ),
     mbRelativeAsOffset( false ),
     mb2dRefsAs3dRefs( false ),
+    mbSpecialTokens( false ),
     mbAllowNulChars( false )
 {
     // reserve enough space to make resize(), push_back() etc. cheap
@@ -1669,7 +1670,7 @@ bool OoxFormulaParserImpl::importArrayToken( SequenceInputStream& rStrm )
                     appendRawToken( OPCODE_PUSH ) <<= BiffHelper::readString( rStrm, false );
                 break;
                 case BIFF_TOK_ARRAY_BOOL:
-                    appendRawToken( OPCODE_PUSH ) <<= static_cast< double >( (rStrm.readuInt8() == BIFF_TOK_BOOL_FALSE) ? 0.0 : 1.0 );
+                    appendRawToken( OPCODE_PUSH ) <<= (static_cast< double >( (rStrm.readuInt8() == BIFF_TOK_BOOL_FALSE) ? 0.0 : 1.0 ));
                 break;
                 case BIFF_TOK_ARRAY_ERROR:
                     appendRawToken( OPCODE_PUSH ) <<= BiffHelper::calcDoubleFromError( rStrm.readuInt8() );
@@ -2386,7 +2387,7 @@ bool BiffFormulaParserImpl::importArrayToken( BiffInputStream& rStrm )
                         rStrm.readByteStringUC( false, getTextEncoding(), mbAllowNulChars );
                 break;
                 case BIFF_DATATYPE_BOOL:
-                    appendRawToken( OPCODE_PUSH ) <<= static_cast< double >( (rStrm.readuInt8() == BIFF_TOK_BOOL_FALSE) ? 0.0 : 1.0 );
+                    appendRawToken( OPCODE_PUSH ) <<= (static_cast< double >( (rStrm.readuInt8() == BIFF_TOK_BOOL_FALSE) ? 0.0 : 1.0 ));
                     rStrm.skip( 7 );
                 break;
                 case BIFF_DATATYPE_ERROR:
diff --git a/oox/source/xls/sheetdatabuffer.cxx b/oox/source/xls/sheetdatabuffer.cxx
index d97b382..b465207 100755
--- a/oox/source/xls/sheetdatabuffer.cxx
+++ b/oox/source/xls/sheetdatabuffer.cxx
@@ -545,7 +545,7 @@ void SheetDataBuffer::finalizeImport()
     // write default formatting of remaining row range
     writeXfIdRowRangeProperties( maXfIdRowRange );
 
-    for( XfIdRangeListMap::const_iterator aIt = maXfIdRangeLists.begin(), aEnd = maXfIdRangeLists.end(); aIt != aEnd; aIt++ )
+    for( XfIdRangeListMap::const_iterator aIt = maXfIdRangeLists.begin(), aEnd = maXfIdRangeLists.end(); aIt != aEnd; ++aIt )
         writeXfIdRangeListProperties( aIt->first.first, aIt->first.second, aIt->second );
 
     // merge all cached merged ranges and update right/bottom cell borders
@@ -824,7 +824,7 @@ void SheetDataBuffer::setCellFormat( const CellModel& rModel, sal_Int32 nNumFmtI
             }
             else
                 break;
-            aItM++;
+            ++aItM;
         }
 
         // update merged ranges for 'center across selection' and 'fill'


More information about the Libreoffice-commits mailing list