summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-12-12 14:08:27 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2011-12-12 14:11:33 -0500
commiteee1cf86fb576125215c52449baea62ee2791442 (patch)
tree839ea16e3499bf5a808fac64d2d2ec4b4044a9c0
parent5cd2ae45c3da7b018b45ce00153f7ca4791a5d11 (diff)
Fix filtering by inequality operators e.g. >5, <=3, etc.
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 26616ebb2619..2bb76ea98aaa 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -1157,7 +1157,11 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
{
rItem.maString = aStrVal;
rItem.mfVal = 0.0;
- rItem.meType = ScQueryEntry::ByString;
+
+ sal_uInt32 nIndex;
+ bool bNumber = pDoc->GetFormatTable()->IsNumberFormat(
+ rItem.maString, nIndex, rItem.mfVal);
+ rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
}
sal_uInt16 nField = pLbField->GetSelectEntryPos();