diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-08-25 21:47:34 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-08-29 17:40:35 +0200 |
commit | f61e453f8463fcc02629b1e8cdfeb73a3a932307 (patch) | |
tree | 6e8fffa2e97c6b09fde4c02b8f6875c91e2da5ea /svtools | |
parent | 5d622c55ef776f31ec8a0a5dfcbbadd03c35e5a1 (diff) |
the DUMMY_CHART_FACTORY variable is not the only indicator for OpenGl charts
Change-Id: Idab33c8611526dc4749b4dbe4fe84e68138b4f73
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/embedhlp.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index d320b30ffec7..b8d588396bc1 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -804,7 +804,18 @@ bool EmbeddedObjectRef::IsChart(const ::com::sun::star::uno::Reference < ::com:: bool EmbeddedObjectRef::IsGLChart(const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj) { static const char* env = getenv("CHART_DUMMY_FACTORY"); - return IsChart(xObj) && env; + if (IsChart(xObj)) + { + if (env) + return true; + + uno::Reference< chart2::XChartDocument > xChartDoc(xObj->getComponent(), uno::UNO_QUERY); + if (!xChartDoc.is()) + return false; + + return xChartDoc->isOpenGLChart(); + } + return false; } void EmbeddedObjectRef::UpdateReplacement() |