summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-02 20:44:38 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-02 20:44:38 +0100
commit68e39b840d6fbfc7cd9c12791d1c1a64cf60ec96 (patch)
treee228a556607f8fd00956b9316a9af65610aa32ad /xmloff
parent045e037b7acde9d8e63fbb977c28b167e8815278 (diff)
Revert "transpose "data in rows" ranges for internal data provider, fdo#62057"
This reverts commit 14fa5488a829936275f79a7693b13da55114220e. Conflicts: xmloff/source/chart/SchXMLTableContext.cxx
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx33
-rw-r--r--xmloff/source/chart/SchXMLTableContext.hxx5
3 files changed, 6 insertions, 36 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 02fea26ad380..dd0a1252f608 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -781,7 +781,7 @@ void SchXMLChartContext::EndElement()
//own data or only rectangular range available
if( xNewDoc->hasInternalDataProvider() )
- SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc, meDataRowSource );
+ SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc );
bool bOlderThan2_3 = SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( Reference< frame::XModel >( xNewDoc, uno::UNO_QUERY ));
bool bOldFileWithOwnDataFromRows = (bOlderThan2_3 && bHasOwnData && (meDataRowSource==chart::ChartDataRowSource_ROWS)); // in this case there are range addresses that are simply wrong.
@@ -818,7 +818,7 @@ void SchXMLChartContext::EndElement()
if( !xNewDoc->hasInternalDataProvider() )
{
xNewDoc->createInternalDataProvider( sal_False /* bCloneExistingData */ );
- SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc, meDataRowSource );
+ SchXMLTableHelper::applyTableToInternalDataProvider( maTable, xNewDoc );
try
{
lcl_ApplyDataFromRectangularRangeToDiagram( xNewDoc, msChartAddress, meDataRowSource, mbRowHasLabels, mbColHasLabels, bHasOwnData, msColTrans, msRowTrans );
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index ad0b7cdbd724..d1a04662a611 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -738,35 +738,9 @@ static void lcl_ApplyCellToComplexLabel( const SchXMLCell& rCell, Sequence< uno:
}
}
-namespace {
-
-void transposeTable(SchXMLTable& rTable)
-{
- std::vector<std::vector<SchXMLCell> > aNewData;
- sal_Int32 nRows = rTable.aData.size();
- aNewData.resize(rTable.nMaxColumnIndex+1);
- for(sal_Int32 i = 0; i < nRows; ++i)
- {
- sal_Int32 nCols = rTable.aData[i].size();
- for(sal_Int32 j = 0; j < nCols; ++j)
- {
- SchXMLCell& rCell = rTable.aData[i][j];
- aNewData[j].push_back(rCell);
- }
- }
- bool bHasRowHeader = rTable.bHasHeaderRow;
- bool bHasColHeader = rTable.bHasHeaderColumn;
- rTable.bHasHeaderColumn = bHasRowHeader;
- rTable.bHasHeaderRow = bHasColHeader;
- rTable.nMaxColumnIndex = nRows;
- rTable.aData = aNewData;
-}
-
-}
-
void SchXMLTableHelper::applyTableToInternalDataProvider(
- SchXMLTable rTable,
- uno::Reference< chart2::XChartDocument > xChartDoc, chart::ChartDataRowSource eDataRowSource )
+ const SchXMLTable& rTable,
+ uno::Reference< chart2::XChartDocument > xChartDoc )
{
// apply all data read from the local table to the internal data provider
if( !xChartDoc.is() || !xChartDoc->hasInternalDataProvider() )
@@ -775,9 +749,6 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
if( !xDataProv.is() )
return;
- if(eDataRowSource == chart::ChartDataRowSource_ROWS)
- transposeTable(rTable);
-
//prepare the read local table data
sal_Int32 nNumRows( static_cast< sal_Int32 >( rTable.aData.size()));
sal_Int32 nRowOffset = 0;
diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx
index 19993cb56838..6919dccb358a 100644
--- a/xmloff/source/chart/SchXMLTableContext.hxx
+++ b/xmloff/source/chart/SchXMLTableContext.hxx
@@ -73,9 +73,8 @@ private:
sal_Int32& nRows, sal_Int32& nColumns );
public:
- static void applyTableToInternalDataProvider( SchXMLTable rTable,
- com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > xChartDoc,
- com::sun::star::chart::ChartDataRowSource eDataRowSource );
+ static void applyTableToInternalDataProvider( const SchXMLTable& rTable,
+ com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > xChartDoc );
/** This function reorders local data to fit the correct data structure.
Call it after the data series got their styles set.