[Libreoffice-commits] core.git: Branch 'private/kohei/new-chart-type-skeleton' - chart2/source

Kohei Yoshida kohei.yoshida at collabora.com
Thu Mar 27 07:37:07 PDT 2014


 chart2/source/view/main/ChartView.cxx |   33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

New commits:
commit 79969ff7fb98d91ae7964118a6dbcbca21f33663
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 27 10:35:15 2014 -0400

    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

diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 67404e0..0490567 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() )


More information about the Libreoffice-commits mailing list