summaryrefslogtreecommitdiff
path: root/oox/source/export
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-25 18:20:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-26 08:56:47 +0200
commit979c8c56b7d52fe9a5d4b1fbfdab0adaba04c470 (patch)
treede5942b227fb6f441e1f36878a030a1b13601ba0 /oox/source/export
parentc2d139d8fa92e44baf592cd8ce644dc66356e143 (diff)
loplugin:oncevar in oox..sax
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2 Reviewed-on: https://gerrit.libreoffice.org/39238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/export')
-rw-r--r--oox/source/export/ColorPropertySet.cxx3
-rw-r--r--oox/source/export/chartexport.cxx15
-rw-r--r--oox/source/export/shapes.cxx3
3 files changed, 7 insertions, 14 deletions
diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx
index 768763bf91d4..ec25b10c3c49 100644
--- a/oox/source/export/ColorPropertySet.cxx
+++ b/oox/source/export/ColorPropertySet.cxx
@@ -120,8 +120,7 @@ uno::Any SAL_CALL ColorPropertySet::getPropertyValue( const OUString& aPropertyN
{
if( aPropertyName == "FillStyle" && m_bIsFillColor )
{
- css::drawing::FillStyle aFillStyle = css::drawing::FillStyle_SOLID;
- return uno::makeAny(aFillStyle);
+ return uno::makeAny(css::drawing::FillStyle_SOLID);
}
else if (aPropertyName == m_aColorPropName)
return uno::makeAny( m_nColor );
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index d893cc678cb8..2d2d5fdd3536 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -781,8 +781,7 @@ void ChartExport::exportExternalData( const Reference< css::chart::XChartDocumen
// Converting absolute path to relative path.
if( externalDataPath[ 0 ] != '.' && externalDataPath[ 1 ] != '.')
{
- sal_Int32 nStartPos = 0;
- sal_Int32 nSepPos = externalDataPath.indexOf( '/', nStartPos );
+ sal_Int32 nSepPos = externalDataPath.indexOf( '/', 0 );
if( nSepPos > 0)
{
relationPath = relationPath.copy( nSepPos, ::std::max< sal_Int32 >( externalDataPath.getLength(), 0 ) - nSepPos );
@@ -1630,9 +1629,8 @@ void ChartExport::exportDoughnutChart( const Reference< chart2::XChartType >& xC
// firstSliceAng
exportFirstSliceAng( );
//FIXME: holeSize
- sal_Int32 nHoleSize = 50;
pFS->singleElement( FSNS( XML_c, XML_holeSize ),
- XML_val, I32S( nHoleSize ),
+ XML_val, I32S( 50 ),
FSEND );
pFS->endElement( FSNS( XML_c, XML_doughnutChart ) );
@@ -1876,9 +1874,8 @@ void ChartExport::exportUpDownBars( const Reference< chart2::XChartType >& xChar
pFS->startElement( FSNS( XML_c, XML_upDownBars ),
FSEND );
// TODO: gapWidth
- sal_Int32 nGapWidth = 150;
pFS->singleElement( FSNS( XML_c, XML_gapWidth ),
- XML_val, I32S( nGapWidth ),
+ XML_val, I32S( 150 ),
FSEND );
Reference< beans::XPropertySet > xChartPropSet = xChartPropProvider->getUpBar();
@@ -2626,9 +2623,8 @@ void ChartExport::_exportAxis(
if( bLogarithmic )
{
// default value is 10?
- sal_Int32 nLogBase = 10;
pFS->singleElement( FSNS( XML_c, XML_logBase ),
- XML_val, I32S( nLogBase ),
+ XML_val, I32S( 10 ),
FSEND );
}
}
@@ -2871,9 +2867,8 @@ void ChartExport::_exportAxis(
}
// FIXME: seems not support? lblOffset
- sal_Int32 nLblOffset = 100;
pFS->singleElement( FSNS( XML_c, XML_lblOffset ),
- XML_val, I32S( nLblOffset ),
+ XML_val, I32S( 100 ),
FSEND );
}
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 4775b1bfb901..ff909e7bc625 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -970,9 +970,8 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV );
if( nAdjustmentValuesIndex != -1 )
{
- sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0;
WritePresetShape( sPresetShape, eShapeType, bPredefinedHandlesUsed,
- nAdjustmentsWhichNeedsToBeConverted, aGeometrySeq[ nAdjustmentValuesIndex ] );
+ 0/*nAdjustmentsWhichNeedsToBeConverted*/, aGeometrySeq[ nAdjustmentValuesIndex ] );
}
else
WritePresetShape( sPresetShape );