sc/source/ui/dbgui/filtdlg.cxx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
New commits: commit eba3ef8ca5699346572479749c5e4ff5bdd12cae Author: Eike Rathke <er...@redhat.com> Date: Mon Jul 9 18:31:30 2012 +0200 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 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 ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits