summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-07-09 16:31:30 (GMT)
committerEike Rathke <erack@redhat.com>2012-07-09 16:53:52 (GMT)
commit32a254be64fbce1fc7b0a9ecae358ce71a56f1d9 (patch)
treebc681fc811ae83c64d4dc81b2851d6af6c645f3a
parentd3d2f4ecc92e1215a2139e2b84e4e991396b3ce1 (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 caa4115..f0b40bd 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -311,7 +311,31 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
maCondLbArr[i]->Disable();
}
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 )
{