From d633d8455aff440a5b573cfa34557c7310e688a1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 19 Jan 2018 14:54:57 +0000 Subject: refactor to look prettier Change-Id: I3bf7ce76516f7c930e564791109ff72fb5b87d52 --- oox/source/export/chartexport.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'oox') diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 72cfae098c67..0f33bf708a86 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -862,15 +862,9 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x XML_val, "edge", FSEND); chart2::RelativePosition aPos = aRelativePos.get(); - uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize"); - chart2::RelativeSize aSize; - if (aRelativeSize.hasValue()) - aSize = aRelativeSize.get(); const double x = aPos.Primary; const double y = aPos.Secondary; - const double w = aSize.Primary; - const double h = aSize.Secondary; pFS->singleElement(FSNS(XML_c, XML_x), XML_val, IS(x), @@ -879,8 +873,14 @@ void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& x XML_val, IS(y), FSEND); + uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize"); if (aRelativeSize.hasValue()) { + chart2::RelativeSize aSize = aRelativeSize.get(); + + const double w = aSize.Primary; + const double h = aSize.Secondary; + pFS->singleElement(FSNS(XML_c, XML_w), XML_val, IS(w), FSEND); -- cgit