[Libreoffice-commits] core.git: oox/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 19 14:56:32 UTC 2018
oox/source/export/chartexport.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit d633d8455aff440a5b573cfa34557c7310e688a1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 19 14:54:57 2018 +0000
refactor to look prettier
Change-Id: I3bf7ce76516f7c930e564791109ff72fb5b87d52
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<chart2::RelativePosition>();
- uno::Any aRelativeSize = xProp->getPropertyValue("RelativeSize");
- chart2::RelativeSize aSize;
- if (aRelativeSize.hasValue())
- aSize = aRelativeSize.get<chart2::RelativeSize>();
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<chart2::RelativeSize>();
+
+ const double w = aSize.Primary;
+ const double h = aSize.Secondary;
+
pFS->singleElement(FSNS(XML_c, XML_w),
XML_val, IS(w),
FSEND);
More information about the Libreoffice-commits
mailing list