Fix filtering by inequality operators e.g. >5, <=3, etc.

This commit is contained in:
Kohei Yoshida 2011-12-12 14:08:27 -05:00
parent 5438fef04f
commit f162980219

View file

@ -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();