summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-24 19:42:30 -0400
committerCaolán McNamara <caolanm@redhat.com>2014-04-29 16:23:05 +0000
commitc80717bba0c0a55092ff0b1564191dda22b3bad5 (patch)
tree30b1f83b40253e7f3ebb19a57b6678e95ca99e4c
parent12fef6566fbdad29ebfd8493e2fff56071cf0be3 (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> (cherry picked from commit 9f115c83fe94b0ed86562906f9d96465e59ec761) Reviewed-on: https://gerrit.libreoffice.org/9164 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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] == '<')
{