xref: /trunk/main/dbaccess/source/ui/inc/queryorder.hxx (revision cdf0e10c)
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 #ifndef DBAUI_QUERYORDER_HXX
28 #define DBAUI_QUERYORDER_HXX
29 
30 #ifndef _DIALOG_HXX //autogen
31 #include <vcl/dialog.hxx>
32 #endif
33 
34 #ifndef _LSTBOX_HXX //autogen
35 #include <vcl/lstbox.hxx>
36 #endif
37 
38 #ifndef _EDIT_HXX //autogen
39 #include <vcl/edit.hxx>
40 #endif
41 
42 #ifndef _FIXED_HXX //autogen
43 #include <vcl/fixed.hxx>
44 #endif
45 
46 #ifndef _BUTTON_HXX //autogen
47 #include <vcl/button.hxx>
48 #endif
49 
50 #define DOG_ROWS	3
51 
52 namespace rtl
53 {
54 	class OUString;
55 }
56 namespace com
57 {
58 	namespace sun
59 	{
60 		namespace star
61 		{
62 			namespace sdb
63 			{
64 				class XSingleSelectQueryComposer;
65 			}
66 			namespace sdbc
67 			{
68 				class XConnection;
69 			}
70 			namespace container
71 			{
72 				class XNameAccess;
73 			}
74 			namespace beans
75 			{
76 				struct PropertyValue;
77 				class XPropertySet;
78 			}
79 		}
80 	}
81 }
82 
83 //==================================================================
84 // DlgOrderCrit
85 //==================================================================
86 namespace dbaui
87 {
88 	class DlgOrderCrit : public ModalDialog
89 	{
90 	protected:
91 		ListBox			aLB_ORDERFIELD1;
92 		ListBox			aLB_ORDERVALUE1;
93 		ListBox			aLB_ORDERFIELD2;
94 		ListBox			aLB_ORDERVALUE2;
95 		ListBox			aLB_ORDERFIELD3;
96 		ListBox			aLB_ORDERVALUE3;
97 		FixedText		aFT_ORDERFIELD;
98 		FixedText		aFT_ORDERAFTER1;
99 		FixedText		aFT_ORDERAFTER2;
100 		FixedText		aFT_ORDEROPER;
101 		FixedText		aFT_ORDERDIR;
102 		OKButton		aBT_OK;
103 		CancelButton	aBT_CANCEL;
104 		HelpButton		aBT_HELP;
105         FixedLine       aFL_ORDER;
106 		String			aSTR_NOENTRY;
107 		::rtl::OUString	m_sOrgOrder;
108 
109 		::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer> m_xQueryComposer;
110 		::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>	m_xColumns;
111 		::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>		m_xConnection;
112 
113 
114 		ListBox*		m_aColumnList[DOG_ROWS];
115 		ListBox*		m_aValueList[DOG_ROWS];
116 
117 		DECL_LINK( FieldListSelectHdl, ListBox * );
118 		void			EnableLines();
119 
120 	public:
121 		DlgOrderCrit(	Window * pParent,
122 						const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
123 						const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& _rxComposer,
124 						const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _rxCols);
125 
126 						~DlgOrderCrit();
127 		void			BuildOrderPart();
128 
129 		::rtl::OUString	GetOrderList( ) const;
130 		::rtl::OUString	GetOrignalOrder() const { return m_sOrgOrder; }
131 
132     private:
133         void            impl_initializeOrderList_nothrow();
134 	};
135 }
136 #endif // DBAUI_QUERYORDER_HXX
137 
138 
139