[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/filters/kspread/excel/import
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2010-03-05 17:56:51
Message-ID: 1267811811.830257.3477.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1099512 by sebsauer:

minor cleanup.

 M  +7 -3      excelimport.cc  


--- trunk/koffice/filters/kspread/excel/import/excelimport.cc #1099511:1099512
@@ -1548,15 +1548,20 @@
         //chartstyle.addProperty("chart:right-angled-axes", "true");
         bodyWriter->addAttribute("chart:style-name", styles.lookup(chartstyle, \
"ch"));  
+        const QString verticalCellRangeAddress = \
normalizeCellRange(string(chart->verticalCellRangeAddress));  \
if(chart->cellRangeAddress.isValid()) {  const QString sheetName = \
                string(sheet->name());
             QString cellRangeAddress = sheetName + "." + \
columnName(chart->cellRangeAddress.left()) + \
                QString::number(chart->cellRangeAddress.top()) + ":" +
                                        sheetName + "." + \
columnName(chart->cellRangeAddress.right()) + \
                QString::number(chart->cellRangeAddress.bottom());
             bodyWriter->addAttribute("table:cell-range-address", cellRangeAddress); \
//"Sheet1.C2:Sheet1.E5"); +        }
 
-            //TODO deactivate this to trigger a bug in kchart
-            bodyWriter->addAttribute("chart:data-source-has-labels", "both"); // \
needed for categories +        /*FIXME
+        if(verticalCellRangeAddress.isEmpty()) {
+            // only add the chart:data-source-has-labels if no chart:categories with \
a table:cell-range-address was defined within an axis. +            \
bodyWriter->addAttribute("chart:data-source-has-labels", "both");  }
+        */
 
         //bodyWriter->addAttribute("svg:x", "0.16cm"); //FIXME
         //bodyWriter->addAttribute("svg:y", "0.14cm"); //FIXME
@@ -1567,7 +1572,6 @@
         bodyWriter->startElement("chart:axis");
         bodyWriter->addAttribute("chart:dimension", "x");
         bodyWriter->addAttribute("chart:name", "primary-x");
-        const QString verticalCellRangeAddress = \
normalizeCellRange(string(chart->verticalCellRangeAddress));  \
if(!verticalCellRangeAddress.isEmpty()) {  \
                bodyWriter->startElement("chart:categories");
             bodyWriter->addAttribute("table:cell-range-address", \
verticalCellRangeAddress); //"Sheet1.C2:Sheet1.E2");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic