summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-07-09 18:31:30 +0200
committerEike Rathke <erack@redhat.com>2012-07-09 18:53:27 +0200
commiteba3ef8ca5699346572479749c5e4ff5bdd12cae (patch)
treeb89027dae9918d7feab81529dddb28fd9785f37d
parent20ed0cf74cc4dc4e181b5403a1faf351b6eb38b7 (diff)
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
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 4ee8bf6e80e3..bca066065eee 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -317,7 +317,31 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
317 maCondLbArr[i]->Disable(); 317 maCondLbArr[i]->Disable();
318 } 318 }
319 else 319 else
320 aValStr = rItem.maString; 320 {
321 if (rItem.maString.isEmpty())
322 {
323 if (rItem.meType == ScQueryEntry::ByValue)
324 pDoc->GetFormatTable()->GetInputLineString( rItem.mfVal, 0, aValStr);
325 else if (rItem.meType == ScQueryEntry::ByDate)
326 {
327 SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
328 pFormatter->GetInputLineString( rItem.mfVal,
329 pFormatter->GetStandardFormat( NUMBERFORMAT_DATE), aValStr);
330 }
331 else
332 {
333 SAL_WARN( "sc", "ScFilterDlg::Init: empty query string, really?");
334 aValStr = rItem.maString;
335 }
336 }
337 else
338 {
339 // XXX NOTE: if not ByString we just assume this has been
340 // set to a proper string corresponding to the numeric
341 // value earlier!
342 aValStr = rItem.maString;
343 }
344 }
321 } 345 }
322 else if ( i == 0 ) 346 else if ( i == 0 )
323 { 347 {