[Libreoffice-commits] core.git: Branch 'private/kohei/calc-shared-string' - 2 commits - sc/inc sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Tue Oct 8 08:12:44 PDT 2013
sc/inc/queryentry.hxx | 3 --
sc/source/core/tool/interpr1.cxx | 55 ++-----------------------------------
sc/source/core/tool/queryentry.cxx | 2 -
3 files changed, 5 insertions(+), 55 deletions(-)
New commits:
commit b56b566eb41d2261d9b021623ab84cd8da292463
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Oct 8 11:11:48 2013 -0400
Turns out we are not using OpenCL here in the existing interpreter.
Change-Id: I4d511ef8099b5d7fcff07adf401901c9ee089ad3
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 19eee49..8bfe666 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6449,43 +6449,6 @@ void ScInterpreter::ScHLookup()
CalculateLookup(true);
}
-namespace {
-
-#if 1
-bool isFilterByEqualString( const ScQueryParam& )
-{
- return false;
-}
-#else
-bool isFilterByEqualString( const ScQueryParam& rParam )
-{
- if (rParam.bRegExp)
- // filter by regular expression.
- return false;
-
- if (!rParam.GetEntryCount())
- // No entries.
- return false;
-
- const ScQueryEntry& rEntry = rParam.GetEntry(0);
- if (rEntry.eOp != SC_EQUAL)
- return false;
-
- const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
- if (rItems.size() != 1)
- // Multi-item query is not supported.
- return false;
-
- if (rItems[0].meType != ScQueryEntry::ByString)
- // Not by string equality.
- return false;
-
- return true;
-}
-#endif
-
-}
-
void ScInterpreter::CalculateLookup(bool bHLookup)
{
sal_uInt8 nParamCount = GetByte();
@@ -6722,18 +6685,9 @@ void ScInterpreter::CalculateLookup(bool bHLookup)
}
else
{
- if (isFilterByEqualString(aParam))
- {
- nRow = nRow1;
- bFound = true;
- }
- else
- {
- ScAddress aResultPos( nCol1, nRow1, nTab1);
- bFound = LookupQueryWithCache( aResultPos, aParam);
- nRow = aResultPos.Row();
- }
-
+ ScAddress aResultPos( nCol1, nRow1, nTab1);
+ bFound = LookupQueryWithCache( aResultPos, aParam);
+ nRow = aResultPos.Row();
nCol = nSpIndex;
}
commit ae1e055326ce8fdc7294260f5261a040ee8e5a1b
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Oct 8 10:30:15 2013 -0400
Let's not do this.
Change-Id: I93fe9f8c5edbfb08b78b6694771db2dd18d8868c
diff --git a/sc/inc/queryentry.hxx b/sc/inc/queryentry.hxx
index 636372e..a3baea6 100644
--- a/sc/inc/queryentry.hxx
+++ b/sc/inc/queryentry.hxx
@@ -42,9 +42,8 @@ struct SC_DLLPUBLIC ScQueryEntry
QueryType meType;
double mfVal;
OUString maString;
- sal_uIntPtr mnStrId;
- Item() : meType(ByValue), mfVal(0.0), mnStrId(0) {}
+ Item() : meType(ByValue), mfVal(0.0) {}
bool operator== (const Item& r) const;
};
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c621de3..19eee49 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6763,7 +6763,6 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
const OUString& sStr = GetString();
rItem.meType = ScQueryEntry::ByString;
rItem.maString = sStr;
- rItem.mnStrId = pDok->GetSharedStringPool().getIdentifierIgnoreCase(rItem.maString);
}
break;
case svDoubleRef :
@@ -6788,7 +6787,6 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
GetCellString(aStr, aCell);
rItem.meType = ScQueryEntry::ByString;
rItem.maString = aStr;
- rItem.mnStrId = pDok->GetSharedStringPool().getIdentifierIgnoreCase(rItem.maString);
}
}
break;
@@ -6797,7 +6795,6 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
OUString aStr;
const ScMatValType nType = GetDoubleOrStringFromMatrix(rItem.mfVal, aStr);
rItem.maString = aStr;
- rItem.mnStrId = pDok->GetSharedStringPool().getIdentifierIgnoreCase(rItem.maString);
rItem.meType = ScMatrix::IsNonValueType(nType) ?
ScQueryEntry::ByString : ScQueryEntry::ByValue;
}
diff --git a/sc/source/core/tool/queryentry.cxx b/sc/source/core/tool/queryentry.cxx
index e061d0f..1ac1a89 100644
--- a/sc/source/core/tool/queryentry.cxx
+++ b/sc/source/core/tool/queryentry.cxx
@@ -32,7 +32,7 @@
bool ScQueryEntry::Item::operator== (const Item& r) const
{
- return meType == r.meType && mfVal == r.mfVal && maString.equals(r.maString) && mnStrId == r.mnStrId;
+ return meType == r.meType && mfVal == r.mfVal && maString.equals(r.maString);
}
ScQueryEntry::ScQueryEntry() :
More information about the Libreoffice-commits
mailing list