summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-27 10:35:15 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-29 00:47:19 -0400
commit801e399f95a4da6101c8570455860fd537a90b95 (patch)
tree6f7863e60be6c4ec3affa6f7fcf862a8d8552486 /chart2
parent9153a36b59f2efc2bfb2c9256c39eb5687808deb (diff)
Add a means to debug the internal state of the diagram object.
Until we can render this new GL chart for real. Change-Id: Iaf1a5fb903572c33d512705c9073b3795187f89b
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/ChartView.cxx33
1 files changed, 31 insertions, 2 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 67404e09e673..04905675ed6f 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -121,9 +121,34 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
-namespace
+namespace {
+
+class theExplicitValueProviderUnoTunnelId : public rtl::Static<UnoTunnelIdInit, theExplicitValueProviderUnoTunnelId> {};
+
+#if ENABLE_GL3D_BARCHART
+
+/**
+ * Only used for initial debugging of the new GL chart (until we can
+ * visualize it).
+ */
+void debugGL3DOutput( ChartModel& rModel )
{
- class theExplicitValueProviderUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theExplicitValueProviderUnoTunnelId > {};
+ uno::Reference<XDiagram> xDiagram = rModel.getFirstDiagram();
+ if (!xDiagram.is())
+ return;
+
+ try
+ {
+ uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
+ bool bRoundedEdge = false;
+ xPropSet->getPropertyValue("RoundedEdge") >>= bRoundedEdge;
+
+ fprintf(stdout, "GL3D: rounded edge = %d\n", bRoundedEdge);
+ }
+ catch (...) {}
+}
+
+#endif
}
@@ -2381,6 +2406,10 @@ void ChartView::createShapes()
maTimeBased.bTimeBased = true;
}
+#if ENABLE_GL3D_BARCHART
+ debugGL3DOutput(mrChartModel);
+#endif
+
//make sure add-in is refreshed after creating the shapes
const ::comphelper::ScopeGuard aGuard( boost::bind( &ChartView::impl_refreshAddIn, this ) );
if( impl_AddInDrawsAllByItself() )