summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-12 15:10:21 +0200
committerNoel Grandin <noel@peralex.com>2015-08-14 11:11:14 +0200
commit1656a7ff431df8e1d65698953051086fbf90a266 (patch)
tree9e9fb9994d046f36ada637f5e600bd83fbbb84bd /oox
parent9e1d98fec2884e4c401aa0d5396612aa01773dc8 (diff)
loplugin: defaultparams
Change-Id: Iabcea466cb23e7a7a432f953cc03aaa1c2dc1d65
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx28
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.cxx2
-rw-r--r--oox/source/drawingml/effectproperties.cxx2
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx4
-rw-r--r--oox/source/dump/dumperbase.cxx2
-rw-r--r--oox/source/export/drawingml.cxx2
-rw-r--r--oox/source/export/shapes.cxx12
-rw-r--r--oox/source/helper/textinputstream.cxx6
-rw-r--r--oox/source/helper/zipstorage.cxx3
-rw-r--r--oox/source/vml/vmlformatting.cxx2
10 files changed, 31 insertions, 32 deletions
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index b8857c02b9cb..256fcec3973e 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -647,8 +647,8 @@ public:
AdjPoint2DContext::AdjPoint2DContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
: ContextHandler2( rParent )
{
- rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_x ).get(), true );
- rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_y ).get(), true );
+ rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_x ).get() );
+ rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_y ).get() );
}
// CT_XYAdjustHandle
@@ -675,11 +675,11 @@ XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper& rParent, co
}
if ( rAttribs.hasAttribute( XML_minX ) )
{
- mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, aEmptyDefault ), true );
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, aEmptyDefault ) );
}
if ( rAttribs.hasAttribute( XML_maxX ) )
{
- mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, aEmptyDefault ), true );
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, aEmptyDefault ) );
}
if ( rAttribs.hasAttribute( XML_gdRefY ) )
{
@@ -687,11 +687,11 @@ XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper& rParent, co
}
if ( rAttribs.hasAttribute( XML_minY ) )
{
- mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, aEmptyDefault ), true );
+ mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, aEmptyDefault ) );
}
if ( rAttribs.hasAttribute( XML_maxY ) )
{
- mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, aEmptyDefault ), true );
+ mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, aEmptyDefault ) );
}
}
@@ -726,11 +726,11 @@ PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler2Helper& rPare
}
if ( rAttribs.hasAttribute( XML_minR ) )
{
- mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, aEmptyDefault ), true );
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, aEmptyDefault ) );
}
if ( rAttribs.hasAttribute( XML_maxR ) )
{
- mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, aEmptyDefault ), true );
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, aEmptyDefault ) );
}
if ( rAttribs.hasAttribute( XML_gdRefAng ) )
{
@@ -1063,8 +1063,8 @@ ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken,
EnhancedCustomShapeParameterPair aScale;
EnhancedCustomShapeParameterPair aAngles;
- aScale.First = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_wR ).get(), true );
- aScale.Second = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_hR ).get(), true );
+ aScale.First = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_wR ).get() );
+ aScale.Second = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_hR ).get() );
CustomShapeGuide aGuide;
sal_Int32 nArcNum = mrCustomShapeProperties.getArcNum();
@@ -1194,10 +1194,10 @@ ContextHandlerRef CustomShapeGeometryContext::onCreateContext( sal_Int32 aElemen
case A_TOKEN( rect ): // CT_GeomRectList geometry rect list
{
GeomRect aGeomRect;
- aGeomRect.l = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_l ).get(), true );
- aGeomRect.t = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_t ).get(), true );
- aGeomRect.r = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_r ).get(), true );
- aGeomRect.b = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_b ).get(), true );
+ aGeomRect.l = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_l ).get() );
+ aGeomRect.t = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_t ).get() );
+ aGeomRect.r = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_r ).get() );
+ aGeomRect.b = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_b ).get() );
mrCustomShapeProperties.getTextRect() = aGeomRect;
}
break;
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
index 88b69f2d2bfe..f3868f1c9b0f 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
@@ -50,7 +50,7 @@ DiagramDefinitionContext::~DiagramDefinitionContext()
{
LayoutNodePtr node = mpLayout->getNode();
if (node)
- node->dump(0);
+ node->dump();
}
ContextHandlerRef
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx
index 88638b88ab16..3fd388215665 100644
--- a/oox/source/drawingml/effectproperties.cxx
+++ b/oox/source/drawingml/effectproperties.cxx
@@ -56,7 +56,7 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
rPropMap.setProperty( PROP_Shadow, true );
rPropMap.setProperty( PROP_ShadowXDistance, nXDist);
rPropMap.setProperty( PROP_ShadowYDistance, nYDist);
- rPropMap.setProperty( PROP_ShadowColor, it->moColor.getColor(rGraphicHelper, -1 ) );
+ rPropMap.setProperty( PROP_ShadowColor, it->moColor.getColor(rGraphicHelper ) );
rPropMap.setProperty( PROP_ShadowTransparence, it->moColor.getTransparency());
}
}
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index 8dfb90c61e94..dc4f79cb13a7 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -80,10 +80,10 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper& rParent,
// ppaction://program
const OUString sPPAction( "ppaction://" );
- if ( aAction.matchIgnoreAsciiCase( sPPAction, 0 ) )
+ if ( aAction.matchIgnoreAsciiCase( sPPAction ) )
{
OUString aPPAct( aAction.copy( sPPAction.getLength() ) );
- sal_Int32 nIndex = aPPAct.indexOf( '?', 0 );
+ sal_Int32 nIndex = aPPAct.indexOf( '?' );
OUString aPPAction( nIndex > 0 ? aPPAct.copy( 0, nIndex ) : aPPAct );
const OUString sHlinkshowjump( "hlinkshowjump" );
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 7c215514b413..046f7dc4f33b 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1092,7 +1092,7 @@ OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const
{
OUStringBuffer aUnknown( OOX_DUMP_UNKNOWN );
aUnknown.append( OOX_DUMP_ITEMSEP );
- StringHelper::appendShortHex( aUnknown, nKey, true );
+ StringHelper::appendShortHex( aUnknown, nKey );
StringHelper::enclose( aUnknown, '(', ')' );
StringHelper::appendToken( aName, aUnknown.makeStringAndClear() );
}
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index b5ef21f8b190..01d5cd00ac27 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3271,7 +3271,7 @@ OString DrawingML::WriteWdpPicture( const OUString& rFileId, const Sequence< sal
sId = mpFB->addRelation( mpFS->getOutputStream(),
"http://schemas.microsoft.com/office/2007/relationships/hdphoto",
- sFileName, false );
+ sFileName );
maWdpCache[rFileId] = sId;
return OUStringToOString( sId, RTL_TEXTENCODING_UTF8 );
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 158de6bdfe22..f9072e4b7278 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -487,9 +487,9 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
// moon is flipped in MSO, and mso-spt89 (right up arrow) is mapped to leftUpArrow
if ( sShapeType == "moon" || sShapeType == "mso-spt89" )
- WriteShapeTransformation( xShape, XML_a, !bFlipH, bFlipV, false);
+ WriteShapeTransformation( xShape, XML_a, !bFlipH, bFlipV );
else
- WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV, false);
+ WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV );
// we export non-primitive shapes to custom geometry
// we also export non-ooxml shapes which have handles/equations to custom geometry, because
@@ -576,7 +576,7 @@ ShapeExport& ShapeExport::WriteEllipseShape( Reference< XShape > xShape )
// visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
- WriteShapeTransformation( xShape, XML_a, false, false, false);
+ WriteShapeTransformation( xShape, XML_a, false, false);
WritePresetShape( "ellipse" );
Reference< XPropertySet > xProps( xShape, UNO_QUERY );
if( xProps.is() )
@@ -684,7 +684,7 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const
// visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
- WriteShapeTransformation( xShape, XML_a, false, false, false);
+ WriteShapeTransformation( xShape, XML_a, false, false);
WritePresetShape( "rect" );
// graphic object can come with the frame (bnc#654525)
WriteOutline( xShapeProps );
@@ -897,7 +897,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
// visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
- WriteShapeTransformation( xShape, XML_a, false, false, false);
+ WriteShapeTransformation( xShape, XML_a, false, false);
WritePresetShape( "rect" );
Reference< XPropertySet > xProps( xShape, UNO_QUERY );
if( xProps.is() )
@@ -1338,7 +1338,7 @@ ShapeExport& ShapeExport::WriteTextShape( Reference< XShape > xShape )
// visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
- WriteShapeTransformation( xShape, XML_a, false, false, false);
+ WriteShapeTransformation( xShape, XML_a, false, false);
WritePresetShape( "rect" );
uno::Reference<beans::XPropertySet> xPropertySet(xShape, UNO_QUERY);
WriteBlipOrNormalFill(xPropertySet, "GraphicURL");
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index d5e7894e49c5..b292e563f72d 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -70,21 +70,21 @@ sal_Int32 SAL_CALL UnoBinaryInputStream::readBytes( Sequence< sal_Int8 >& rData,
throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
ensureConnected();
- return mpInStrm->readData( rData, nBytesToRead, 1 );
+ return mpInStrm->readData( rData, nBytesToRead );
}
sal_Int32 SAL_CALL UnoBinaryInputStream::readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead )
throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
ensureConnected();
- return mpInStrm->readData( rData, nMaxBytesToRead, 1 );
+ return mpInStrm->readData( rData, nMaxBytesToRead );
}
void SAL_CALL UnoBinaryInputStream::skipBytes( sal_Int32 nBytesToSkip )
throw (NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
ensureConnected();
- mpInStrm->skip( nBytesToSkip, 1 );
+ mpInStrm->skip( nBytesToSkip );
}
sal_Int32 SAL_CALL UnoBinaryInputStream::available() throw (NotConnectedException, IOException, RuntimeException, std::exception)
diff --git a/oox/source/helper/zipstorage.cxx b/oox/source/helper/zipstorage.cxx
index d535ac63fe0a..dc9865461a68 100644
--- a/oox/source/helper/zipstorage.cxx
+++ b/oox/source/helper/zipstorage.cxx
@@ -58,8 +58,7 @@ ZipStorage::ZipStorage( const Reference< XComponentContext >& rxContext, const R
implementation of relations handling.
*/
mxStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
- ZIP_STORAGE_FORMAT_STRING, rxInStream, rxContext,
- false ); // DEV300_m80: Was sal_True, but DOCX and others did not load
+ ZIP_STORAGE_FORMAT_STRING, rxInStream, rxContext );
}
catch (Exception const& e)
{
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 6dcbf3e4c378..1d1dedbe0b65 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -219,7 +219,7 @@ Color ConversionHelper::decodeColor( const GraphicHelper& rGraphicHelper,
sal_Int32 nColorToken = AttributeConversion::decodeToken( aColorName );
sal_Int32 nRgbValue = Color::getVmlPresetColor( nColorToken, API_RGB_TRANSPARENT );
if( nRgbValue == API_RGB_TRANSPARENT )
- nRgbValue = rGraphicHelper.getSystemColor( nColorToken, API_RGB_TRANSPARENT );
+ nRgbValue = rGraphicHelper.getSystemColor( nColorToken );
if( nRgbValue != API_RGB_TRANSPARENT )
{
aDmlColor.setSrgbClr( nRgbValue );