diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2018-03-02 10:39:33 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-19 10:20:33 +0100 |
commit | b87dee0394f3159c690aa2b7756ab930566fe961 (patch) | |
tree | a60d2944fdbba7fbf9981aa133f4a3d81054fe34 /oox/source | |
parent | bdc8127c4ec3c62da63e7cbafe07b76b32b58f18 (diff) |
tdf#116163: Limit label height in chart if needed
Change-Id: Ia84fd0c3b76886bc6124dc3b59035465aa31b020
Reviewed-on: https://gerrit.libreoffice.org/50700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/50830
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 87d8df83efd210a322b42f590aaff3d2e8efe2bc)
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/chartexport.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 4e789f9b3c97..2456b6c0dca0 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2270,11 +2270,25 @@ void ChartExport::exportShapeProps( const Reference< XPropertySet >& xPropSet ) pFS->endElement( FSNS( XML_c, XML_spPr ) ); } -void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet) +void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet, bool bAxis) { FSHelperPtr pFS = GetFS(); pFS->startElement(FSNS(XML_c, XML_txPr), FSEND); - pFS->singleElement( FSNS( XML_a, XML_bodyPr ), FSEND ); + + sal_Int32 nRotation = 0; + if (bAxis) + { + double fTextRotation = 0; + uno::Any aAny = xPropSet->getPropertyValue("TextRotation"); + if (aAny.hasValue() && (aAny >>= fTextRotation)) + nRotation = fTextRotation * -600.0; + } + + if (nRotation) + pFS->singleElement(FSNS(XML_a, XML_bodyPr), XML_rot, I32S(nRotation), FSEND); + else + pFS->singleElement(FSNS(XML_a, XML_bodyPr), FSEND); + pFS->singleElement( FSNS( XML_a, XML_lstStyle ), FSEND ); pFS->startElement(FSNS(XML_a, XML_p), FSEND); @@ -2681,7 +2695,7 @@ void ChartExport::_exportAxis( // shape properties exportShapeProps( xAxisProp ); - exportTextProps(xAxisProp); + exportTextProps(xAxisProp, true); pFS->singleElement( FSNS( XML_c, XML_crossAx ), XML_val, I32S( rAxisIdPair.nCrossAx ), |