1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: paramdialog.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DBAUI_PARAMDIALOG_HXX_
32 #define _DBAUI_PARAMDIALOG_HXX_
34 #ifndef _DBAUI_COMMON_TYPES_HXX_
35 #include "commontypes.hxx"
39 #include <vcl/dialog.hxx>
42 #include <vcl/button.hxx>
45 #include <vcl/fixed.hxx>
48 #include <vcl/edit.hxx>
51 #include <vcl/group.hxx>
53 #ifndef _SV_LSTBOX_HXX
54 #include <vcl/lstbox.hxx>
57 #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
58 #include <com/sun/star/util/XNumberFormatter.hpp>
60 #ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
61 #include <com/sun/star/container/XIndexAccess.hpp>
63 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
64 #include <com/sun/star/sdbc/XConnection.hpp>
66 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
67 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
69 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
70 #include <com/sun/star/beans/PropertyValue.hpp>
72 #ifndef CONNECTIVITY_PREDICATEINPUT_HXX
73 #include <connectivity/predicateinput.hxx>
75 #ifndef SVX_QUERYDESIGNCONTEXT_HXX
76 #include "svx/ParseContext.hxx"
79 namespace connectivity
84 //.........................................................................
87 //.........................................................................
89 //==================================================================
91 //==================================================================
92 class OParameterDialog
94 ,public ::svxform::OParseContextClient
98 FixedLine m_aNamesFrame
;
100 FixedText m_aValueFrame
;
102 PushButton m_aTravelNext
;
104 CancelButton m_aCancelBtn
;
106 sal_uInt16 m_nCurrentlySelected
;
108 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexAccess
>
110 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>
112 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>
114 ::dbtools::OPredicateInputController
117 ByteVector m_aVisitedParams
;
118 Timer m_aResetVisitFlag
;
119 // we reset the "visited flag" 1 second after and entry has been selected
121 sal_Bool m_bNeedErrorOnCurrent
;
123 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>
124 m_aFinalValues
; /// the final values as entered by the user
127 OParameterDialog(Window
* _pParent
,
128 const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexAccess
> & _rParamContainer
,
129 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> & _rxConnection
,
130 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
);
133 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>
134 getValues() const { return m_aFinalValues
; }
140 ::connectivity::OSQLParseNode
* implPredicateTree(::rtl::OUString
& _rErrorMessage
, const UniString
& _rStatement
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & _rxField
);
143 DECL_LINK(OnVisitedTimeout
, Timer
*);
144 DECL_LINK(OnValueModified
, Control
*);
145 DECL_LINK(OnEntrySelected
, ListBox
*);
146 DECL_LINK(OnButtonClicked
, PushButton
*);
147 DECL_LINK(OnValueLoseFocus
, Control
*);
150 //.........................................................................
152 //.........................................................................
154 #endif // _DBAUI_PARAMDIALOG_HXX_