update dev300-m58
[ooovba.git] / applied_patches / 0116-sc-autofilter-empty-nonempty.diff
blob0bd9a6788e8b433fdeed56a2f5e12ff05df2352e
1 --- /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
2 +++ sc/source/ui/view/gridwin.cxx 2004-10-11 11:22:24.000000000 +0530
3 @@ -159,6 +159,8 @@
4 #define SC_AUTOFILTER_ALL 0
5 #define SC_AUTOFILTER_TOP10 1
6 #define SC_AUTOFILTER_CUSTOM 2
7 +#define SC_AUTOFILTER_EMPTY 3
8 +#define SC_AUTOFILTER_NOTEMPTY 4
10 // Modi fuer die FilterListBox
11 enum ScFilterBoxMode
12 @@ -711,7 +713,7 @@
13 long nMaxText = 0;
15 // default entries
16 - static const USHORT nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER };
17 + static const USHORT nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_EMPTY, SCSTR_NOTEMPTY };
18 const USHORT nDefCount = sizeof(nDefIDs) / sizeof(USHORT);
19 for (i=0; i<nDefCount; i++)
21 @@ -1087,6 +1089,21 @@
22 rNewEntry.eOp = SC_TOPVAL;
23 *rNewEntry.pStr = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("10"));
25 + else if (nSel == SC_AUTOFILTER_EMPTY)
26 + {
27 + rNewEntry.pStr->Erase();
28 + rNewEntry.bQueryByString = FALSE;
29 + rNewEntry.eOp = SC_EQUAL;
30 + rNewEntry.nVal = SC_EMPTYFIELDS;
32 + }
33 + else if (nSel == SC_AUTOFILTER_NOTEMPTY)
34 + {
35 + rNewEntry.pStr->Erase();
36 + rNewEntry.bQueryByString = FALSE;
37 + rNewEntry.eOp = SC_EQUAL;
38 + rNewEntry.nVal = SC_NONEMPTYFIELDS;
39 + }
40 else
42 rNewEntry.eOp = SC_EQUAL;