summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-12-04 00:29:29 +0100
committerEike Rathke <erack@redhat.com>2013-12-04 00:40:39 +0100
commit507afd9531a89e5c8ec07514a8f741ce21a0b78d (patch)
tree95ca4f9733c34c47b81f0ab3ac659f3400ec2ac7 /sc
parent90102d0832b2bc173b09188604aa311f17c19bbe (diff)
resolved fdo#72288 made case insensitive matrix string query work again
The SharedString stored at ScQueryEntry::Item was constructed from an OUString passed from ScMatrixValue::GetString() so rItem.maString.getDataIgnoreCase() in QueryEvaluator::compareByString() was NULL and never evaluated equal. Made ScMatrixValue::GetString() return a SharedString instead. Change-Id: I473d5724dfb97707fea58e6b72b1396c049b79c8 (cherry picked from commit 882665d821a2fc705b7ae03372c2ae7593028210)
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/scmatrix.hxx2
-rw-r--r--sc/source/core/data/validat.cxx2
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/filter/excel/xeformula.cxx6
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xilink.cxx4
-rw-r--r--sc/source/filter/xml/XMLExportDDELinks.cxx2
7 files changed, 10 insertions, 10 deletions
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index f2508a658a08..93105dd316df 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -54,7 +54,7 @@ struct ScMatrixValue
ScMatValType nType;
/// Only valid if ScMatrix methods indicate so!
- OUString GetString() const { return aStr.getString(); }
+ svl::SharedString GetString() const { return aStr; }
/// Only valid if ScMatrix methods indicate that this is no string!
sal_uInt16 GetError() const { return GetDoubleErrorValue( fVal); }
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 0adc60a40eb2..b7e51bad3cbf 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -731,7 +731,7 @@ bool ScValidationData::GetSelectionFromFormula(
// strings and empties
if( ScMatrix::IsNonValueType( nMatVal.nType ) )
{
- aValStr = nMatVal.GetString();
+ aValStr = nMatVal.GetString().getString();
if( NULL != pStrings )
pEntry = new ScTypedStrData( aValStr, 0.0, ScTypedStrData::Standard);
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index c70fdf410fa1..6983d3e8ac14 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1855,7 +1855,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
}
else
{
- OUString aStr( nMatVal.GetString());
+ svl::SharedString aStr( nMatVal.GetString());
FormulaTokenRef xRes = new FormulaStringToken( aStr);
PushTempToken( new ScMatrixCellResultToken( xMat, xRes.get()));
rRetTypeExpr = NUMBERFORMAT_TEXT;
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index ba02aefae85f..19040ff0e367 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -1319,8 +1319,8 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData )
}
else // string or empty
{
- const OUString& rStr = nMatVal.GetString();
- if( rStr.isEmpty() )
+ const OUString aStr( nMatVal.GetString().getString());
+ if( aStr.isEmpty() )
{
AppendExt( EXC_CACHEDVAL_EMPTY );
AppendExt( 0, 8 );
@@ -1328,7 +1328,7 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData )
else
{
AppendExt( EXC_CACHEDVAL_STRING );
- AppendExt( rStr );
+ AppendExt( aStr );
}
}
}
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index c64006a67642..2e6b4cf54fdb 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -1034,7 +1034,7 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const
}
else if( ScMatrix::IsNonValueType( nMatVal.nType ) )
{
- XclExpString aStr( nMatVal.GetString(), EXC_STR_DEFAULT );
+ XclExpString aStr( nMatVal.GetString().getString(), EXC_STR_DEFAULT );
rStrm.SetSliceSize( 6 );
rStrm << EXC_CACHEDVAL_STRING << aStr;
}
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 3a687eb3c49a..a33da234a82a 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -517,8 +517,8 @@ bool XclImpExtName::CreateOleData(ScDocument& rDoc, const OUString& rUrl,
break;
case SC_MATVAL_STRING:
{
- const OUString& rStr = aVal.GetString();
- ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken(rStr));
+ const svl::SharedString aStr( aVal.GetString());
+ ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken(aStr));
xTab->setCell(nCol, nRow, pToken, 0, false);
}
break;
diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx b/sc/source/filter/xml/XMLExportDDELinks.cxx
index 4c6cfdfde4bc..1d61024b3877 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.cxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.cxx
@@ -52,7 +52,7 @@ void ScXMLExportDDELinks::WriteCell(const ScMatrixValue& aVal, sal_Int32 nRepeat
if (bString)
{
rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_STRING_VALUE, aVal.GetString());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_STRING_VALUE, aVal.GetString().getString());
}
else
{