diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2011-03-21 17:31:01 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2011-03-21 17:31:01 +0100 |
commit | dae2b218c44e8e4613e37b9a42aec251cae5fdec (patch) | |
tree | b60a1290413579aa701341e6741d7ab3bb897147 /oox/source/xls/excelchartconverter.cxx | |
parent | 82c070266d0440348c61c710e0caa89ae1e74b1b (diff) | |
parent | 575410a61ef6ab586484bf29bf9af28c7b65e67a (diff) |
CWS-TOOLING: integrate CWS dr78
Diffstat (limited to 'oox/source/xls/excelchartconverter.cxx')
-rw-r--r-- | oox/source/xls/excelchartconverter.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/oox/source/xls/excelchartconverter.cxx b/oox/source/xls/excelchartconverter.cxx index 53c0a3b83bf2..e2538cbc3ebc 100644 --- a/oox/source/xls/excelchartconverter.cxx +++ b/oox/source/xls/excelchartconverter.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/chart2/data/XDataProvider.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> +#include "oox/core/filterbase.hxx" #include "oox/drawingml/chart/datasourcemodel.hxx" #include "oox/helper/containerhelper.hxx" #include "oox/xls/formulaparser.hxx" @@ -64,8 +65,7 @@ void ExcelChartConverter::createDataProvider( const Reference< XChartDocument >& try { Reference< XDataReceiver > xDataRec( rxChartDoc, UNO_QUERY_THROW ); - Reference< XMultiServiceFactory > xFactory( getDocument(), UNO_QUERY_THROW ); - Reference< XDataProvider > xDataProv( xFactory->createInstance( + Reference< XDataProvider > xDataProv( getBaseFilter().getModelFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.chart2.data.DataProvider" ) ), UNO_QUERY_THROW ); xDataRec->attachDataProvider( xDataProv ); } @@ -85,13 +85,12 @@ Reference< XDataSequence > ExcelChartConverter::createDataSequence( { // parse the formula string, create a token sequence FormulaParser& rParser = getFormulaParser(); - TokensFormulaContext aContext( true, true ); - aContext.setBaseAddress( CellAddress( getCurrentSheetIndex(), 0, 0 ) ); - rParser.importFormula( aContext, rDataSeq.maFormula ); + CellAddress aBaseAddr( getCurrentSheetIndex(), 0, 0 ); + ApiTokenSequence aTokens = rParser.importFormula( aBaseAddr, rDataSeq.maFormula ); // create a range list from the token sequence ApiCellRangeList aRanges; - rParser.extractCellRangeList( aRanges, aContext.getTokens(), false ); + rParser.extractCellRangeList( aRanges, aTokens, false ); aRangeRep = rParser.generateApiRangeListString( aRanges ); } else if( !rDataSeq.maData.empty() ) |