[Libreoffice-commits] core.git: sc/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Thu Jan 12 23:35:35 UTC 2017
sc/source/filter/inc/defnamesbuffer.hxx | 1 -
sc/source/filter/oox/autofilterbuffer.cxx | 7 +++++--
sc/source/filter/oox/defnamesbuffer.cxx | 8 --------
3 files changed, 5 insertions(+), 11 deletions(-)
New commits:
commit 5e0e27e758e6f7fa325f36e6e51540e10bab0fdc
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Thu Jan 12 00:33:46 2017 +0100
tdf#48140 replace CellRangeAddress in xlsx import (14)
Change-Id: Ie322489bd11d2a14810fec87f83ce04c652bea43
Reviewed-on: https://gerrit.libreoffice.org/33002
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/defnamesbuffer.hxx b/sc/source/filter/inc/defnamesbuffer.hxx
index 5a6c812..fed44d8 100644
--- a/sc/source/filter/inc/defnamesbuffer.hxx
+++ b/sc/source/filter/inc/defnamesbuffer.hxx
@@ -117,7 +117,6 @@ public:
/** Returns the token index used in API token arrays (com.sun.star.sheet.FormulaToken). */
inline sal_Int32 getTokenIndex() const { return mnTokenIndex; }
/** Tries to resolve the defined name to an absolute cell range. */
- bool getAbsoluteRange( css::table::CellRangeAddress& orRange ) const;
bool getAbsoluteRange( ScRange& orRange ) const;
private:
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx
index fab9638..3b20a87 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -664,7 +664,7 @@ void AutoFilterBuffer::finalizeImport( sal_Int16 nSheet )
// the built-in defined name 'Criteria' must exist
if( const DefinedName* pCriteriaName = getDefinedNames().getByBuiltinId( BIFF_DEFNAME_CRITERIA, nSheet ).get() )
{
- CellRangeAddress aCriteriaRange;
+ ScRange aCriteriaRange;
if( pCriteriaName->getAbsoluteRange( aCriteriaRange ) )
{
// set some common properties for the filter descriptor
@@ -693,7 +693,10 @@ void AutoFilterBuffer::finalizeImport( sal_Int16 nSheet )
deleted). */
PropertySet aRangeProps( xDatabaseRange );
aRangeProps.setProperty( PROP_AutoFilter, false );
- aRangeProps.setProperty( PROP_FilterCriteriaSource, aCriteriaRange );
+ aRangeProps.setProperty( PROP_FilterCriteriaSource,
+ CellRangeAddress( aCriteriaRange.aStart.Tab(),
+ aCriteriaRange.aStart.Col(), aCriteriaRange.aStart.Row(),
+ aCriteriaRange.aEnd.Col(), aCriteriaRange.aEnd.Row() ));
}
}
}
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index b668d98..1588ce9 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -398,14 +398,6 @@ void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalL
}
}
-bool DefinedName::getAbsoluteRange( CellRangeAddress& orRange ) const
-{
- ScTokenArray* pTokenArray = mpScRangeData->GetCode();
- Sequence< FormulaToken > aFTokenSeq;
- ScTokenConversion::ConvertToTokenSequence(getScDocument(), aFTokenSeq, *pTokenArray);
- return getFormulaParser().extractCellRange( orRange, aFTokenSeq, false );
-}
-
bool DefinedName::getAbsoluteRange( ScRange& orRange ) const
{
ScTokenArray* pTokenArray = mpScRangeData->GetCode();
More information about the Libreoffice-commits
mailing list