Kaydet (Commit) 32a254be authored tarafından Eike Rathke's avatar Eike Rathke

resolved rhbz#838248 init filter criteria string

In ScFilterDlg::Init() the string displayed as criteria was empty if
query is ByValue or ByDate. From earlier times the dialog assumed that
the query string was always set corresponding to the value, but internal
handling was changed.

Change-Id: I4f10654f4015b38f7ddba9d6727e06806f1d6b77
üst d3d2f4ec
...@@ -311,7 +311,31 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) ...@@ -311,7 +311,31 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
maCondLbArr[i]->Disable(); maCondLbArr[i]->Disable();
} }
else else
aValStr = rItem.maString; {
if (rItem.maString.isEmpty())
{
if (rItem.meType == ScQueryEntry::ByValue)
pDoc->GetFormatTable()->GetInputLineString( rItem.mfVal, 0, aValStr);
else if (rItem.meType == ScQueryEntry::ByDate)
{
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
pFormatter->GetInputLineString( rItem.mfVal,
pFormatter->GetStandardFormat( NUMBERFORMAT_DATE), aValStr);
}
else
{
SAL_WARN( "sc", "ScFilterDlg::Init: empty query string, really?");
aValStr = rItem.maString;
}
}
else
{
// XXX NOTE: if not ByString we just assume this has been
// set to a proper string corresponding to the numeric
// value earlier!
aValStr = rItem.maString;
}
}
} }
else if ( i == 0 ) else if ( i == 0 )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment