summaryrefslogtreecommitdiff
path: root/xmloff/source/chart
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-04 08:37:10 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-04 07:34:41 +0000
commit81824d135987712b57e3c81a26f72ae4fabb4031 (patch)
treef4268731e5af7b5c2658ecab0dcb7d2caa3c2a4d /xmloff/source/chart
parent62dbe2e6eb30660f252b4e2c048f4aecf28e41c6 (diff)
loplugin:stringconstant
Change-Id: I6cc11a273902da8acdb6adbccccc31fe30ab274e Reviewed-on: https://gerrit.libreoffice.org/19768 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff/source/chart')
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx38
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx48
-rw-r--r--xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx6
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx6
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx3
5 files changed, 35 insertions, 66 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index ed226f5d0e69..9ecdffe70b40 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -930,8 +930,7 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea
Reference< chart2::data::XDataSequence > xSequence( aSequences[nI]->getValues());
Reference< beans::XPropertySet > xSeqProp( xSequence, uno::UNO_QUERY_THROW );
OUString aRole;
- if( ( xSeqProp->getPropertyValue(
- OUString( "Role" )) >>= aRole ) &&
+ if( ( xSeqProp->getPropertyValue( "Role" ) >>= aRole ) &&
aRole.match( aRolePrefix ))
{
aResult.push_back( xSequence );
@@ -1311,8 +1310,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >&
Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
if( xPropSet.is())
{
- Any aAny( xPropSet->getPropertyValue(
- OUString( "String" )));
+ Any aAny( xPropSet->getPropertyValue( "String" ));
OUString aText;
aAny >>= aText;
exportText( aText );
@@ -1353,8 +1351,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >&
Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
if( xPropSet.is())
{
- Any aAny( xPropSet->getPropertyValue(
- OUString( "String" )));
+ Any aAny( xPropSet->getPropertyValue( "String" ));
OUString aText;
aAny >>= aText;
exportText( aText );
@@ -1889,11 +1886,9 @@ void SchXMLExportHelper_Impl::exportPlotArea(
{
bool bFirstCol = false, bFirstRow = false;
- aAny = xDocProp->getPropertyValue(
- OUString( "DataSourceLabelsInFirstColumn" ));
+ aAny = xDocProp->getPropertyValue( "DataSourceLabelsInFirstColumn" );
aAny >>= bFirstCol;
- aAny = xDocProp->getPropertyValue(
- OUString( "DataSourceLabelsInFirstRow" ));
+ aAny = xDocProp->getPropertyValue( "DataSourceLabelsInFirstRow" );
aAny >>= bFirstRow;
if( bFirstCol || bFirstRow )
@@ -2182,8 +2177,7 @@ void SchXMLExportHelper_Impl::exportAxisTitle( const Reference< beans::XProperty
if( bExportContent )
{
OUString aText;
- Any aAny( rTitleProps->getPropertyValue(
- OUString( "String" )));
+ Any aAny( rTitleProps->getPropertyValue( "String" ));
aAny >>= aText;
Reference< drawing::XShape > xShape( rTitleProps, uno::UNO_QUERY );
@@ -2666,12 +2660,10 @@ void SchXMLExportHelper_Impl::exportSeries(
// determine attached axis
try
{
- Any aAny( xPropSet->getPropertyValue(
- OUString( "Axis" )));
+ Any aAny( xPropSet->getPropertyValue( "Axis" ));
aAny >>= nAttachedAxis;
- aAny = xPropSet->getPropertyValue(
- OUString( "MeanValue" ));
+ aAny = xPropSet->getPropertyValue( "MeanValue" );
aAny >>= bHasMeanValueLine;
}
catch( const beans::UnknownPropertyException & rEx )
@@ -2827,8 +2819,7 @@ void SchXMLExportHelper_Impl::exportSeries(
Reference< beans::XPropertySet > xStatProp;
try
{
- Any aPropAny( xPropSet->getPropertyValue(
- OUString( "DataMeanValueProperties" )));
+ Any aPropAny( xPropSet->getPropertyValue( "DataMeanValueProperties" ));
aPropAny >>= xStatProp;
}
catch( const uno::Exception & rEx )
@@ -3009,7 +3000,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
// export position
chart2::RelativePosition aRelativePosition;
- if( xEquationProperties->getPropertyValue(OUString( "RelativePosition")) >>= aRelativePosition )
+ if( xEquationProperties->getPropertyValue( "RelativePosition" ) >>= aRelativePosition )
{
double fX = aRelativePosition.Primary * rPageSize.Width;
double fY = aRelativePosition.Secondary * rPageSize.Height;
@@ -3628,8 +3619,7 @@ void SchXMLExport::_ExportContent()
Reference< lang::XServiceInfo > xServ( xChartDoc, uno::UNO_QUERY );
if( xServ.is())
{
- if( xServ->supportsService(
- OUString( "com.sun.star.chart.ChartTableAddressSupplier" )))
+ if( xServ->supportsService( "com.sun.star.chart.ChartTableAddressSupplier" ))
{
Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY );
if( xProp.is())
@@ -3638,14 +3628,12 @@ void SchXMLExport::_ExportContent()
try
{
OUString sChartAddress;
- aAny = xProp->getPropertyValue(
- OUString( "ChartRangeAddress" ));
+ aAny = xProp->getPropertyValue( "ChartRangeAddress" );
aAny >>= sChartAddress;
maExportHelper->m_pImpl->SetChartRangeAddress( sChartAddress );
OUString sTableNumberList;
- aAny = xProp->getPropertyValue(
- OUString( "TableNumberList" ));
+ aAny = xProp->getPropertyValue( "TableNumberList" );
aAny >>= sTableNumberList;
maExportHelper->m_pImpl->SetTableNumberList( sTableNumberList );
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 58a5644294e6..6b5a4a22ccaa 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -189,32 +189,20 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext(
{
try
{
- xProp->setPropertyValue(
- OUString( "HasXAxis" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasXAxisGrid" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasXAxisDescription" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasSecondaryXAxis" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasSecondaryXAxisDescription" ), aFalseBool );
-
- xProp->setPropertyValue(
- OUString( "HasYAxis" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasYAxisGrid" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasYAxisDescription" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasSecondaryYAxis" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasSecondaryYAxisDescription" ), aFalseBool );
-
- xProp->setPropertyValue(
- OUString( "HasZAxis" ), aFalseBool );
- xProp->setPropertyValue(
- OUString( "HasZAxisDescription" ), aFalseBool );
+ xProp->setPropertyValue("HasXAxis", aFalseBool );
+ xProp->setPropertyValue("HasXAxisGrid", aFalseBool );
+ xProp->setPropertyValue("HasXAxisDescription", aFalseBool );
+ xProp->setPropertyValue("HasSecondaryXAxis", aFalseBool );
+ xProp->setPropertyValue("HasSecondaryXAxisDescription", aFalseBool );
+
+ xProp->setPropertyValue("HasYAxis", aFalseBool );
+ xProp->setPropertyValue("HasYAxisGrid", aFalseBool );
+ xProp->setPropertyValue("HasYAxisDescription", aFalseBool );
+ xProp->setPropertyValue("HasSecondaryYAxis", aFalseBool );
+ xProp->setPropertyValue("HasSecondaryYAxisDescription", aFalseBool );
+
+ xProp->setPropertyValue("HasZAxis", aFalseBool );
+ xProp->setPropertyValue("HasZAxisDescription", aFalseBool );
uno::Any aAny;
chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
@@ -296,14 +284,10 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
{
uno::Any aAny;
aAny <<= mrColHasLabels;
- xDocProp->setPropertyValue(
- OUString( "DataSourceLabelsInFirstColumn" ),
- aAny );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", aAny );
aAny <<= mrRowHasLabels;
- xDocProp->setPropertyValue(
- OUString( "DataSourceLabelsInFirstRow" ),
- aAny );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", aAny );
}
catch( const beans::UnknownPropertyException & )
{
diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
index 598d89b89b63..8b723e371a9e 100644
--- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
+++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
@@ -188,15 +188,15 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri
pPropStyleContext->FillPropertySet( xEqationProperties );
}
}
- xEqationProperties->setPropertyValue( OUString( "ShowEquation"), uno::makeAny( bShowEquation ));
- xEqationProperties->setPropertyValue( OUString( "ShowCorrelationCoefficient"), uno::makeAny( bShowRSquare ));
+ xEqationProperties->setPropertyValue( "ShowEquation", uno::makeAny( bShowEquation ));
+ xEqationProperties->setPropertyValue( "ShowCorrelationCoefficient", uno::makeAny( bShowRSquare ));
if( bHasXPos && bHasYPos )
{
chart2::RelativePosition aRelPos;
aRelPos.Primary = static_cast< double >( aPosition.X ) / static_cast< double >( maChartSize.Width );
aRelPos.Secondary = static_cast< double >( aPosition.Y ) / static_cast< double >( maChartSize.Height );
- xEqationProperties->setPropertyValue( OUString( "RelativePosition" ), uno::makeAny( aRelPos ));
+ xEqationProperties->setPropertyValue( "RelativePosition", uno::makeAny( aRelPos ));
}
mrRegressionStyle.m_xEquationProperties.set( xEqationProperties );
}
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index a7178769d7d3..fae7430bb3d3 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -985,12 +985,10 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
switch( iStyle->meType )
{
case DataRowPointStyle::MEAN_VALUE:
- xSeriesProp->getPropertyValue(
- OUString( "DataMeanValueProperties" )) >>= xStatPropSet;
+ xSeriesProp->getPropertyValue("DataMeanValueProperties") >>= xStatPropSet;
break;
case DataRowPointStyle::ERROR_INDICATOR:
- xSeriesProp->getPropertyValue(
- OUString( "DataErrorProperties" )) >>= xStatPropSet;
+ xSeriesProp->getPropertyValue("DataErrorProperties") >>= xStatPropSet;
break;
default:
break;
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 8b58f4cb5a70..409e1f623884 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -895,8 +895,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
{
Reference< beans::XPropertySet > xOldSequenceProp( aLSeqIt->second->getValues(), uno::UNO_QUERY );
Reference< chart2::data::XDataSequence > xNewSequence(
- xDataProv->createDataSequenceByRangeRepresentation(
- OUString("categories")));
+ xDataProv->createDataSequenceByRangeRepresentation("categories"));
SchXMLTools::copyProperties(
xOldSequenceProp, Reference< beans::XPropertySet >( xNewSequence, uno::UNO_QUERY ));
aLSeqIt->second->setValues( xNewSequence );