xref: /trunk/main/sc/source/ui/inc/pfiltdlg.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_PFILTDLG_HXX
29 #define SC_PFILTDLG_HXX
30 
31 #ifndef _SV_HXX
32 #endif
33 
34 #ifndef _MOREBTN_HXX //autogen
35 #include <vcl/morebtn.hxx>
36 #endif
37 #include <svtools/stdctrl.hxx>
38 #ifndef _BUTTON_HXX //autogen
39 #include <vcl/button.hxx>
40 #endif
41 #ifndef _FIXED_HXX //autogen
42 #include <vcl/fixed.hxx>
43 #endif
44 #ifndef _DIALOG_HXX //autogen
45 #include <vcl/dialog.hxx>
46 #endif
47 #ifndef _LSTBOX_HXX //autogen
48 #include <vcl/lstbox.hxx>
49 #endif
50 #ifndef _COMBOBOX_HXX //autogen
51 #include <vcl/combobox.hxx>
52 #endif
53 #include "address.hxx"
54 #include "queryparam.hxx"
55 
56 //------------------------------------------------------------------
57 
58 class ScViewData;
59 class ScDocument;
60 class ScQueryItem;
61 class TypedScStrCollection;
62 
63 //==================================================================
64 
65 class ScPivotFilterDlg : public ModalDialog
66 {
67 public:
68                     ScPivotFilterDlg( Window* pParent,
69                                       const SfxItemSet& rArgSet, SCTAB nSourceTab );
70                     ~ScPivotFilterDlg();
71 
72     const ScQueryItem&  GetOutputItem();
73 
74 private:
75     FixedLine       aFlCriteria;
76     //----------------------------
77     ListBox         aLbField1;
78     ListBox         aLbCond1;
79     ComboBox        aEdVal1;
80     //----------------------------
81     ListBox         aLbConnect1;
82     ListBox         aLbField2;
83     ListBox         aLbCond2;
84     ComboBox        aEdVal2;
85     //----------------------------
86     ListBox         aLbConnect2;
87     ListBox         aLbField3;
88     ListBox         aLbCond3;
89     ComboBox        aEdVal3;
90     //----------------------------
91     FixedText       aFtConnect;
92     FixedText       aFtField;
93     FixedText       aFtCond;
94     FixedText       aFtVal;
95 
96     FixedLine       aFlOptions;
97     CheckBox        aBtnCase;
98     CheckBox        aBtnRegExp;
99     CheckBox        aBtnUnique;
100     FixedText       aFtDbAreaLabel;
101     FixedInfo       aFtDbArea;
102     OKButton        aBtnOk;
103     CancelButton    aBtnCancel;
104     HelpButton      aBtnHelp;
105     MoreButton      aBtnMore;
106     const String    aStrUndefined;
107     const String    aStrNoName;
108     const String    aStrNone;
109     const String    aStrEmpty;
110     const String    aStrNotEmpty;
111     const String    aStrRow;
112     const String    aStrColumn;
113 
114     const sal_uInt16        nWhichQuery;
115     const ScQueryParam  theQueryData;
116     ScQueryItem*        pOutItem;
117     ScViewData*         pViewData;
118     ScDocument*         pDoc;
119     SCTAB               nSrcTab;
120 
121     sal_uInt16              nFieldCount;
122     ComboBox*           aValueEdArr[3];
123     ListBox*            aFieldLbArr[3];
124     ListBox*            aCondLbArr[3];
125 
126     TypedScStrCollection*   pEntryLists[MAXCOLCOUNT];
127 
128 #ifdef _PFILTDLG_CXX
129 private:
130     void    Init            ( const SfxItemSet& rArgSet );
131     void    FillFieldLists  ();
132     void    UpdateValueList ( sal_uInt16 nList );
133     void    ClearValueList  ( sal_uInt16 nList );
134     sal_uInt16  GetFieldSelPos  ( SCCOL nField );
135 
136     // Handler:
137     DECL_LINK( LbSelectHdl, ListBox* );
138     DECL_LINK( ValModifyHdl, ComboBox* );
139     DECL_LINK( CheckBoxHdl,  CheckBox* );
140 #endif
141 };
142 
143 
144 #endif // SC_PFILTDLG_HXX
145 
146