summaryrefslogtreecommitdiff
path: root/xmloff/source/chart
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerNoel Grandin <noel@peralex.com>2016-05-04 12:39:40 +0200
commit58a32075ca4f457f570af75aef368dd6c389aca7 (patch)
treee437dcbdeb248b4316cb8a9281d1543419853f6d /xmloff/source/chart
parent7d47700972d267fe7c5270c5dadd45a523a2baec (diff)
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'xmloff/source/chart')
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx8
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx12
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx4
3 files changed, 6 insertions, 18 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index f77ee8d544f1..5cc699f61c38 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -684,9 +684,7 @@ void SchXMLChartContext::EndElement()
{
try
{
- uno::Any aAny;
- aAny <<= maMainTitle;
- xTitleProp->setPropertyValue("String", aAny );
+ xTitleProp->setPropertyValue("String", uno::Any(maMainTitle) );
}
catch(const beans::UnknownPropertyException&)
{
@@ -701,9 +699,7 @@ void SchXMLChartContext::EndElement()
{
try
{
- uno::Any aAny;
- aAny <<= maSubTitle;
- xTitleProp->setPropertyValue("String", aAny );
+ xTitleProp->setPropertyValue("String", uno::Any(maSubTitle) );
}
catch(const beans::UnknownPropertyException&)
{
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 6e59f831f0eb..04b31d872bad 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -204,10 +204,8 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext(
xProp->setPropertyValue("HasZAxis", aFalseBool );
xProp->setPropertyValue("HasZAxisDescription", aFalseBool );
- uno::Any aAny;
chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
- aAny <<= eSource;
- xProp->setPropertyValue("DataRowSource", aAny );
+ xProp->setPropertyValue("DataRowSource", uno::Any(eSource) );
}
catch( const beans::UnknownPropertyException & )
{
@@ -282,12 +280,8 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
{
try
{
- uno::Any aAny;
- aAny <<= mrColHasLabels;
- xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", aAny );
-
- aAny <<= mrRowHasLabels;
- xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", aAny );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", uno::Any(mrColHasLabels) );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", uno::Any(mrRowHasLabels) );
}
catch( const beans::UnknownPropertyException & )
{
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index d3421909be04..a3fc7a829948 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -82,10 +82,8 @@ void lcl_NumberFormatStyleToProperty( const OUString& rStyleName, const OUString
XML_STYLE_FAMILY_DATA_STYLE, rStyleName, true ));
if( pStyle )
{
- uno::Any aNumberFormat;
sal_Int32 nNumberFormat = const_cast<SvXMLNumFormatContext*>(pStyle)->GetKey();
- aNumberFormat <<= nNumberFormat;
- rPropSet->setPropertyValue( rPropertyName, aNumberFormat );
+ rPropSet->setPropertyValue( rPropertyName, uno::Any(nNumberFormat) );
}
}
}