[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
Eike Rathke
erack at kemper.freedesktop.org
Thu Dec 15 12:23:34 PST 2011
sc/source/core/data/table3.cxx | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
New commits:
commit cad074d663cc6034b73a485a151420287a38d7f9
Author: Eike Rathke <erack at redhat.com>
Date: Thu Dec 15 21:23:09 2011 +0100
Resolved fdo#43831 Advanced FILTER incompatible with 3.4.4 documents
* Reintroduced logic in PrepareQueryItem::operator() that got lost during
rework of ScQueryEntry.
* ScQueryParamBase::FillInExcelSyntax() and the calling
lcl_createExcelQuery() create query entries always as ByString, that
needs to be converted to ByValue if appropriate.
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index b0d261f..e47d88e 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1683,15 +1683,26 @@ public:
void operator() (ScQueryEntry::Item& rItem)
{
- // Double-check if the query by date is really appropriate.
-
- if (rItem.meType != ScQueryEntry::ByDate)
+ if (rItem.meType != ScQueryEntry::ByString && rItem.meType != ScQueryEntry::ByDate)
return;
sal_uInt32 nIndex = 0;
bool bNumber = mrDoc.GetFormatTable()->
IsNumberFormat(rItem.maString, nIndex, rItem.mfVal);
+ // Advanced Filter creates only ByString queries that need to be
+ // converted to ByValue if appropriate. rItem.mfVal now holds the value
+ // if bNumber==true.
+
+ if (rItem.meType == ScQueryEntry::ByString)
+ {
+ if (bNumber)
+ rItem.meType = ScQueryEntry::ByValue;
+ return;
+ }
+
+ // Double-check if the query by date is really appropriate.
+
if (bNumber && ((nIndex % SV_COUNTRY_LANGUAGE_OFFSET) != 0))
{
const SvNumberformat* pEntry = mrDoc.GetFormatTable()->GetEntry(nIndex);
More information about the Libreoffice-commits
mailing list