[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.4' - 4 commits - include/oox oox/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Apr 15 00:10:06 PDT 2015
include/oox/export/chartexport.hxx | 3 +
oox/source/drawingml/chart/typegroupconverter.cxx | 1
oox/source/export/chartexport.cxx | 48 +++++++++++++++++++++-
3 files changed, 51 insertions(+), 1 deletion(-)
New commits:
commit c5586f5fdbf4670ae41af24837b24df3d54b130a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Apr 15 03:25:55 2015 +0200
import marker color from OOXML, related tdf#81407
Change-Id: Ie416d757b73e99836d14b7f24a5cb4b370284d8c
(cherry picked from commit 30936e3f6f8242950526ce9a0d02971a881b7910)
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index 7a7b2a6..2a38f5a 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -478,6 +478,7 @@ void TypeGroupConverter::convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSym
{
Color aFillColor = xShapeProps->getFillProperties().maFillColor;
aSymbol.FillColor = aFillColor.getColor(getFilter().getGraphicHelper());
+ rPropSet.setProperty(PROP_Color, aSymbol.FillColor);
}
// set the property
commit a083dd0bd109f6280641e4556230da66d7f6227a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Apr 15 03:02:01 2015 +0200
export marker color correctly, tdf#81407
Change-Id: Iebc3d87642c93fcdecddd6332fd57b7fdfb2d337
(cherry picked from commit 96c05f82cd4df35505497bc29d96c8a250072db0)
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 9a2bb31..45cfb0f 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3092,7 +3092,12 @@ void ChartExport::exportMarker(Reference< chart2::XDataSeries > xSeries)
pFS->startElement( FSNS( XML_c, XML_spPr ),
FSEND );
- WriteSolidFill(aSymbol.FillColor);
+
+ util::Color aColor = aSymbol.FillColor;
+ if (GetProperty(xPropSet, "Color"))
+ mAny >>= aColor;
+
+ WriteSolidFill(aColor);
pFS->endElement( FSNS( XML_c, XML_spPr ) );
pFS->endElement( FSNS( XML_c, XML_marker ) );
commit f7702d0b65c7acd5c5f78a550534469f8f912f26
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Apr 15 00:21:21 2015 +0200
export missing value treatment to OOXML
Change-Id: I1a448e9c954a3851fe3590a0fae73ed5b27555f0
(cherry picked from commit e68ceaec43f0c0ff326064642072bb8f904e7e8a)
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 4560bb4..017d3f0 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -182,6 +182,9 @@ private:
void exportView3D();
bool isDeep3dChart();
+ void exportMissingValueTreatment(com::sun::star::uno::Reference<
+ com::sun::star::beans::XPropertySet> xPropSet);
+
public:
ChartExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel, ::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX );
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 3fdf45b..9a2bb31 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/chart/ChartSolidType.hpp>
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
@@ -905,9 +906,44 @@ void ChartExport::exportChart( Reference< ::com::sun::star::chart::XChartDocumen
XML_val, "1",
FSEND );
+ exportMissingValueTreatment(Reference<beans::XPropertySet>(mxDiagram, uno::UNO_QUERY));
+
pFS->endElement( FSNS( XML_c, XML_chart ) );
}
+void ChartExport::exportMissingValueTreatment(uno::Reference<beans::XPropertySet> xPropSet)
+{
+ if (!xPropSet.is())
+ return;
+
+ sal_Int32 nVal = 0;
+ uno::Any aAny = xPropSet->getPropertyValue("MissingValueTreatment");
+ if (!(aAny >>= nVal))
+ return;
+
+ const char* pVal = NULL;
+ switch (nVal)
+ {
+ case cssc::MissingValueTreatment::LEAVE_GAP:
+ pVal = "gap";
+ break;
+ case cssc::MissingValueTreatment::USE_ZERO:
+ pVal = "zero";
+ break;
+ case cssc::MissingValueTreatment::CONTINUE:
+ pVal = "span";
+ break;
+ default:
+ SAL_WARN("oox", "unknown MissingValueTreatment value");
+ break;
+ }
+
+ FSHelperPtr pFS = GetFS();
+ pFS->singleElement( FSNS(XML_c, XML_dispBlanksAs),
+ XML_val, pVal,
+ FSEND);
+}
+
void ChartExport::exportLegend( Reference< ::com::sun::star::chart::XChartDocument > rChartDoc )
{
FSHelperPtr pFS = GetFS();
commit 8a6d5960d41cf50691f32082831b6406ff03b484
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Apr 14 23:07:22 2015 +0200
we use the correct OOXML default value now
Change-Id: I1aad3e40ad61a1397b619bdc6e0f578e2c9c141e
(cherry picked from commit ec2c8a602ecb8664b24d77e6ca6af17bf59d211c)
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 3dc8602..3fdf45b 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -860,7 +860,12 @@ void ChartExport::exportChart( Reference< ::com::sun::star::chart::XChartDocumen
{
Reference< drawing::XShape > xShape = rChartDoc->getTitle();
if( xShape.is() )
+ {
exportTitle( xShape );
+ pFS->singleElement( FSNS(XML_c, XML_autoTitleDeleted),
+ XML_val, "0",
+ FSEND);
+ }
}
InitPlotArea( );
if( mbIs3DChart )
More information about the Libreoffice-commits
mailing list