[ooo-build-commit] patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Sep 8 19:52:59 PDT 2009


 patches/dev300/calc-filter-by-date-strip-time.diff |  458 ++++++++++-----------
 1 file changed, 229 insertions(+), 229 deletions(-)

New commits:
commit 6f40d13115aa3af129cf7b8866a0325df7ea6023
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Sep 8 22:51:47 2009 -0400

    Adjusted for dev300-m57.
    
    * patches/dev300/calc-filter-by-date-strip-time.diff: adjusted for the
      new filter dialog code which allows more than 3 filtering criteria,
      hence the different code that the old patch no longer applied.

diff --git a/patches/dev300/calc-filter-by-date-strip-time.diff b/patches/dev300/calc-filter-by-date-strip-time.diff
index 84f857c..3009588 100644
--- a/patches/dev300/calc-filter-by-date-strip-time.diff
+++ b/patches/dev300/calc-filter-by-date-strip-time.diff
@@ -1,76 +1,76 @@
 diff --git sc/inc/column.hxx sc/inc/column.hxx
-index ff0c25f..c39ae25 100644
+index dc6dd3e..1d49fc3 100644
 --- sc/inc/column.hxx
 +++ sc/inc/column.hxx
-@@ -379,7 +379,7 @@ public:
+@@ -375,7 +375,7 @@ public:
                  /// Including current, may return -1
-     SCsROW		GetNextUnprotected( SCROW nRow, BOOL bUp ) const;
+ 	SCsROW		GetNextUnprotected( SCROW nRow, BOOL bUp ) const;
  
--    void		GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollection& rStrings);
+-	void		GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollection& rStrings);
 +    void		GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollection& rStrings, bool& rHasDates);
-     BOOL		GetDataEntries(SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit);
+ 	BOOL		GetDataEntries(SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit);
  
  //UNUSED2008-05  SCROW		NoteCount( SCROW nMaxRow = MAXROW ) const;
 diff --git sc/inc/dbcolect.hxx sc/inc/dbcolect.hxx
-index dd18ba2..73b4c3e 100644
+index cee5679..684a028 100644
 --- sc/inc/dbcolect.hxx
 +++ sc/inc/dbcolect.hxx
-@@ -90,6 +90,7 @@ private:
-     SCCOLROW		nQueryField[MAXQUERY];
-     ScQueryOp		eQueryOp[MAXQUERY];
-     BOOL			bQueryByString[MAXQUERY];
+@@ -87,6 +87,7 @@ private:
+ 	SCCOLROW		nQueryField[MAXQUERY];
+ 	ScQueryOp		eQueryOp[MAXQUERY];
+ 	BOOL			bQueryByString[MAXQUERY];
 +    bool            bQueryByDate[MAXQUERY];
-     String*			pQueryStr[MAXQUERY];
-     double			nQueryVal[MAXQUERY];
-     ScQueryConnect  eQueryConnect[MAXQUERY];
+ 	String*			pQueryStr[MAXQUERY];
+ 	double			nQueryVal[MAXQUERY];
+ 	ScQueryConnect  eQueryConnect[MAXQUERY];
 diff --git sc/inc/document.hxx sc/inc/document.hxx
-index bf96edb..ed4c76c 100644
+index f92fa00..6a6d8da 100644
 --- sc/inc/document.hxx
 +++ sc/inc/document.hxx
-@@ -1365,9 +1365,9 @@ public:
-     void 			GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr);
+@@ -1372,9 +1372,9 @@ public:
+ 	void 			GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr);
  
-     BOOL			GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
--                                TypedScStrCollection& rStrings, bool bFilter = false );
+ 	BOOL			GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
+-								TypedScStrCollection& rStrings, bool bFilter = false );
 +                                bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates);
-     SC_DLLPUBLIC BOOL			GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
--                                SCTAB nTab, TypedScStrCollection& rStrings );
+ 	SC_DLLPUBLIC BOOL			GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
+-								SCTAB nTab, TypedScStrCollection& rStrings );
 +                                SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates );
-     BOOL			GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
-                                 TypedScStrCollection& rStrings, BOOL bLimit = FALSE );
-     BOOL			GetFormulaEntries( TypedScStrCollection& rStrings );
+ 	BOOL			GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ 								TypedScStrCollection& rStrings, BOOL bLimit = FALSE );
+ 	BOOL			GetFormulaEntries( TypedScStrCollection& rStrings );
 diff --git sc/inc/global.hxx sc/inc/global.hxx
-index 173175c..4892a3e 100644
+index 0f20776..106fb6b 100644
 --- sc/inc/global.hxx
 +++ sc/inc/global.hxx
-@@ -797,6 +797,7 @@ struct ScQueryEntry
+@@ -791,6 +791,7 @@ struct ScQueryEntry
  {
-     BOOL			bDoQuery;
-     BOOL			bQueryByString;
+ 	BOOL			bDoQuery;
+ 	BOOL			bQueryByString;
 +    bool            bQueryByDate;
-     SCCOLROW		nField;
-     ScQueryOp		eOp;
-     ScQueryConnect  eConnect;
+ 	SCCOLROW		nField;
+ 	ScQueryOp		eOp;
+ 	ScQueryConnect  eConnect;
 diff --git sc/inc/table.hxx sc/inc/table.hxx
-index 42e94e8..74fa999 100644
+index 7f07b4b..f195182 100644
 --- sc/inc/table.hxx
 +++ sc/inc/table.hxx
-@@ -598,8 +598,8 @@ public:
-     SCSIZE		Query(ScQueryParam& rQueryParam, BOOL bKeepSub);
-     BOOL		CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
+@@ -635,8 +635,8 @@ public:
+ 	SCSIZE		Query(ScQueryParam& rQueryParam, BOOL bKeepSub);
+ 	BOOL		CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
  
--    void		GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings);
+-	void		GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings);
 -    void        GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedScStrCollection& rStrings );
 +    void        GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings, bool& rHasDates);
 +    void        GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedScStrCollection& rStrings, bool& rHasDates );
-     BOOL		GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit);
+ 	BOOL		GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit);
  
-     BOOL		HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
+ 	BOOL		HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
 diff --git sc/source/core/data/column3.cxx sc/source/core/data/column3.cxx
-index 1a55c3d..38533c6 100644
+index 5d0b576..f401acb 100644
 --- sc/source/core/data/column3.cxx
 +++ sc/source/core/data/column3.cxx
-@@ -1381,8 +1381,9 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
+@@ -1429,8 +1429,9 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
  }
  
  
@@ -78,12 +78,12 @@ index 1a55c3d..38533c6 100644
 +void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollection& rStrings, bool& rHasDates)
  {
 +    bool bHasDates = false;
-     SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
-     String aString;
+ 	SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
+ 	String aString;
      SCROW nRow = 0;
-@@ -1418,6 +1419,18 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
-                     nValue = 0.0;
-             }
+@@ -1466,6 +1467,18 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
+ 					nValue = 0.0;
+ 			}
  
 +            if (pFormatter)
 +            {
@@ -97,23 +97,23 @@ index 1a55c3d..38533c6 100644
 +                }
 +            }
 +
-             pData = new TypedStrData( aString, nValue, SC_STRTYPE_VALUE );
-         }
+ 			pData = new TypedStrData( aString, nValue, SC_STRTYPE_VALUE );
+ 		}
  #if 0 // DR
-@@ -1436,6 +1449,8 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
+@@ -1484,6 +1497,8 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
  
-         ++nIndex;
-     }
+ 		++nIndex;
+ 	}
 +
 +    rHasDates = bHasDates;
  }
  
  //
 diff --git sc/source/core/data/documen3.cxx sc/source/core/data/documen3.cxx
-index f633dbc..79022cf 100644
+index 902ec78..e5186e6 100644
 --- sc/source/core/data/documen3.cxx
 +++ sc/source/core/data/documen3.cxx
-@@ -1294,7 +1294,8 @@ BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol,
+@@ -1255,7 +1255,8 @@ BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol,
  //	GetFilterEntries - Eintraege fuer AutoFilter-Listbox
  //
  
@@ -121,9 +121,9 @@ index f633dbc..79022cf 100644
 +BOOL ScDocument::GetFilterEntries(
 +    SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates)
  {
-     if ( ValidTab(nTab) && pTab[nTab] && pDBCollection )
-     {
-@@ -1331,11 +1332,11 @@ BOOL ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedScSt
+ 	if ( ValidTab(nTab) && pTab[nTab] && pDBCollection )
+ 	{
+@@ -1292,11 +1293,11 @@ BOOL ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedScSt
  
              if ( bFilter )
              {
@@ -132,30 +132,30 @@ index f633dbc..79022cf 100644
              }
              else
              {
--                pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings );
+-			    pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings );
 +                pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
              }
  
-             return TRUE;
-@@ -1350,11 +1351,11 @@ BOOL ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedScSt
+ 			return TRUE;
+@@ -1311,11 +1312,11 @@ BOOL ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedScSt
  //
  
  BOOL ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
--                                        SCTAB nTab, TypedScStrCollection& rStrings )
+-										SCTAB nTab, TypedScStrCollection& rStrings )
 +                                        SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates )
  {
-     if ( ValidTab(nTab) && pTab[nTab] )
-     {
--        pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings );
+ 	if ( ValidTab(nTab) && pTab[nTab] )
+ 	{
+-		pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings );
 +        pTab[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates );
-         return TRUE;
-     }
+ 		return TRUE;
+ 	}
  
 diff --git sc/source/core/data/global2.cxx sc/source/core/data/global2.cxx
-index 70beb27..3b0d0f6 100644
+index 6984b84..e5aaea9 100644
 --- sc/source/core/data/global2.cxx
 +++ sc/source/core/data/global2.cxx
-@@ -144,30 +144,32 @@ BOOL ScImportParam::operator==( const ScImportParam& rOther ) const
+@@ -145,30 +145,32 @@ BOOL ScImportParam::operator==( const ScImportParam& rOther ) const
  //------------------------------------------------------------------------
  // struct ScQueryParam:
  
@@ -186,60 +186,60 @@ index 70beb27..3b0d0f6 100644
 +    pSearchParam(NULL),
 +    pSearchText(NULL)
  {
--    bDoQuery		= FALSE;
--    bQueryByString	= FALSE;
--    eOp				= SC_EQUAL;
--    eConnect		= SC_AND;
--    nField			= 0;
--    nVal			= 0.0;
--    pStr			= new String;
--    pSearchParam	= NULL;
--    pSearchText		= NULL;
+-	bDoQuery		= FALSE;
+-	bQueryByString	= FALSE;
+-	eOp				= SC_EQUAL;
+-	eConnect		= SC_AND;
+-	nField			= 0;
+-	nVal			= 0.0;
+-	pStr			= new String;
+-	pSearchParam	= NULL;
+-	pSearchText		= NULL;
 -}
 -
 -ScQueryEntry::ScQueryEntry(const ScQueryEntry& r)
 -{
--    bDoQuery		= r.bDoQuery;
--    bQueryByString	= r.bQueryByString;
--    eOp				= r.eOp;
--    eConnect		= r.eConnect;
--    nField			= r.nField;
--    nVal			= r.nVal;
--    pStr			= new String(*r.pStr);
--    pSearchParam	= NULL;
--    pSearchText		= NULL;
+-	bDoQuery		= r.bDoQuery;
+-	bQueryByString	= r.bQueryByString;
+-	eOp				= r.eOp;
+-	eConnect		= r.eConnect;
+-	nField			= r.nField;
+-	nVal			= r.nVal;
+-	pStr			= new String(*r.pStr);
+-	pSearchParam	= NULL;
+-	pSearchText		= NULL;
  }
  
  ScQueryEntry::~ScQueryEntry()
-@@ -184,6 +186,7 @@ ScQueryEntry& ScQueryEntry::operator=( const ScQueryEntry& r )
+@@ -185,6 +187,7 @@ ScQueryEntry& ScQueryEntry::operator=( const ScQueryEntry& r )
  {
-     bDoQuery		= r.bDoQuery;
-     bQueryByString	= r.bQueryByString;
+ 	bDoQuery		= r.bDoQuery;
+ 	bQueryByString	= r.bQueryByString;
 +    bQueryByDate    = r.bQueryByDate;
-     eOp				= r.eOp;
-     eConnect		= r.eConnect;
-     nField			= r.nField;
-@@ -204,6 +207,7 @@ void ScQueryEntry::Clear()
+ 	eOp				= r.eOp;
+ 	eConnect		= r.eConnect;
+ 	nField			= r.nField;
+@@ -205,6 +208,7 @@ void ScQueryEntry::Clear()
  {
-     bDoQuery		= FALSE;
-     bQueryByString	= FALSE;
+ 	bDoQuery		= FALSE;
+ 	bQueryByString	= FALSE;
 +    bQueryByDate    = false;
-     eOp				= SC_EQUAL;
-     eConnect		= SC_AND;
-     nField			= 0;
-@@ -222,6 +226,7 @@ BOOL ScQueryEntry::operator==( const ScQueryEntry& r ) const
+ 	eOp				= SC_EQUAL;
+ 	eConnect		= SC_AND;
+ 	nField			= 0;
+@@ -223,6 +227,7 @@ BOOL ScQueryEntry::operator==( const ScQueryEntry& r ) const
  {
-     return bDoQuery			== r.bDoQuery
-         && bQueryByString	== r.bQueryByString
+ 	return bDoQuery			== r.bDoQuery
+ 		&& bQueryByString	== r.bQueryByString
 +        && bQueryByDate     == r.bQueryByDate
-         && eOp				== r.eOp
-         && eConnect			== r.eConnect
-         && nField			== r.nField
+ 		&& eOp				== r.eOp
+ 		&& eConnect			== r.eConnect
+ 		&& nField			== r.nField
 diff --git sc/source/core/data/table3.cxx sc/source/core/data/table3.cxx
-index a44c7fd..fc5a6da 100644
+index 8d9d549..3172efb 100644
 --- sc/source/core/data/table3.cxx
 +++ sc/source/core/data/table3.cxx
-@@ -61,6 +61,7 @@
+@@ -60,6 +60,7 @@
  #include "progress.hxx"
  #include "cellform.hxx"
  #include "postit.hxx"
@@ -247,7 +247,7 @@ index a44c7fd..fc5a6da 100644
  
  #include <vector>
  
-@@ -1166,6 +1167,20 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
+@@ -991,6 +992,20 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
              }
              else
                  nCellVal = GetValue( static_cast<SCCOL>(rEntry.nField), nRow );
@@ -265,17 +265,17 @@ index a44c7fd..fc5a6da 100644
 +                }
 +            }
 +
-             switch (rEntry.eOp)
-             {
-                 case SC_EQUAL :
-@@ -1888,12 +1903,13 @@ BOOL ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol *
-     return TRUE;
+ 			switch (rEntry.eOp)
+ 			{
+ 				case SC_EQUAL :
+@@ -1778,12 +1793,13 @@ BOOL ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol *
+ 	return TRUE;
  }
  
 -void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings)
 +void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings, bool& rHasDates)
  {
--    aCol[nCol].GetFilterEntries( nRow1, nRow2, rStrings );
+-	aCol[nCol].GetFilterEntries( nRow1, nRow2, rStrings );
 +    aCol[nCol].GetFilterEntries( nRow1, nRow2, rStrings, rHasDates );
  }
  
@@ -285,7 +285,7 @@ index a44c7fd..fc5a6da 100644
  {
      // remove the entry for this column from the query parameter
      ScQueryParam aParam( rParam );
-@@ -1911,15 +1927,18 @@ void ScTable::GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, co
+@@ -1801,15 +1817,18 @@ void ScTable::GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, co
  
      BOOL* pSpecial = new BOOL[nEntryCount];
      lcl_PrepareQuery( pDocument, this, aParam, pSpecial );
@@ -307,185 +307,185 @@ index a44c7fd..fc5a6da 100644
  }
  
 diff --git sc/source/core/tool/dbcolect.cxx sc/source/core/tool/dbcolect.cxx
-index ee42a4e..1304c49 100644
+index 6d6959a..b6acf14 100644
 --- sc/source/core/tool/dbcolect.cxx
 +++ sc/source/core/tool/dbcolect.cxx
-@@ -158,6 +158,7 @@ ScDBData::ScDBData( const ScDBData& rData ) :
-         nQueryField[i]		= rData.nQueryField[i];
-         eQueryOp[i]			= rData.eQueryOp[i];
-         bQueryByString[i]	= rData.bQueryByString[i];
+@@ -157,6 +157,7 @@ ScDBData::ScDBData( const ScDBData& rData ) :
+ 		nQueryField[i]		= rData.nQueryField[i];
+ 		eQueryOp[i]			= rData.eQueryOp[i];
+ 		bQueryByString[i]	= rData.bQueryByString[i];
 +        bQueryByDate[i]     = rData.bQueryByDate[i];
-         pQueryStr[i]		= new String( *(rData.pQueryStr[i]) );
-         nQueryVal[i]		= rData.nQueryVal[i];
-         eQueryConnect[i]	= rData.eQueryConnect[i];
-@@ -248,6 +249,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
-         nQueryField[i]		= rData.nQueryField[i];
-         eQueryOp[i]			= rData.eQueryOp[i];
-         bQueryByString[i]	= rData.bQueryByString[i];
+ 		pQueryStr[i]		= new String( *(rData.pQueryStr[i]) );
+ 		nQueryVal[i]		= rData.nQueryVal[i];
+ 		eQueryConnect[i]	= rData.eQueryConnect[i];
+@@ -246,6 +247,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
+ 		nQueryField[i]		= rData.nQueryField[i];
+ 		eQueryOp[i]			= rData.eQueryOp[i];
+ 		bQueryByString[i]	= rData.bQueryByString[i];
 +        bQueryByDate[i]     = rData.bQueryByDate[i];
-         *pQueryStr[i]		= *rData.pQueryStr[i];
-         nQueryVal[i]		= rData.nQueryVal[i];
-         eQueryConnect[i]	= rData.eQueryConnect[i];
-@@ -518,6 +520,7 @@ void ScDBData::GetQueryParam( ScQueryParam& rQueryParam ) const
-         rEntry.nField = nQueryField[i];
-         rEntry.eOp = eQueryOp[i];
-         rEntry.bQueryByString = bQueryByString[i];
+ 		*pQueryStr[i]		= *rData.pQueryStr[i];
+ 		nQueryVal[i]		= rData.nQueryVal[i];
+ 		eQueryConnect[i]	= rData.eQueryConnect[i];
+@@ -514,6 +516,7 @@ void ScDBData::GetQueryParam( ScQueryParam& rQueryParam ) const
+ 		rEntry.nField = nQueryField[i];
+ 		rEntry.eOp = eQueryOp[i];
+ 		rEntry.bQueryByString = bQueryByString[i];
 +        rEntry.bQueryByDate = bQueryByDate[i];
-         *rEntry.pStr = *pQueryStr[i];
-         rEntry.nVal = nQueryVal[i];
-         rEntry.eConnect = eQueryConnect[i];
-@@ -549,6 +552,7 @@ void ScDBData::SetQueryParam(const ScQueryParam& rQueryParam)
-         nQueryField[i] = rEntry.nField;
-         eQueryOp[i] = rEntry.eOp;
-         bQueryByString[i] = rEntry.bQueryByString;
+ 		*rEntry.pStr = *pQueryStr[i];
+ 		rEntry.nVal = nQueryVal[i];
+ 		rEntry.eConnect = eQueryConnect[i];
+@@ -545,6 +548,7 @@ void ScDBData::SetQueryParam(const ScQueryParam& rQueryParam)
+ 		nQueryField[i] = rEntry.nField;
+ 		eQueryOp[i] = rEntry.eOp;
+ 		bQueryByString[i] = rEntry.bQueryByString;
 +        bQueryByDate[i] = rEntry.bQueryByDate;
-         *pQueryStr[i] = *rEntry.pStr;
-         nQueryVal[i] = rEntry.nVal;
-         eQueryConnect[i] = rEntry.eConnect;
+ 		*pQueryStr[i] = *rEntry.pStr;
+ 		nQueryVal[i] = rEntry.nVal;
+ 		eQueryConnect[i] = rEntry.eConnect;
 diff --git sc/source/ui/dbgui/filtdlg.cxx sc/source/ui/dbgui/filtdlg.cxx
-index b028879..846cbad 100644
+index 33a7c47..c05b1be 100644
 --- sc/source/ui/dbgui/filtdlg.cxx
 +++ sc/source/ui/dbgui/filtdlg.cxx
-@@ -391,21 +391,23 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
-                 SCTAB nTab		 = nSrcTab;
-                 SCROW nFirstRow = theQueryData.nRow1;
+@@ -454,21 +454,23 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
+ 				SCTAB nTab		 = nSrcTab;
+ 				SCROW nFirstRow = theQueryData.nRow1;
  				SCROW nLastRow	 = theQueryData.nRow2;
 +                mbHasDates[nList-1] = false;
  
-                 //	erstmal ohne die erste Zeile
+ 				//	erstmal ohne die erste Zeile
  
-                 pEntryLists[nColumn] = new TypedScStrCollection( 128, 128 );
-                 pEntryLists[nColumn]->SetCaseSensitive( aBtnCase.IsChecked() );
-                 pDoc->GetFilterEntriesArea( nColumn, nFirstRow+1, nLastRow,
--                                            nTab, *pEntryLists[nColumn] );
+ 				pEntryLists[nColumn] = new TypedScStrCollection( 128, 128 );
+ 				pEntryLists[nColumn]->SetCaseSensitive( aBtnCase.IsChecked() );
+ 				pDoc->GetFilterEntriesArea( nColumn, nFirstRow+1, nLastRow,
+-											nTab, *pEntryLists[nColumn] );
 +                                            nTab, *pEntryLists[nColumn], mbHasDates[nList-1] );
  
-                 //	Eintrag fuer die erste Zeile
-                 //!	Eintrag (pHdrEntry) ohne Collection erzeugen?
+ 				//	Eintrag fuer die erste Zeile
+ 				//!	Eintrag (pHdrEntry) ohne Collection erzeugen?
  
-                 nHeaderPos[nColumn] = USHRT_MAX;
-                 TypedScStrCollection aHdrColl( 1, 1 );
+ 				nHeaderPos[nColumn] = USHRT_MAX;
+ 				TypedScStrCollection aHdrColl( 1, 1 );
 +                bool bDummy = false;
-                 pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nFirstRow,
--                                            nTab, aHdrColl );
+ 				pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nFirstRow,
+-											nTab, aHdrColl );
 +                                            nTab, aHdrColl, bDummy );
-                 TypedStrData* pHdrEntry = aHdrColl[0];
-                 if ( pHdrEntry )
-                 {
-@@ -547,6 +549,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
-         if ( bDoThis )
-         {
-             ScQueryEntry& rEntry = theParam.GetEntry(i);
-+            rEntry.bQueryByDate = mbHasDates[i];
- 
-             String aStrVal( aValueEdArr[i]->GetText() );
- 
+ 				TypedStrData* pHdrEntry = aHdrColl[0];
+ 				if ( pHdrEntry )
+ 				{
+@@ -1065,6 +1067,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
+ 		   
+ 			ScQueryOp eOp  = (ScQueryOp)pLbCond->GetSelectEntryPos();
+ 		   rEntry.eOp	  = eOp;
++           rEntry.bQueryByDate = mbHasDates[nQE];
+ 
+ 		}
+ 	}		
 diff --git sc/source/ui/dbgui/pfiltdlg.cxx sc/source/ui/dbgui/pfiltdlg.cxx
-index 35bfc35..42c2c26 100644
+index 13aba33..c78a5e8 100644
 --- sc/source/ui/dbgui/pfiltdlg.cxx
 +++ sc/source/ui/dbgui/pfiltdlg.cxx
 @@ -352,11 +352,12 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
-                 SCROW	nFirstRow	= theQueryData.nRow1;
-                 SCROW	nLastRow	= theQueryData.nRow2;
-                 nFirstRow++;
+ 				SCROW	nFirstRow	= theQueryData.nRow1;
+ 				SCROW	nLastRow	= theQueryData.nRow2;
+ 				nFirstRow++;
 +                bool bHasDates = false;
  
-                 pEntryLists[nColumn] = new TypedScStrCollection( 128, 128 );
-                 pEntryLists[nColumn]->SetCaseSensitive( aBtnCase.IsChecked() );
-                 pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nLastRow,
--                                            nTab, *pEntryLists[nColumn] );
+ 				pEntryLists[nColumn] = new TypedScStrCollection( 128, 128 );
+ 				pEntryLists[nColumn]->SetCaseSensitive( aBtnCase.IsChecked() );
+ 				pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nLastRow,
+-											nTab, *pEntryLists[nColumn] );
 +                                            nTab, *pEntryLists[nColumn], bHasDates );
-             }
+ 			}
  
-             TypedScStrCollection* pColl = pEntryLists[nColumn];
+ 			TypedScStrCollection* pColl = pEntryLists[nColumn];
 diff --git sc/source/ui/inc/filtdlg.hxx sc/source/ui/inc/filtdlg.hxx
-index 62f68e8..c901ef3 100644
+index 77ec11e..aecae0f 100644
 --- sc/source/ui/inc/filtdlg.hxx
 +++ sc/source/ui/inc/filtdlg.hxx
-@@ -158,6 +158,7 @@ private:
-     ComboBox*			aValueEdArr[3];
-     ListBox*			aFieldLbArr[3];
-     ListBox*			aCondLbArr[3];
-+    bool                mbHasDates[3];
-     USHORT				nFieldCount;
-     BOOL				bRefInputMode;
- 
+@@ -167,6 +167,7 @@ private:
+ 	ListBox*			aFieldLbArr[4];
+ 	ListBox*			aCondLbArr[4];
+ 	ListBox*			aConnLbArr[4];
++    bool                mbHasDates[MAXQUERY];
+ 	BOOL                bRefreshExceptQuery[MAXQUERY];
+ 	USHORT				nFieldCount;
+ 	BOOL				bRefInputMode;
 diff --git sc/source/ui/inc/gridwin.hxx sc/source/ui/inc/gridwin.hxx
-index 4664398..f9d9eaa 100644
+index 96e304f..1e05116 100644
 --- sc/source/ui/inc/gridwin.hxx
 +++ sc/source/ui/inc/gridwin.hxx
-@@ -254,7 +254,7 @@ private:
+@@ -218,7 +218,7 @@ private:
  
-     BOOL 			IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
-     void			ExecFilter( ULONG nSel, SCCOL nCol, SCROW nRow,
--                                const String& aValue );
+ 	BOOL 			IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
+ 	void			ExecFilter( ULONG nSel, SCCOL nCol, SCROW nRow,
+-								const String& aValue );
 +                                const String& aValue, bool bCheckForDates );
-     void			FilterSelect( ULONG nSel );
+ 	void			FilterSelect( ULONG nSel );
  
-     void			ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr );
+ 	void			ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr );
 diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
-index b28ce3f..439f98d 100644
+index ca560e4..20ff069 100644
 --- sc/source/ui/view/gridwin.cxx
 +++ sc/source/ui/view/gridwin.cxx
-@@ -171,6 +171,7 @@ private:
-     BOOL			bInit;
-     BOOL			bCancelled;
+@@ -168,6 +168,7 @@ private:
+ 	BOOL			bInit;
+ 	BOOL			bCancelled;
      BOOL            bInSelect;
 +    bool            mbListHasDates;
-     ULONG			nSel;
-     ScFilterBoxMode	eMode;
+ 	ULONG			nSel;
+ 	ScFilterBoxMode	eMode;
  
-@@ -194,6 +195,8 @@ public:
+@@ -191,6 +192,8 @@ public:
      BOOL            IsInInit() const        { return bInit; }
-     void			SetCancelled()			{ bCancelled = TRUE; }
+ 	void			SetCancelled()			{ bCancelled = TRUE; }
      BOOL            IsInSelect() const      { return bInSelect; }
 +    void            SetListHasDates(bool b) { mbListHasDates = b; }
 +    bool            HasDates() const        { return mbListHasDates; }
  };
  
  //-------------------------------------------------------------------
-@@ -209,6 +212,7 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid,
-     bInit( TRUE ),
-     bCancelled( FALSE ),
+@@ -206,6 +209,7 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid,
+ 	bInit( TRUE ),
+ 	bCancelled( FALSE ),
      bInSelect( FALSE ),
 +    mbListHasDates(false),
-     nSel( 0 ),
-     eMode( eNewMode )
+ 	nSel( 0 ),
+ 	eMode( eNewMode )
  {
-@@ -888,7 +892,9 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
+@@ -910,7 +914,9 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
          pFilterBox->SetSeparatorPos( nDefCount - 1 );
  
-         //	get list entries
+ 		//	get list entries
 -        pDoc->GetFilterEntries( nCol, nRow, nTab, aStrings, true );
 +        bool bHasDates = false;
 +        pDoc->GetFilterEntries( nCol, nRow, nTab, true, aStrings, bHasDates);
 +        pFilterBox->SetListHasDates(bHasDates);
  
-         //	check widths of numerical entries (string entries are not included)
-         //	so all numbers are completely visible
-@@ -1052,7 +1058,7 @@ void ScGridWindow::FilterSelect( ULONG nSel )
-             ExecDataSelect( nCol, nRow, aString );
-             break;
-         case SC_FILTERBOX_FILTER:
--            ExecFilter( nSel, nCol, nRow, aString );
+ 		//	check widths of numerical entries (string entries are not included)
+ 		//	so all numbers are completely visible
+@@ -1120,7 +1126,7 @@ void ScGridWindow::FilterSelect( ULONG nSel )
+ 			ExecDataSelect( nCol, nRow, aString );
+ 			break;
+ 		case SC_FILTERBOX_FILTER:
+-			ExecFilter( nSel, nCol, nRow, aString );
 +            ExecFilter( nSel, nCol, nRow, aString, pFilterBox->HasDates() );
-             break;
-         case SC_FILTERBOX_SCENARIO:
-             pViewData->GetView()->UseScenario( aString );
-@@ -1085,7 +1091,7 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr )
+ 			break;
+ 		case SC_FILTERBOX_SCENARIO:
+ 			pViewData->GetView()->UseScenario( aString );
+@@ -1153,7 +1159,7 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr )
  
  void ScGridWindow::ExecFilter( ULONG nSel,
-                                SCCOL nCol, SCROW nRow,
--                               const String& aValue )
+ 							   SCCOL nCol, SCROW nRow,
+-							   const String& aValue )
 +                               const String& aValue, bool bCheckForDates )
  {
-     SCTAB nTab = pViewData->GetTabNo();
-     ScDocument* pDoc = pViewData->GetDocument();
-@@ -1150,6 +1156,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
-                     rNewEntry.bDoQuery		 = TRUE;
-                     rNewEntry.bQueryByString = TRUE;
-                     rNewEntry.nField		 = nCol;
+ 	SCTAB nTab = pViewData->GetTabNo();
+ 	ScDocument* pDoc = pViewData->GetDocument();
+@@ -1225,6 +1231,7 @@ void ScGridWindow::ExecFilter( ULONG nSel,
+ 					rNewEntry.bDoQuery		 = TRUE;
+ 					rNewEntry.bQueryByString = TRUE;
+ 					rNewEntry.nField		 = nCol;
 +                    rNewEntry.bQueryByDate   = bCheckForDates;
-                     if ( nSel == SC_AUTOFILTER_TOP10 )
-                     {
-                         rNewEntry.eOp	= SC_TOPVAL;
+ 					if ( nSel == SC_AUTOFILTER_TOP10 )
+ 					{
+ 						rNewEntry.eOp	= SC_TOPVAL;


More information about the ooo-build-commit mailing list