[Libreoffice-commits] core.git: 2 commits - configure.ac include/oox oox/source

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Dec 22 08:01:51 UTC 2017


 configure.ac                       |    3 -
 include/oox/export/chartexport.hxx |    2 +
 oox/source/export/chartexport.cxx  |   64 +++++++++++++++++++++----------------
 3 files changed, 41 insertions(+), 28 deletions(-)

New commits:
commit 5f71a5a29be5ed4f77bfcd1b295ad220d018a67b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Dec 21 23:44:15 2017 +0100

    gtk3 is no longer experimental
    
    Change-Id: I00b36e7109b1e4c286248aff75150ba3ef2d44b1
    Reviewed-on: https://gerrit.libreoffice.org/46940
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/configure.ac b/configure.ac
index f88481b6c45e..f3bd86698cda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1142,8 +1142,7 @@ libo_FUZZ_ARG_ENABLE(gtk,
 
 libo_FUZZ_ARG_ENABLE(gtk3,
     AS_HELP_STRING([--disable-gtk3],
-        [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.
-         This is experimental and may not work.]),
+        [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
 ,test "${enable_gtk3+set}" = set || enable_gtk3=yes)
 
 libo_FUZZ_ARG_ENABLE(systray,
commit dd55a4e8cd652665848b76b29dd5f98efc752ba1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Dec 21 23:43:21 2017 +0100

    also export basic chart structure for empty charts
    
    Change-Id: I545be33e5e093d5bd3fda4236213a413a6cc9ce7
    Reviewed-on: https://gerrit.libreoffice.org/46939
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index cebc4f41ca4d..6b1e9f8fadde 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -149,6 +149,8 @@ private:
     void exportPieChart( const css::uno::Reference< css::chart2::XChartType >& xChartType );
     void exportRadarChart( const css::uno::Reference< css::chart2::XChartType >& xChartType );
     void exportScatterChart( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+    void exportScatterChartSeries( const css::uno::Reference< css::chart2::XChartType >& xChartType,
+            css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries>>* pSeries);
     void exportStockChart( const css::uno::Reference< css::chart2::XChartType >& xChartType );
     void exportSurfaceChart( const css::uno::Reference< css::chart2::XChartType >& xChartType );
     void exportHiLowLines();
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 598b9e302a4a..f0d639a497a3 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1628,43 +1628,55 @@ void ChartExport::exportRadarChart( const Reference< chart2::XChartType >& xChar
     pFS->endElement( FSNS( XML_c, XML_radarChart ) );
 }
 
+void ChartExport::exportScatterChartSeries( const Reference< chart2::XChartType >& xChartType,
+        css::uno::Sequence<css::uno::Reference<chart2::XDataSeries>>* pSeries)
+{
+    FSHelperPtr pFS = GetFS();
+    pFS->startElement( FSNS( XML_c, XML_scatterChart ),
+            FSEND );
+    // TODO:scatterStyle
+
+    sal_Int32 nSymbolType = css::chart::ChartSymbolType::NONE;
+    Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
+    if( GetProperty( xPropSet, "SymbolType" ) )
+        mAny >>= nSymbolType;
+
+    const char* scatterStyle = "lineMarker";
+    if (nSymbolType == css::chart::ChartSymbolType::NONE)
+    {
+        scatterStyle = "line";
+    }
+
+    pFS->singleElement( FSNS( XML_c, XML_scatterStyle ),
+            XML_val, scatterStyle,
+            FSEND );
+
+    exportVaryColors(xChartType);
+    // FIXME: should export xVal and yVal
+    bool bPrimaryAxes = true;
+    if (pSeries)
+        exportSeries(xChartType, *pSeries, bPrimaryAxes);
+    exportAxesId(bPrimaryAxes);
+
+    pFS->endElement( FSNS( XML_c, XML_scatterChart ) );
+}
+
 void ChartExport::exportScatterChart( const Reference< chart2::XChartType >& xChartType )
 {
     FSHelperPtr pFS = GetFS();
     std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
+    bool bExported = false;
     for (auto itr = aSplitDataSeries.begin(), itrEnd = aSplitDataSeries.end();
             itr != itrEnd; ++itr)
     {
         if (itr->getLength() == 0)
             continue;
 
-        pFS->startElement( FSNS( XML_c, XML_scatterChart ),
-                FSEND );
-        // TODO:scatterStyle
-
-        sal_Int32 nSymbolType = css::chart::ChartSymbolType::NONE;
-        Reference< XPropertySet > xPropSet( mxDiagram , uno::UNO_QUERY);
-        if( GetProperty( xPropSet, "SymbolType" ) )
-            mAny >>= nSymbolType;
-
-        const char* scatterStyle = "lineMarker";
-        if (nSymbolType == css::chart::ChartSymbolType::NONE)
-        {
-            scatterStyle = "line";
-        }
-
-        pFS->singleElement( FSNS( XML_c, XML_scatterStyle ),
-                XML_val, scatterStyle,
-                FSEND );
-
-        exportVaryColors(xChartType);
-        // FIXME: should export xVal and yVal
-        bool bPrimaryAxes = true;
-        exportSeries(xChartType, *itr, bPrimaryAxes);
-        exportAxesId(bPrimaryAxes);
-
-        pFS->endElement( FSNS( XML_c, XML_scatterChart ) );
+        bExported = true;
+        exportScatterChartSeries(xChartType, &(*itr));
     }
+    if (!bExported)
+        exportScatterChartSeries(xChartType, nullptr);
 }
 
 void ChartExport::exportStockChart( const Reference< chart2::XChartType >& xChartType )


More information about the Libreoffice-commits mailing list