summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2014-09-24 02:11:28 +0200
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-09-23 18:59:18 -0400
commita24dafaaaa5fcb1ffed686f2608e96ae316f72c9 (patch)
treeed932fb5b633ba3210a8d4ff5d1fbf45b5187323 /sc
parentb3db68f6d26b5eee54c3f636a71ad22ff207965e (diff)
fdo#65281 Empty/Not empty doesn't work in columns with date format
"Empty" and "Not empty" predicates were unconditionally overriden in filter dialog for date format columns. Rectify it by preventing the overriding for these functions. Test Plan: * open calc document * define column with date format * put some data and let some columns empty * apply standard filter on date column with "Not empty" function * verify that rows with non empty columns still visible Change-Id: I2111c5a6b6350cab63173d42419069813d1137b6 Reviewed-on: https://gerrit.libreoffice.org/11613 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit 551ee32dfaaddd2aa48efebaefab0730474b656d)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index b6ff4e153f5b..a19b9586ab37 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -1078,15 +1078,18 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
bool bDoThis = (pLbField->GetSelectEntryPos() != 0);
rEntry.bDoQuery = bDoThis;
+ bool bByEmptyOrNotByEmpty = false;
if ( rEntry.bDoQuery || maRefreshExceptQuery[nQE] )
{
if ( aStrEmpty.equals(aStrVal) )
{
+ bByEmptyOrNotByEmpty = true;
rEntry.SetQueryByEmpty();
}
else if ( aStrNotEmpty.equals(aStrVal) )
{
+ bByEmptyOrNotByEmpty = true;
rEntry.SetQueryByNonEmpty();
}
else
@@ -1106,7 +1109,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
ScQueryOp eOp = (ScQueryOp)pLbCond->GetSelectEntryPos();
rEntry.eOp = eOp;
- if (maHasDates[nQE])
+ if (maHasDates[nQE] && !bByEmptyOrNotByEmpty)
rItem.meType = ScQueryEntry::ByDate;
}
}