summaryrefslogtreecommitdiff
path: root/patches/OOO_1_1/sc-autofilter-empty-nonempty.diff
blob: 564dd650a7e99270bc2f50fb7c243eb2da122204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- /home/sragavan/cvs/bk/ooo-build/build/OOO_1_1_2/sc/source/ui/view/gridwin.cxx	2003-06-02 12:58:42.000000000 +0530
+++ sc/source/ui/view/gridwin.cxx	2004-10-11 11:22:24.000000000 +0530
@@ -159,6 +159,8 @@
 #define SC_AUTOFILTER_ALL		0
 #define	SC_AUTOFILTER_CUSTOM	1
 #define	SC_AUTOFILTER_TOP10		2
+#define	SC_AUTOFILTER_EMPTY		3
+#define	SC_AUTOFILTER_NOTEMPTY		4
 
 //	Modi fuer die FilterListBox
 enum ScFilterBoxMode
@@ -711,7 +713,7 @@
 		long nMaxText = 0;
 
 		//	default entries
-		static const USHORT nDefIDs[] = { SCSTR_ALL, SCSTR_STDFILTER, SCSTR_TOP10FILTER };
+		static const USHORT nDefIDs[] = { SCSTR_ALL, SCSTR_STDFILTER, SCSTR_TOP10FILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY };
 		const USHORT nDefCount = sizeof(nDefIDs) / sizeof(USHORT);
 		for (i=0; i<nDefCount; i++)
 		{
@@ -1087,6 +1089,21 @@
 						rNewEntry.eOp	= SC_TOPVAL;
 						*rNewEntry.pStr	= String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("10"));
 					}
+					else if (nSel == SC_AUTOFILTER_EMPTY)
+					{
+						rNewEntry.pStr->Erase();
+						rNewEntry.bQueryByString = FALSE;
+						rNewEntry.eOp	= SC_EQUAL;
+						rNewEntry.nVal	= SC_EMPTYFIELDS;
+									
+					}
+					else if (nSel == SC_AUTOFILTER_NOTEMPTY)
+					{
+						rNewEntry.pStr->Erase();
+						rNewEntry.bQueryByString = FALSE;				
+						rNewEntry.eOp	= SC_EQUAL;
+						rNewEntry.nVal	= SC_NONEMPTYFIELDS;				
+					}				
 					else
 					{
 						rNewEntry.eOp	= SC_EQUAL;