summaryrefslogtreecommitdiff
authorEike Rathke <erack@redhat.com>2012-07-09 16:31:30 (GMT)
committer Eike Rathke <erack@redhat.com>2012-07-09 16:53:27 (GMT)
commiteba3ef8ca5699346572479749c5e4ff5bdd12cae (patch) (side-by-side diff)
treeb89027dae9918d7feab81529dddb28fd9785f37d
parent20ed0cf74cc4dc4e181b5403a1faf351b6eb38b7 (diff)
downloadcore-eba3ef8ca5699346572479749c5e4ff5bdd12cae.zip
core-eba3ef8ca5699346572479749c5e4ff5bdd12cae.tar.gz
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
Diffstat (more/less context) (ignore whitespace changes)
-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 4ee8bf6..bca0660 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 )
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 )
{