summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-24 19:42:30 -0400
committerAndras Timar <andras.timar@collabora.com>2014-04-30 14:56:55 +0200
commitaf3211470e92a26e5715792c861a9186626790bb (patch)
treebae3935530bad2ac2228b088845b941e52aeb878 /sc
parent0510689b7f5a863a493d715afe0b2b2822c00019 (diff)
fdo#77039: Fill the match string even if the raw string is empty.
And in case of an empty string, call svl::SharedString::getEmptyString() to get an empty shared string instance. (cherry picked from commit 50708577850544920c746ebc382d47275452a761) Conflicts: sc/source/core/tool/queryparam.cxx Change-Id: I0923e59f03468790270de8ef22323c0cedad002f Reviewed-on: https://gerrit.libreoffice.org/9155 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/queryparam.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx
index e7f73ca2a83f..eb6ff44e1c6e 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -173,15 +173,17 @@ void ScQueryParamBase::FillInExcelSyntax(
svl::SharedStringPool& rPool, const OUString& rStr, SCSIZE nIndex)
{
const OUString aCellStr = rStr;
- if (!aCellStr.isEmpty())
- {
- if ( nIndex >= maEntries.size() )
- Resize( nIndex+1 );
+ if (nIndex >= maEntries.size())
+ Resize(nIndex+1);
- ScQueryEntry& rEntry = GetEntry(nIndex);
- ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
+ ScQueryEntry& rEntry = GetEntry(nIndex);
+ ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
- rEntry.bDoQuery = sal_True;
+ if (aCellStr.isEmpty())
+ rItem.maString = svl::SharedString::getEmptyString();
+ else
+ {
+ rEntry.bDoQuery = true;
// Operatoren herausfiltern
if (aCellStr[0] == '<')
{