[Libreoffice-commits] core.git: 3 commits - include/oox oox/source

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Apr 29 15:19:33 PDT 2013


 include/oox/export/chartexport.hxx |   14 -----------
 oox/source/core/xmlfilterbase.cxx  |    7 +----
 oox/source/export/chartexport.cxx  |   44 -------------------------------------
 3 files changed, 3 insertions(+), 62 deletions(-)

New commits:
commit dd24f18545d1e041b2dc427ce4d6c28fbd39d76d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Apr 30 00:06:54 2013 +0200

    now ooxml files are accepted by Excel again
    
    Yes, a simple test would have answered the question in the comment and
    made clear that nanoseconds are not accepted by MSO.
    
    Let's go with normal seconds as MSO does. It seems it also accepts
    1/100s but who really needs that for a file timestamp.
    
    Change-Id: Iaec6f9c08dc94d5086b83cb4bf520d0053b71b28

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 4cd7665..fe2055e 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -482,12 +482,9 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const util::DateTime& rTi
                 FSEND );
 
     char pStr[200];
-    // FIXME: my guess is that precision greater than millisecond in undesirable
-    //        (forbidden by the standard???)
-    snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02d.%09" SAL_PRIuUINT32 "Z",
+    snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02dZ",
             rTime.Year, rTime.Month, rTime.Day,
-            rTime.Hours, rTime.Minutes, rTime.Seconds,
-            rTime.NanoSeconds);
+            rTime.Hours, rTime.Minutes, rTime.Seconds );
 
     pDoc->write( pStr );
 
commit f9cd73ebe116cd95247aff1963e2f5b4ec671dfa
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Apr 29 20:57:10 2013 +0200

    remove a few more unused variables
    
    Change-Id: I6c70c000f60e7e6e43bd068ccb98b693b80746f2

diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 214c08f..d3212d0 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -89,11 +89,8 @@ private:
     com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > mxNewDiagram;
 
     // members filled by InitRangeSegmentationProperties (retrieved from DataProvider)
-    sal_Bool mbHasSeriesLabels;
     sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false
-    sal_Bool mbRowSourceColumns;
     OUString msChartAddress;
-    OUString msTableNumberList;
     ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping;
 
     //::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes;
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 98fff6f..48e2e60 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -438,14 +438,8 @@ ChartExport::ChartExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, Reference< f
     , mnXmlNamespace( nXmlNamespace )
     , maFraction( 1, 576 )
     , mxChartModel( xModel )
-    , mbHasSeriesLabels( sal_False )
     , mbHasCategoryLabels( sal_False )
-    , mbRowSourceColumns( sal_True )
-    , mbHasXAxis( sal_False )
-    , mbHasYAxis( sal_False )
     , mbHasZAxis( sal_False )
-    , mbHasSecondaryXAxis( sal_False )
-    , mbHasSecondaryYAxis( sal_False )
     , mbIs3DChart( sal_False )
 {
 }
@@ -631,18 +625,8 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha
                         if( aArgs[i].Value >>= sBrokenRange )
                             bBrokenRangeAvailable = true;
                     }
-                    else if ( aArgs[i].Name == "DataRowSource" )
-                    {
-                        ::com::sun::star::chart::ChartDataRowSource eRowSource;
-                        aArgs[i].Value >>= eRowSource;
-                        mbRowSourceColumns = ( eRowSource == ::com::sun::star::chart::ChartDataRowSource_COLUMNS );
-                    }
-                    else if ( aArgs[i].Name == "FirstCellAsLabel" )
-                        aArgs[i].Value >>= mbHasSeriesLabels;
                     else if ( aArgs[i].Name == "SequenceMapping" )
                         aArgs[i].Value >>= maSequenceMapping;
-                    else if ( aArgs[i].Name == "TableNumberList" )
-                        aArgs[i].Value >>= msTableNumberList;
                 }
 
                 // #i79009# For Writer we have to export a broken version of the
@@ -720,10 +704,6 @@ void ChartExport::_ExportContent()
                             aAny >>= msChartAddress;
                             //maExportHelper.SetChartRangeAddress( sChartAddress );
 
-                            // OUString sTableNumberList;
-                            aAny = xProp->getPropertyValue(
-                                OUString("TableNumberList"));
-                            aAny >>= msTableNumberList;
                             //maExportHelper.SetTableNumberList( sTableNumberList );
 
                             // do not include own table if there are external addresses
@@ -1821,35 +1801,11 @@ void ChartExport::InitPlotArea( )
     if (xServiceInfo.is())
     {
         if (xServiceInfo->supportsService(
-            OUString("com.sun.star.chart.ChartAxisXSupplier")))
-        {
-            xDiagramProperties->getPropertyValue(
-                OUString("HasXAxis")) >>= mbHasXAxis;
-        }
-        if (xServiceInfo->supportsService(
-            OUString("com.sun.star.chart.ChartAxisYSupplier")))
-        {
-            xDiagramProperties->getPropertyValue(
-                OUString("HasYAxis")) >>= mbHasYAxis;
-        }
-        if (xServiceInfo->supportsService(
             OUString("com.sun.star.chart.ChartAxisZSupplier")))
         {
             xDiagramProperties->getPropertyValue(
                 OUString("HasZAxis")) >>= mbHasZAxis;
         }
-        if (xServiceInfo->supportsService(
-            OUString("com.sun.star.chart.ChartTwoAxisXSupplier")))
-        {
-            xDiagramProperties->getPropertyValue(
-                OUString("HasSecondaryXAxis")) >>= mbHasSecondaryXAxis;
-        }
-        if (xServiceInfo->supportsService(
-            OUString("com.sun.star.chart.ChartTwoAxisYSupplier")))
-        {
-            xDiagramProperties->getPropertyValue(
-                OUString("HasSecondaryYAxis")) >>= mbHasSecondaryYAxis;
-        }
     }
 
     xDiagramProperties->getPropertyValue(
commit d5ef8830255a8bdb1ff383f262c3028c398f63ee
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Apr 29 20:50:00 2013 +0200

    remove unused variables
    
    Change-Id: I78e778408abb72772771daf5776a26f08c313ee2

diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 774ebb9..214c08f 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -88,10 +88,6 @@ private:
     com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > mxDiagram;
     com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > mxNewDiagram;
 
-    OUString msTableName;
-    OUStringBuffer msStringBuffer;
-    OUString msString;
-
     // members filled by InitRangeSegmentationProperties (retrieved from DataProvider)
     sal_Bool mbHasSeriesLabels;
     sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false
@@ -104,17 +100,12 @@ private:
     ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > mxCategoriesValues;
 
     AxisVector          maAxes;
-    sal_Bool            mbHasXAxis;
-    sal_Bool            mbHasYAxis;
     sal_Bool            mbHasZAxis;
-    sal_Bool            mbHasSecondaryXAxis;
-    sal_Bool            mbHasSecondaryYAxis;
     sal_Bool            mbIs3DChart;
 
 
 private:
-    sal_Int32 getChartType(
-         );
+    sal_Int32 getChartType();
 
     OUString parseFormula( const OUString& rRange );
     void InitPlotArea();


More information about the Libreoffice-commits mailing list