xref: /AOO41X/main/dbaccess/source/ui/inc/queryorder.hxx (revision 2e2212a7c22e96cf6f6fab0dd042c34a45a64bd6)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef DBAUI_QUERYORDER_HXX
24 #define DBAUI_QUERYORDER_HXX
25 
26 #ifndef _DIALOG_HXX //autogen
27 #include <vcl/dialog.hxx>
28 #endif
29 
30 #ifndef _LSTBOX_HXX //autogen
31 #include <vcl/lstbox.hxx>
32 #endif
33 
34 #ifndef _EDIT_HXX //autogen
35 #include <vcl/edit.hxx>
36 #endif
37 
38 #ifndef _FIXED_HXX //autogen
39 #include <vcl/fixed.hxx>
40 #endif
41 
42 #ifndef _BUTTON_HXX //autogen
43 #include <vcl/button.hxx>
44 #endif
45 
46 #define DOG_ROWS    3
47 
48 namespace rtl
49 {
50     class OUString;
51 }
52 namespace com
53 {
54     namespace sun
55     {
56         namespace star
57         {
58             namespace sdb
59             {
60                 class XSingleSelectQueryComposer;
61             }
62             namespace sdbc
63             {
64                 class XConnection;
65             }
66             namespace container
67             {
68                 class XNameAccess;
69             }
70             namespace beans
71             {
72                 struct PropertyValue;
73                 class XPropertySet;
74             }
75         }
76     }
77 }
78 
79 //==================================================================
80 // DlgOrderCrit
81 //==================================================================
82 namespace dbaui
83 {
84     class DlgOrderCrit : public ModalDialog
85     {
86     protected:
87         ListBox         aLB_ORDERFIELD1;
88         ListBox         aLB_ORDERVALUE1;
89         ListBox         aLB_ORDERFIELD2;
90         ListBox         aLB_ORDERVALUE2;
91         ListBox         aLB_ORDERFIELD3;
92         ListBox         aLB_ORDERVALUE3;
93         FixedText       aFT_ORDERFIELD;
94         FixedText       aFT_ORDERAFTER1;
95         FixedText       aFT_ORDERAFTER2;
96         FixedText       aFT_ORDEROPER;
97         FixedText       aFT_ORDERDIR;
98         OKButton        aBT_OK;
99         CancelButton    aBT_CANCEL;
100         HelpButton      aBT_HELP;
101         FixedLine       aFL_ORDER;
102         String          aSTR_NOENTRY;
103         ::rtl::OUString m_sOrgOrder;
104 
105         ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer> m_xQueryComposer;
106         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns;
107         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>      m_xConnection;
108 
109 
110         ListBox*        m_aColumnList[DOG_ROWS];
111         ListBox*        m_aValueList[DOG_ROWS];
112 
113         DECL_LINK( FieldListSelectHdl, ListBox * );
114         void            EnableLines();
115 
116     public:
117         DlgOrderCrit(   Window * pParent,
118                         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
119                         const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& _rxComposer,
120                         const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxCols);
121 
122                         ~DlgOrderCrit();
123         void            BuildOrderPart();
124 
125         ::rtl::OUString GetOrderList( ) const;
GetOrignalOrder() const126         ::rtl::OUString GetOrignalOrder() const { return m_sOrgOrder; }
127 
128     private:
129         void            impl_initializeOrderList_nothrow();
130     };
131 }
132 #endif // DBAUI_QUERYORDER_HXX
133 
134 
135