[Libreoffice-commits] core.git: 5 commits - chart2/source oox/source sc/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Sat Feb 22 21:42:44 PST 2014
chart2/source/view/main/DummyXShape.cxx | 73 ++++++++++++++++++++++++++++++--
oox/source/export/chartexport.cxx | 38 +++++++++-------
sc/source/filter/excel/xepivot.cxx | 4 +
3 files changed, 94 insertions(+), 21 deletions(-)
New commits:
commit 18ab4793d96a4e33c3a11fe3b1dda52f217c6c16
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Sun Feb 23 06:20:03 2014 +0100
prevent invalid OOXML chart files, related #i82905#
Change-Id: I27166772c6eefb4e49eb4c097683a1c6aea4476a
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index fdc0c2b..e565035 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3063,7 +3063,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle)
default:
assert(false); // can't happen
}
- return "";
+ return NULL;
}
Reference< chart2::data::XDataSequence> getLabeledSequence(
@@ -3100,6 +3100,12 @@ Reference< chart2::data::XDataSequence> getLabeledSequence(
void ChartExport::exportErrorBar(Reference< XPropertySet> xErrorBarProps, bool bYError)
{
+ sal_Int32 nErrorBarStyle = cssc::ErrorBarStyle::NONE;
+ xErrorBarProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
+ const char* pErrorBarStyle = getErrorBarStyle(nErrorBarStyle);
+ if(!pErrorBarStyle)
+ return;
+
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_errBars ),
FSEND );
@@ -3125,10 +3131,6 @@ void ChartExport::exportErrorBar(Reference< XPropertySet> xErrorBarProps, bool b
pFS->singleElement( FSNS( XML_c, XML_errBarType ),
XML_val, pErrBarType,
FSEND );
-
- sal_Int32 nErrorBarStyle = cssc::ErrorBarStyle::NONE;
- xErrorBarProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
- const char* pErrorBarStyle = getErrorBarStyle(nErrorBarStyle);
pFS->singleElement( FSNS( XML_c, XML_errValType ),
XML_val, pErrorBarStyle,
FSEND );
commit 783a0757dad17b5594927fe6c66834406984868c
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Sun Feb 23 06:08:32 2014 +0100
prevent invalid OOXML chart files, related #i75121#
Change-Id: I8e34fd2941ce98a30d27861db2c6a625ff873aa6
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 9d4c045..fdc0c2b 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1758,16 +1758,20 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
exportTrendlines( aSeriesSeq[nSeriesIdx] );
- //export error bars here
- Reference< XPropertySet > xSeriesPropSet( xSource, uno::UNO_QUERY );
- Reference< XPropertySet > xErrorBarYProps;
- xSeriesPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
- if(xErrorBarYProps.is())
- exportErrorBar(xErrorBarYProps, true);
- Reference< XPropertySet > xErrorBarXProps;
- xSeriesPropSet->getPropertyValue("ErrorBarX") >>= xErrorBarXProps;
- if(xErrorBarXProps.is())
- exportErrorBar(xErrorBarXProps, false);
+ if( eChartType != chart::TYPEID_PIE &&
+ eChartType != chart::TYPEID_RADARLINE )
+ {
+ //export error bars here
+ Reference< XPropertySet > xSeriesPropSet( xSource, uno::UNO_QUERY );
+ Reference< XPropertySet > xErrorBarYProps;
+ xSeriesPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
+ if(xErrorBarYProps.is())
+ exportErrorBar(xErrorBarYProps, true);
+ Reference< XPropertySet > xErrorBarXProps;
+ xSeriesPropSet->getPropertyValue("ErrorBarX") >>= xErrorBarXProps;
+ if(xErrorBarXProps.is())
+ exportErrorBar(xErrorBarXProps, false);
+ }
// export categories
if( eChartType != chart::TYPEID_SCATTER && mxCategoriesValues.is() )
commit c68ea7ef4a75decae6c157bc49205bedb08192ee
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Sun Feb 23 05:46:48 2014 +0100
don't write axId for dougnught chart, related fdo#63114
Change-Id: I75168888ff8da6f18089311a99135c124c7a7e72
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 46fe76c..9d4c045 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1396,8 +1396,6 @@ void ChartExport::exportDoughnutChart( Reference< chart2::XChartType > xChartTyp
XML_val, I32S( nHoleSize ),
FSEND );
- exportAxesId( nAttachedAxis );
-
pFS->endElement( FSNS( XML_c, XML_doughnutChart ) );
}
commit 4725fcd8ea50d565dc443a6cd90011e9dbb6f1b5
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Sun Feb 23 05:24:48 2014 +0100
OOXML export validation fixes, related fdo#54651
We don't exactly know right now how to fill these elements so just don't
export them.
Change-Id: I78f9c67aaf4cec4dfcae3137ba137121ca005fd9
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 1993828e..7a46a23 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1442,6 +1442,9 @@ void XclExpPivotTable::SaveXml( XclExpXmlStream& rStrm )
// OOXTODO: XML_pivotFields
+ // Until we figure out how to fill these elements don't export them. It makes
+ // our documents invalid. The code below is correct so don't remove it!!!
+#if 0
// maPTInfo.mnFields?
if( maPTInfo.mnRowFields )
{
@@ -1478,6 +1481,7 @@ void XclExpPivotTable::SaveXml( XclExpXmlStream& rStrm )
FSEND );
aPivotTableDefinition->endElement( XML_dataFields );
}
+#endif
// OOXTODO: XML_formats, XML_conditionalFormats, XML_chartFormats,
// XML_pivotHierarchies, XML_pivotTableStyleInfo, XML_filters,
commit 1be2b63b64eba60b5397c20006f669019fe8a8e7
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Sun Feb 23 04:46:25 2014 +0100
make OpenGL debug messages more readable
Change-Id: I2e90acaa0fe1fb47559ddd7b898874e12f494a9a
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 986589d..199193b 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -897,8 +897,6 @@ DummyFormattedText::DummyFormattedText(uno::Sequence< uno::Reference<
{
}
-
-
DummyGroup3D::DummyGroup3D(const OUString& rName)
{
setName(rName);
@@ -1252,6 +1250,73 @@ int oglErrorHandler( Display* /*dpy*/, XErrorEvent* /*evnt*/ )
namespace {
+const char* getSeverityString(GLenum severity)
+{
+ switch(severity)
+ {
+ case GL_DEBUG_SEVERITY_LOW:
+ return "low";
+ case GL_DEBUG_SEVERITY_MEDIUM:
+ return "medium";
+ case GL_DEBUG_SEVERITY_HIGH:
+ return "high";
+ default:
+ ;
+ }
+
+ return "unknown";
+}
+
+const char* getSourceString(GLenum source)
+{
+ switch(source)
+ {
+ case GL_DEBUG_SOURCE_API:
+ return "API";
+ case GL_DEBUG_SOURCE_SHADER_COMPILER:
+ return "shader compiler";
+ case GL_DEBUG_SOURCE_WINDOW_SYSTEM:
+ return "window system";
+ case GL_DEBUG_SOURCE_THIRD_PARTY:
+ return "third party";
+ case GL_DEBUG_SOURCE_APPLICATION:
+ return "Libreoffice";
+ case GL_DEBUG_SOURCE_OTHER:
+ return "unknown";
+ default:
+ ;
+ }
+
+ return "unknown";
+}
+
+const char* getTypeString(GLenum type)
+{
+ switch(type)
+ {
+ case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
+ return "deprecated behavior";
+ case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
+ return "undefined behavior";
+ case GL_DEBUG_TYPE_PERFORMANCE:
+ return "performance";
+ case GL_DEBUG_TYPE_PORTABILITY:
+ return "portability";
+ case GL_DEBUG_TYPE_MARKER:
+ return "marker";
+ case GL_DEBUG_TYPE_PUSH_GROUP:
+ return "push group";
+ case GL_DEBUG_TYPE_POP_GROUP:
+ return "pop group";
+ case GL_DEBUG_TYPE_OTHER:
+ return "other";
+ default:
+ ;
+ }
+
+ return "unkown";
+}
+
extern "C" void
#if defined _WIN32
APIENTRY
@@ -1259,8 +1324,8 @@ APIENTRY
debug_callback(GLenum source, GLenum type, GLuint id,
GLenum severity, GLsizei , const GLchar* message, GLvoid* )
{
- SAL_WARN("chart2.opengl", "OpenGL debug message: source: " << source << ", type: "
- << type << ", id: " << id << ", severity: " << severity << " with message: " << message);
+ SAL_WARN("chart2.opengl", "OpenGL debug message: source: " << getSourceString(source) << ", type: "
+ << type << ", id: " << id << ", severity: " << getSeverityString(severity) << " with message: " << message);
}
}
More information about the Libreoffice-commits
mailing list