[Libreoffice-commits] core.git: sc/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Sun Jan 15 23:54:31 UTC 2017
sc/source/filter/inc/formulabase.hxx | 4 ----
sc/source/filter/oox/formulabase.cxx | 25 ++++++-------------------
2 files changed, 6 insertions(+), 23 deletions(-)
New commits:
commit ff407afbb5b121228879a3323c5be12ce2750e1a
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Fri Jan 13 17:29:11 2017 +0100
tdf#48140 replace CellRangeAddress in xlsx import (16)
Change-Id: Ie44a5b8433e2dc2c253d6c439f9308f936a4508f
Reviewed-on: https://gerrit.libreoffice.org/33094
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx
index 46ddbfb..7462426 100644
--- a/sc/source/filter/inc/formulabase.hxx
+++ b/sc/source/filter/inc/formulabase.hxx
@@ -694,10 +694,6 @@ public:
address which has been extracted to orRange, false otherwise.
*/
bool extractCellRange(
- css::table::CellRangeAddress& orRange,
- const ApiTokenSequence& rTokens,
- bool bAllowRelative ) const;
- bool extractCellRange(
ScRange& orRange,
const ApiTokenSequence& rTokens,
bool bAllowRelative ) const;
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index b2f0ace..74b562c 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1467,11 +1467,10 @@ bool lclConvertToCellAddress( ScAddress& orAddress, const SingleReference& rSing
((nFilterBySheet < 0) || (nFilterBySheet == rSingleRef.Sheet));
}
-bool lclConvertToCellRange( CellRangeAddress& orRange, const ComplexReference& rComplexRef, sal_Int32 nForbiddenFlags, sal_Int32 nFilterBySheet )
+bool lclConvertToCellRange( ScRange& orRange, const ComplexReference& rComplexRef, sal_Int32 nForbiddenFlags, sal_Int32 nFilterBySheet )
{
- orRange = CellRangeAddress( static_cast< sal_Int16 >( rComplexRef.Reference1.Sheet ),
- rComplexRef.Reference1.Column, rComplexRef.Reference1.Row,
- rComplexRef.Reference2.Column, rComplexRef.Reference2.Row );
+ orRange = ScRange( rComplexRef.Reference1.Column, rComplexRef.Reference1.Row, rComplexRef.Reference1.Sheet,
+ rComplexRef.Reference2.Column, rComplexRef.Reference2.Row, rComplexRef.Reference2.Sheet );
return
!getFlag( rComplexRef.Reference1.Flags, nForbiddenFlags ) &&
!getFlag( rComplexRef.Reference2.Flags, nForbiddenFlags ) &&
@@ -1500,10 +1499,11 @@ TokenToRangeListState lclProcessRef( ApiCellRangeList& orRanges, const Any& rDat
ComplexReference aComplexRef;
if( rData >>= aComplexRef )
{
- CellRangeAddress aRange;
+ ScRange aRange;
// ignore invalid ranges (with #REF! errors), but do not stop parsing
if( lclConvertToCellRange( aRange, aComplexRef, nForbiddenFlags, nFilterBySheet ) )
- orRanges.push_back( aRange );
+ orRanges.push_back( CellRangeAddress(aRange.aStart.Tab(), aRange.aStart.Col(), aRange.aStart.Row(),
+ aRange.aEnd.Col(), aRange.aEnd.Row()) );
return STATE_REF;
}
return STATE_ERROR;
@@ -1598,19 +1598,6 @@ Any FormulaProcessorBase::extractReference( const ApiTokenSequence& rTokens ) co
return Any();
}
-bool FormulaProcessorBase::extractCellRange( CellRangeAddress& orRange,
- const ApiTokenSequence& rTokens, bool bAllowRelative ) const
-{
- ApiCellRangeList aRanges;
- lclProcessRef( aRanges, extractReference( rTokens ), bAllowRelative, -1 );
- if( !aRanges.empty() )
- {
- orRange = aRanges.front();
- return true;
- }
- return false;
-}
-
bool FormulaProcessorBase::extractCellRange( ScRange& orRange,
const ApiTokenSequence& rTokens, bool bAllowRelative ) const
{
More information about the Libreoffice-commits
mailing list