summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/gridwin.cxx')
-rw-r--r--sc/source/ui/view/gridwin.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0cd90461a37c..644feab4b654 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -684,7 +684,14 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
const double aDoubleVal = rEntry.GetValue();
bool bSelected = true;
if (!aSelectedValue.empty() || !aSelectedString.empty())
- bSelected = aSelectedValue.count(aDoubleVal) > 0 || aSelectedString.count(aStringVal) > 0;
+ {
+ if (aStringVal.isEmpty())
+ bSelected = aSelectedString.count(aStringVal) > 0;
+ else
+ bSelected
+ = aSelectedValue.count(aDoubleVal) > 0 || aSelectedString.count(aStringVal) > 0;
+ }
+
if ( rEntry.IsDate() )
rControl.addDateMember( aStringVal, rEntry.GetValue(), bSelected );
else