xref: /AOO41X/main/framework/inc/services/logindialog.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef __FRAMEWORK_LOGINDIALOG_LOGINDIALOG_HXX_
29*cdf0e10cSrcweir #define __FRAMEWORK_LOGINDIALOG_LOGINDIALOG_HXX_
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
32*cdf0e10cSrcweir //	my own includes
33*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #ifndef __FRAMEWORK_THREADHELPER_THREADHELPBASE_HXX_
36*cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx>
37*cdf0e10cSrcweir #endif
38*cdf0e10cSrcweir #include <macros/generic.hxx>
39*cdf0e10cSrcweir #include <macros/debug.hxx>
40*cdf0e10cSrcweir #include <macros/xinterface.hxx>
41*cdf0e10cSrcweir #include <macros/xtypeprovider.hxx>
42*cdf0e10cSrcweir #include <macros/xserviceinfo.hxx>
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir #include <services/logindialog.hrc>
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
47*cdf0e10cSrcweir //	interface includes
48*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
49*cdf0e10cSrcweir #include <com/sun/star/awt/XDialog.hpp>
50*cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp>
51*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySetInfo.hpp>
52*cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp>
53*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp>
54*cdf0e10cSrcweir #include <com/sun/star/lang/Locale.hpp>
55*cdf0e10cSrcweir #include <com/sun/star/util/XFlushable.hpp>
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
58*cdf0e10cSrcweir //	other includes
59*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
60*cdf0e10cSrcweir #include <tools/config.hxx>
61*cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
62*cdf0e10cSrcweir #include <cppuhelper/propshlp.hxx>
63*cdf0e10cSrcweir #include <vcl/dialog.hxx>
64*cdf0e10cSrcweir #include <vcl/fixed.hxx>
65*cdf0e10cSrcweir #include <vcl/edit.hxx>
66*cdf0e10cSrcweir #include <vcl/combobox.hxx>
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
69*cdf0e10cSrcweir #include <vcl/button.hxx>
70*cdf0e10cSrcweir #endif
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
73*cdf0e10cSrcweir #include <vcl/button.hxx>
74*cdf0e10cSrcweir #endif
75*cdf0e10cSrcweir #include <vcl/morebtn.hxx>
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
78*cdf0e10cSrcweir //	namespace
79*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir namespace framework{
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir #define	ANY									::com::sun::star::uno::Any
84*cdf0e10cSrcweir #define	EXCEPTION							::com::sun::star::uno::Exception
85*cdf0e10cSrcweir #define	ILLEGALARGUMENTEXCEPTION			::com::sun::star::lang::IllegalArgumentException
86*cdf0e10cSrcweir #define	IPROPERTYARRAYHELPER				::cppu::IPropertyArrayHelper
87*cdf0e10cSrcweir #define	OBROADCASTHELPER					::cppu::OBroadcastHelper
88*cdf0e10cSrcweir #define	OPROPERTYSETHELPER					::cppu::OPropertySetHelper
89*cdf0e10cSrcweir #define	OUSTRING							::rtl::OUString
90*cdf0e10cSrcweir #define	OWEAKOBJECT							::cppu::OWeakObject
91*cdf0e10cSrcweir #define	PROPERTY							::com::sun::star::beans::Property
92*cdf0e10cSrcweir #define	REFERENCE							::com::sun::star::uno::Reference
93*cdf0e10cSrcweir #define	RUNTIMEEXCEPTION					::com::sun::star::uno::RuntimeException
94*cdf0e10cSrcweir #define	SEQUENCE							::com::sun::star::uno::Sequence
95*cdf0e10cSrcweir #define	XDIALOG								::com::sun::star::awt::XDialog
96*cdf0e10cSrcweir #define	XMULTISERVICEFACTORY				::com::sun::star::lang::XMultiServiceFactory
97*cdf0e10cSrcweir #define	XPROPERTYSETINFO					::com::sun::star::beans::XPropertySetInfo
98*cdf0e10cSrcweir #define	XSERVICEINFO						::com::sun::star::lang::XServiceInfo
99*cdf0e10cSrcweir #define	XTYPEPROVIDER						::com::sun::star::lang::XTypeProvider
100*cdf0e10cSrcweir #define	PROPERTYVALUE						::com::sun::star::beans::PropertyValue
101*cdf0e10cSrcweir #define	LOCALE								::com::sun::star::lang::Locale
102*cdf0e10cSrcweir #define XFLUSHABLE                          ::com::sun::star::util::XFlushable
103*cdf0e10cSrcweir #define XFLUSHLISTENER                      ::com::sun::star::util::XFlushListener
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
106*cdf0e10cSrcweir //	exported const
107*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir #ifdef WNT
110*cdf0e10cSrcweir 	#define	ININAME								DECLARE_ASCII("login.ini")
111*cdf0e10cSrcweir #elif defined UNIX
112*cdf0e10cSrcweir 	#define	ININAME								DECLARE_ASCII("loginrc")
113*cdf0e10cSrcweir #else
114*cdf0e10cSrcweir 	#error "name of login profile unknown!"
115*cdf0e10cSrcweir #endif
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir #define	UNCPATHSEPERATOR						sal_Unicode(0x002F)
118*cdf0e10cSrcweir #define	MAX_SERVERHISTORY						10
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir //	Use follow keys in follow order.
121*cdf0e10cSrcweir //	[Global]
122*cdf0e10cSrcweir //	UserName=as
123*cdf0e10cSrcweir //	ActiveServer=2
124*cdf0e10cSrcweir //	ConnectionType=https
125*cdf0e10cSrcweir //	Language=en-US
126*cdf0e10cSrcweir //	UseProxy=[browser|custom|none]
127*cdf0e10cSrcweir //	SecurityProxy=so-webcache:3128
128*cdf0e10cSrcweir //	dialog=[big|small]
129*cdf0e10cSrcweir //
130*cdf0e10cSrcweir //	[DefaultPorts]
131*cdf0e10cSrcweir //	https=8445
132*cdf0e10cSrcweir //	http=8090
133*cdf0e10cSrcweir //
134*cdf0e10cSrcweir //	[ServerHistory]
135*cdf0e10cSrcweir //	Server_1=localhost
136*cdf0e10cSrcweir //	Server_2=munch:7202
137*cdf0e10cSrcweir //	Server_3=www.xxx.com:8000
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir #define	SECTION_GLOBAL							"Global"
140*cdf0e10cSrcweir #define	SECTION_DEFAULTPORTS					"DefaultPorts"
141*cdf0e10cSrcweir #define	SECTION_SERVERHISTORY					"ServerHistory"
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir #define	SECTION_USERNAME						SECTION_GLOBAL
144*cdf0e10cSrcweir #define	SECTION_ACTIVESERVER					SECTION_GLOBAL
145*cdf0e10cSrcweir #define	SECTION_CONNECTIONTYPE					SECTION_GLOBAL
146*cdf0e10cSrcweir #define	SECTION_LANGUAGE						SECTION_GLOBAL
147*cdf0e10cSrcweir #define SECTION_SECURITYPROXY					SECTION_GLOBAL
148*cdf0e10cSrcweir #define SECTION_DIALOG							SECTION_GLOBAL
149*cdf0e10cSrcweir #define SECTION_HTTP							SECTION_DEFAULTPORTS
150*cdf0e10cSrcweir #define SECTION_HTTPS							SECTION_DEFAULTPORTS
151*cdf0e10cSrcweir #define	SECTION_SERVER_X						SECTION_SERVERHISTORY
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir #define	KEY_USERNAME							"UserName"
154*cdf0e10cSrcweir #define	KEY_ACTIVESERVER						"ActiveServer"
155*cdf0e10cSrcweir #define	KEY_CONNECTIONTYPE						"ConnectionType"
156*cdf0e10cSrcweir #define	KEY_LANGUAGE							"Language"
157*cdf0e10cSrcweir #define	KEY_SERVER_X							"Server_"
158*cdf0e10cSrcweir #define	KEY_SECURITYPROXY						"SecurityProxy"
159*cdf0e10cSrcweir #define KEY_USESECURITYPROXY					"UseProxy"
160*cdf0e10cSrcweir #define KEY_DIALOG								"dialog"
161*cdf0e10cSrcweir #define KEY_HTTP								"http"
162*cdf0e10cSrcweir #define KEY_HTTPS								"https"
163*cdf0e10cSrcweir 
164*cdf0e10cSrcweir #define	PROPERTYNAME_CONNECTIONTYPE				DECLARE_ASCII("ConnectionType"					)
165*cdf0e10cSrcweir #define	PROPERTYNAME_LANGUAGE					DECLARE_ASCII("Language"						)
166*cdf0e10cSrcweir #define PROPERTYNAME_PARENTWINDOW               DECLARE_ASCII("ParentWindow"                    )
167*cdf0e10cSrcweir #define	PROPERTYNAME_PASSWORD					DECLARE_ASCII("Password"						)
168*cdf0e10cSrcweir #define PROPERTYNAME_SECURITYPROXY				DECLARE_ASCII("SecurityProxy"					)
169*cdf0e10cSrcweir #define	PROPERTYNAME_SERVER						DECLARE_ASCII("Server"							)
170*cdf0e10cSrcweir #define	PROPERTYNAME_SERVERHISTORY				DECLARE_ASCII("ServerHistory"					)
171*cdf0e10cSrcweir #define	PROPERTYNAME_USERNAME					DECLARE_ASCII("UserName"						)
172*cdf0e10cSrcweir #define PROPERTYNAME_USEPROXY					DECLARE_ASCII("UseProxy"						)
173*cdf0e10cSrcweir #define PROPERTYNAME_DIALOG						DECLARE_ASCII("Dialog"							)
174*cdf0e10cSrcweir #define PROPERTYNAME_HTTP						DECLARE_ASCII("http"							)
175*cdf0e10cSrcweir #define PROPERTYNAME_HTTPS						DECLARE_ASCII("https"							)
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir #define	PROPERTYHANDLE_CONNECTIONTYPE			1
178*cdf0e10cSrcweir #define	PROPERTYHANDLE_LANGUAGE					2
179*cdf0e10cSrcweir #define PROPERTYHANDLE_PARENTWINDOW             3
180*cdf0e10cSrcweir #define PROPERTYHANDLE_PASSWORD                 4
181*cdf0e10cSrcweir #define PROPERTYHANDLE_SERVER                   5
182*cdf0e10cSrcweir #define PROPERTYHANDLE_SERVERHISTORY            6
183*cdf0e10cSrcweir #define PROPERTYHANDLE_USERNAME                 7
184*cdf0e10cSrcweir #define PROPERTYHANDLE_SECURITYPROXY            8
185*cdf0e10cSrcweir #define PROPERTYHANDLE_USEPROXY		            9
186*cdf0e10cSrcweir #define PROPERTYHANDLE_DIALOG		            10
187*cdf0e10cSrcweir #define PROPERTYHANDLE_HTTP						11
188*cdf0e10cSrcweir #define PROPERTYHANDLE_HTTPS					12
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir #define PROPERTYCOUNT                           12
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
193*cdf0e10cSrcweir //	exported definitions
194*cdf0e10cSrcweir //_________________________________________________________________________________________________________________
195*cdf0e10cSrcweir 
196*cdf0e10cSrcweir struct tIMPL_DialogData
197*cdf0e10cSrcweir {
198*cdf0e10cSrcweir 	OUSTRING				sUserName				;
199*cdf0e10cSrcweir 	OUSTRING				sPassword				;
200*cdf0e10cSrcweir 	SEQUENCE< OUSTRING >	seqServerList			;
201*cdf0e10cSrcweir 	sal_Int32				nActiveServer			;
202*cdf0e10cSrcweir 	OUSTRING				sConnectionType			;
203*cdf0e10cSrcweir 	LOCALE					aLanguage				;
204*cdf0e10cSrcweir 	sal_Int32				nPortHttp				;
205*cdf0e10cSrcweir 	sal_Int32				nPortHttps				;
206*cdf0e10cSrcweir     ANY                     aParentWindow           ;
207*cdf0e10cSrcweir 	OUSTRING				sSecurityProxy			;
208*cdf0e10cSrcweir 	OUSTRING				sUseProxy				;
209*cdf0e10cSrcweir 	OUSTRING				sDialog					;
210*cdf0e10cSrcweir 	sal_Bool				bProxyChanged			;
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir 	// default ctor to initialize empty structure.
213*cdf0e10cSrcweir 	tIMPL_DialogData()
214*cdf0e10cSrcweir 		:	sUserName				( OUSTRING()							)
215*cdf0e10cSrcweir 		,	sPassword				( OUSTRING()							)
216*cdf0e10cSrcweir 		,	seqServerList			( SEQUENCE< OUSTRING >()				)
217*cdf0e10cSrcweir 		,	nActiveServer			( 1										)
218*cdf0e10cSrcweir 		,	sConnectionType			( OUSTRING()							)
219*cdf0e10cSrcweir 		,	aLanguage				( OUSTRING(), OUSTRING(), OUSTRING()	)
220*cdf0e10cSrcweir 		,	nPortHttp				( 0										)
221*cdf0e10cSrcweir 		,	nPortHttps				( 0										)
222*cdf0e10cSrcweir         ,   aParentWindow           (                                       )
223*cdf0e10cSrcweir 		,	sSecurityProxy			( OUSTRING()							)
224*cdf0e10cSrcweir 		,	sUseProxy				( OUSTRING()							)
225*cdf0e10cSrcweir 		,	sDialog					( OUSTRING()							)
226*cdf0e10cSrcweir 		,	bProxyChanged			( sal_False								)
227*cdf0e10cSrcweir 	{
228*cdf0e10cSrcweir 	}
229*cdf0e10cSrcweir 
230*cdf0e10cSrcweir 	// copy ctor to initialize structure with values from another one.
231*cdf0e10cSrcweir 	tIMPL_DialogData( const tIMPL_DialogData& aCopyDataSet )
232*cdf0e10cSrcweir 		:	sUserName				( aCopyDataSet.sUserName				)
233*cdf0e10cSrcweir 		,	sPassword				( aCopyDataSet.sPassword				)
234*cdf0e10cSrcweir 		,	seqServerList			( aCopyDataSet.seqServerList			)
235*cdf0e10cSrcweir 		,	nActiveServer			( aCopyDataSet.nActiveServer			)
236*cdf0e10cSrcweir 		,	sConnectionType			( aCopyDataSet.sConnectionType			)
237*cdf0e10cSrcweir 		,	aLanguage				( aCopyDataSet.aLanguage				)
238*cdf0e10cSrcweir 		,	nPortHttp				( aCopyDataSet.nPortHttp				)
239*cdf0e10cSrcweir 		,	nPortHttps				( aCopyDataSet.nPortHttps				)
240*cdf0e10cSrcweir         ,   aParentWindow           ( aCopyDataSet.aParentWindow            )
241*cdf0e10cSrcweir 		,	sSecurityProxy			( aCopyDataSet.sSecurityProxy			)
242*cdf0e10cSrcweir 		,	sUseProxy				( aCopyDataSet.sUseProxy				)
243*cdf0e10cSrcweir 		,	sDialog					( aCopyDataSet.sDialog					)
244*cdf0e10cSrcweir 		,	bProxyChanged			( aCopyDataSet.bProxyChanged			)
245*cdf0e10cSrcweir 	{
246*cdf0e10cSrcweir 	}
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir 	// assignment operator to cop values from another struct to this one.
249*cdf0e10cSrcweir 	tIMPL_DialogData& operator=( const tIMPL_DialogData& aCopyDataSet )
250*cdf0e10cSrcweir 	{
251*cdf0e10cSrcweir 		sUserName				= aCopyDataSet.sUserName				;
252*cdf0e10cSrcweir 		sPassword				= aCopyDataSet.sPassword				;
253*cdf0e10cSrcweir 		seqServerList			= aCopyDataSet.seqServerList			;
254*cdf0e10cSrcweir 		nActiveServer			= aCopyDataSet.nActiveServer			;
255*cdf0e10cSrcweir 		sConnectionType			= aCopyDataSet.sConnectionType			;
256*cdf0e10cSrcweir 		aLanguage				= aCopyDataSet.aLanguage				;
257*cdf0e10cSrcweir 		nPortHttp				= aCopyDataSet.nPortHttp				;
258*cdf0e10cSrcweir 		nPortHttps				= aCopyDataSet.nPortHttps				;
259*cdf0e10cSrcweir         aParentWindow           = aCopyDataSet.aParentWindow            ;
260*cdf0e10cSrcweir 		sSecurityProxy			= aCopyDataSet.sSecurityProxy           ;
261*cdf0e10cSrcweir 		sUseProxy				= aCopyDataSet.sUseProxy				;
262*cdf0e10cSrcweir 		sDialog					= aCopyDataSet.sDialog					;
263*cdf0e10cSrcweir 		bProxyChanged			= aCopyDataSet.bProxyChanged            ;
264*cdf0e10cSrcweir 		return *this;
265*cdf0e10cSrcweir 	}
266*cdf0e10cSrcweir };
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir /*-************************************************************************************************************//**
269*cdf0e10cSrcweir 	@short		implements an "private inline" dialog class used by follow class LoginDialog to show the dialog
270*cdf0e10cSrcweir 	@descr		This is a VCL- modal dialog and not threadsafe! We use it as private definition in the context of login dialog only!
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir 	@implements	-
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir 	@base		ModalDialog
275*cdf0e10cSrcweir *//*-*************************************************************************************************************/
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir class cIMPL_Dialog	:	public ModalDialog
278*cdf0e10cSrcweir {
279*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
280*cdf0e10cSrcweir 	//	public methods
281*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
282*cdf0e10cSrcweir 
283*cdf0e10cSrcweir 	public:
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
286*cdf0e10cSrcweir 			@short		default ctor
287*cdf0e10cSrcweir 			@descr		This ctor initialize the dialog, load ressources but not set values on edits or check boxes!
288*cdf0e10cSrcweir 						These is implemented by setValues() on the same class.
289*cdf0e10cSrcweir 						You must give us a language identifier to describe which ressource should be used!
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir 			@seealso	method setValues()
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir             @param      "aLanguage" , identifier to describe ressource language
294*cdf0e10cSrcweir             @param      "pParent"   , parent window handle for dialog! If is it NULL -> no parent exist ...
295*cdf0e10cSrcweir 			@return		-
296*cdf0e10cSrcweir 
297*cdf0e10cSrcweir 			@onerror	-
298*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir         cIMPL_Dialog( ::com::sun::star::lang::Locale aLocale, Window* pParent );
301*cdf0e10cSrcweir 
302*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
303*cdf0e10cSrcweir 			@short		default dtor
304*cdf0e10cSrcweir 			@descr		This dtor deinitialize the dialog and free all used ressources.
305*cdf0e10cSrcweir 						But you can't get the values of the dialog. Use getValues() to do this.
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir 			@seealso	method getValues()
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir 			@param		-
310*cdf0e10cSrcweir 			@return		-
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir 			@onerror	-
313*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
314*cdf0e10cSrcweir 
315*cdf0e10cSrcweir 		~cIMPL_Dialog();
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
318*cdf0e10cSrcweir 			@short		set new values on dialog to show
319*cdf0e10cSrcweir 			@descr		Use this to initialize the dialg with new values for showing before execute.
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir 			@seealso	method getValues()
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 			@param		"aDataSet"; struct of variables to set it on dialog controls
324*cdf0e10cSrcweir 			@return		-
325*cdf0e10cSrcweir 
326*cdf0e10cSrcweir 			@onerror	-
327*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir 		void setValues( const tIMPL_DialogData& aDataSet );
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
332*cdf0e10cSrcweir 			@short		get current values from dialog controls
333*cdf0e10cSrcweir 			@descr		Use this if you will get all values of dialog after execute.
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir 			@seealso	method setValues()
336*cdf0e10cSrcweir 
337*cdf0e10cSrcweir 			@param		"aDataSet"; struct of variables filled by dialog
338*cdf0e10cSrcweir 			@return		-
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir 			@onerror	-
341*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir 		tIMPL_DialogData getValues();
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir 		/*-****************************************************************************************************/
346*cdf0e10cSrcweir 		/* handler
347*cdf0e10cSrcweir 		*/
348*cdf0e10cSrcweir 
349*cdf0e10cSrcweir 		DECL_LINK( ClickHdl, void* );
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
352*cdf0e10cSrcweir 	//	private methods
353*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
354*cdf0e10cSrcweir 
355*cdf0e10cSrcweir 	private:
356*cdf0e10cSrcweir 		void			setCustomSettings();
357*cdf0e10cSrcweir 
358*cdf0e10cSrcweir 		void			showDialogExpanded();
359*cdf0e10cSrcweir 		void			showDialogCollapsed();
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
362*cdf0e10cSrcweir 			@short		get a host and port from a concated string form <host>:<port>
363*cdf0e10cSrcweir 
364*cdf0e10cSrcweir 			@param		"aProxyHostPort" ; a string with the following format <host>:<port>
365*cdf0e10cSrcweir 			@param		"aHost"			 ; a host string
366*cdf0e10cSrcweir 			@param		"aPort"			 ; a port string
367*cdf0e10cSrcweir 			@return		-
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir 			@onerror	-
370*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir 		void			getProxyHostPort( const OUSTRING& aProxyHostPort, OUSTRING& aHost, OUSTRING& aPort );
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
375*cdf0e10cSrcweir 			@short		get a ressource for given id from right ressource file
376*cdf0e10cSrcweir 			@descr		This dialog need his own ressource. We can't use the global ressource manager!
377*cdf0e10cSrcweir 						We must use our own.
378*cdf0e10cSrcweir 						You must give us the ressource language. If no right ressource could be found -
379*cdf0e10cSrcweir 						any  existing one is used automaticly!
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir 			@seealso	method setValues()
382*cdf0e10cSrcweir 
383*cdf0e10cSrcweir 			@param		"nId"		; id to convert it in right ressource id
384*cdf0e10cSrcweir 			@param		"aLanguage"	; type of ressource language
385*cdf0e10cSrcweir 			@return		-
386*cdf0e10cSrcweir 
387*cdf0e10cSrcweir 			@onerror	-
388*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
389*cdf0e10cSrcweir 
390*cdf0e10cSrcweir 		static ResId impl_getResId(	sal_uInt16		nId			,
391*cdf0e10cSrcweir 									::com::sun::star::lang::Locale	aLocale	);
392*cdf0e10cSrcweir 
393*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
394*cdf0e10cSrcweir 	//	private member
395*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
396*cdf0e10cSrcweir 
397*cdf0e10cSrcweir 	private:
398*cdf0e10cSrcweir 
399*cdf0e10cSrcweir 		FixedImage			m_imageHeader				;
400*cdf0e10cSrcweir 		FixedText			m_textLoginText				;
401*cdf0e10cSrcweir 		FixedText       	m_textUserName				;
402*cdf0e10cSrcweir 		Edit            	m_editUserName				;
403*cdf0e10cSrcweir 		FixedText       	m_textPassword				;
404*cdf0e10cSrcweir 		Edit            	m_editPassword				;
405*cdf0e10cSrcweir 		FixedLine			m_fixedLineServer			;
406*cdf0e10cSrcweir 		FixedText       	m_textServer				;
407*cdf0e10cSrcweir 		ComboBox        	m_comboServer				;
408*cdf0e10cSrcweir 		FixedLine			m_fixedLineProxySettings	;
409*cdf0e10cSrcweir 		RadioButton			m_radioNoProxy				;
410*cdf0e10cSrcweir 		RadioButton			m_radioBrowserProxy			;
411*cdf0e10cSrcweir 		RadioButton			m_radioCustomProxy			;
412*cdf0e10cSrcweir 		FixedText			m_textSecurityProxy			;
413*cdf0e10cSrcweir 		FixedText			m_textSecurityProxyHost		;
414*cdf0e10cSrcweir 		Edit				m_editSecurityProxyHost		;
415*cdf0e10cSrcweir 		FixedText			m_textSecurityProxyPort		;
416*cdf0e10cSrcweir 		Edit				m_editSecurityProxyPort		;
417*cdf0e10cSrcweir 		FixedLine			m_fixedLineButtons			;
418*cdf0e10cSrcweir 		OKButton        	m_buttonOK					;
419*cdf0e10cSrcweir 		CancelButton    	m_buttonCancel				;
420*cdf0e10cSrcweir 		PushButton			m_buttonAdditionalSettings	;
421*cdf0e10cSrcweir 		Size				m_expandedDialogSize		;
422*cdf0e10cSrcweir 		Size				m_collapsedDialogSize		;
423*cdf0e10cSrcweir 		Point				m_expOKButtonPos			;
424*cdf0e10cSrcweir 		Point				m_expCancelButtonPos		;
425*cdf0e10cSrcweir 		Point				m_expAdditionalButtonPos	;
426*cdf0e10cSrcweir 		Point				m_colOKButtonPos			;
427*cdf0e10cSrcweir 		Point				m_colCancelButtonPos		;
428*cdf0e10cSrcweir 		Point				m_colAdditionalButtonPos	;
429*cdf0e10cSrcweir 		OUSTRING			m_colButtonAddText			;
430*cdf0e10cSrcweir 		OUSTRING			m_expButtonAddText			;
431*cdf0e10cSrcweir 		tIMPL_DialogData	m_aDataSet					;
432*cdf0e10cSrcweir };
433*cdf0e10cSrcweir 
434*cdf0e10cSrcweir /*-************************************************************************************************************//**
435*cdf0e10cSrcweir 	@short
436*cdf0e10cSrcweir 
437*cdf0e10cSrcweir 	@descr		-
438*cdf0e10cSrcweir 
439*cdf0e10cSrcweir 	@implements	XInterface
440*cdf0e10cSrcweir 				XTypeProvider
441*cdf0e10cSrcweir 				XServiceInfo
442*cdf0e10cSrcweir 				XDialog
443*cdf0e10cSrcweir 
444*cdf0e10cSrcweir     @base       ThreadHelpBase
445*cdf0e10cSrcweir 				OWeakObject
446*cdf0e10cSrcweir *//*-*************************************************************************************************************/
447*cdf0e10cSrcweir 
448*cdf0e10cSrcweir class LoginDialog	:	public XTYPEPROVIDER				,
449*cdf0e10cSrcweir 						public XSERVICEINFO					,
450*cdf0e10cSrcweir 						public XDIALOG						,
451*cdf0e10cSrcweir                         public XFLUSHABLE                   ,
452*cdf0e10cSrcweir                         private ThreadHelpBase              ,   // Order of baseclasses is neccessary for right initialization!
453*cdf0e10cSrcweir 						public OBROADCASTHELPER				,
454*cdf0e10cSrcweir 						public OPROPERTYSETHELPER			,
455*cdf0e10cSrcweir 						public OWEAKOBJECT
456*cdf0e10cSrcweir {
457*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
458*cdf0e10cSrcweir 	//	public methods
459*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
460*cdf0e10cSrcweir 
461*cdf0e10cSrcweir 	public:
462*cdf0e10cSrcweir 
463*cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
464*cdf0e10cSrcweir 		//	constructor / destructor
465*cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
466*cdf0e10cSrcweir 
467*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
468*cdf0e10cSrcweir 			@short		-
469*cdf0e10cSrcweir 			@descr		-
470*cdf0e10cSrcweir 
471*cdf0e10cSrcweir 			@seealso	-
472*cdf0e10cSrcweir 
473*cdf0e10cSrcweir 			@param		-
474*cdf0e10cSrcweir 			@return		-
475*cdf0e10cSrcweir 
476*cdf0e10cSrcweir 			@onerror	-
477*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
478*cdf0e10cSrcweir 
479*cdf0e10cSrcweir 	 	LoginDialog( const REFERENCE< XMULTISERVICEFACTORY >& sFactory );
480*cdf0e10cSrcweir 
481*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
482*cdf0e10cSrcweir 			@short		-
483*cdf0e10cSrcweir 			@descr		-
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir 			@seealso	-
486*cdf0e10cSrcweir 
487*cdf0e10cSrcweir 			@param		-
488*cdf0e10cSrcweir 			@return		-
489*cdf0e10cSrcweir 
490*cdf0e10cSrcweir 			@onerror	-
491*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
492*cdf0e10cSrcweir 
493*cdf0e10cSrcweir 		virtual	~LoginDialog();
494*cdf0e10cSrcweir 
495*cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
496*cdf0e10cSrcweir 		//	XInterface, XTypeProvider, XServiceInfo
497*cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
498*cdf0e10cSrcweir 
499*cdf0e10cSrcweir 		DECLARE_XINTERFACE
500*cdf0e10cSrcweir 		DECLARE_XTYPEPROVIDER
501*cdf0e10cSrcweir 		DECLARE_XSERVICEINFO
502*cdf0e10cSrcweir 
503*cdf0e10cSrcweir         //---------------------------------------------------------------------------------------------------------
504*cdf0e10cSrcweir 		//	XFlushable
505*cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
506*cdf0e10cSrcweir 
507*cdf0e10cSrcweir         /*-****************************************************************************************************//**
508*cdf0e10cSrcweir 			@short		write changed values to configuration
509*cdf0e10cSrcweir 			@descr		Normaly the dialog returns with an OK or ERROR value. If OK occure - we flush data
510*cdf0e10cSrcweir 						auomaticly. But otherwise we do nothing. If user of this service wish to use property set
511*cdf0e10cSrcweir 						only without any UI(!) - he must call "flush()" explicitly to write data!
512*cdf0e10cSrcweir 
513*cdf0e10cSrcweir 			@seealso	-
514*cdf0e10cSrcweir 
515*cdf0e10cSrcweir 			@param		-
516*cdf0e10cSrcweir 			@return		-
517*cdf0e10cSrcweir 
518*cdf0e10cSrcweir 			@onerror	-
519*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
520*cdf0e10cSrcweir 
521*cdf0e10cSrcweir     	virtual void SAL_CALL flush() throw( RUNTIMEEXCEPTION );
522*cdf0e10cSrcweir     	virtual void SAL_CALL addFlushListener( const REFERENCE< XFLUSHLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
523*cdf0e10cSrcweir     	virtual void SAL_CALL removeFlushListener( const REFERENCE< XFLUSHLISTENER >& xListener ) throw( RUNTIMEEXCEPTION );
524*cdf0e10cSrcweir 
525*cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
526*cdf0e10cSrcweir 		//	XDialog
527*cdf0e10cSrcweir 		//---------------------------------------------------------------------------------------------------------
528*cdf0e10cSrcweir 
529*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
530*cdf0e10cSrcweir 			@short		set new title of dialog
531*cdf0e10cSrcweir 			@descr		-
532*cdf0e10cSrcweir 
533*cdf0e10cSrcweir 			@seealso	-
534*cdf0e10cSrcweir 
535*cdf0e10cSrcweir 			@param		-
536*cdf0e10cSrcweir 			@return		-
537*cdf0e10cSrcweir 
538*cdf0e10cSrcweir 			@onerror	-
539*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
540*cdf0e10cSrcweir 
541*cdf0e10cSrcweir     	virtual void SAL_CALL setTitle( const OUSTRING& sTitle ) throw( RUNTIMEEXCEPTION );
542*cdf0e10cSrcweir 
543*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
544*cdf0e10cSrcweir 			@short		return the current title of this dialog
545*cdf0e10cSrcweir 			@descr		-
546*cdf0e10cSrcweir 
547*cdf0e10cSrcweir 			@seealso	-
548*cdf0e10cSrcweir 
549*cdf0e10cSrcweir 			@param		-
550*cdf0e10cSrcweir 			@return		-
551*cdf0e10cSrcweir 
552*cdf0e10cSrcweir 			@onerror	-
553*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
554*cdf0e10cSrcweir 
555*cdf0e10cSrcweir     	virtual OUSTRING SAL_CALL getTitle() throw( RUNTIMEEXCEPTION );
556*cdf0e10cSrcweir 
557*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
558*cdf0e10cSrcweir 			@short		show the dialog and return user reaction
559*cdf0e10cSrcweir 			@descr		If user close dialog with OK we return 1 else
560*cdf0e10cSrcweir 						user has cancelled this dialog and we return 0.
561*cdf0e10cSrcweir 						You can use this return value directly as boolean.
562*cdf0e10cSrcweir 
563*cdf0e10cSrcweir 			@seealso	-
564*cdf0e10cSrcweir 
565*cdf0e10cSrcweir 			@param		-
566*cdf0e10cSrcweir 			@return		1; if closed with OK
567*cdf0e10cSrcweir 			@return		0; if cancelled
568*cdf0e10cSrcweir 
569*cdf0e10cSrcweir 			@onerror	We return 0(sal_False).
570*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
571*cdf0e10cSrcweir 
572*cdf0e10cSrcweir     	virtual sal_Int16 SAL_CALL execute() throw( RUNTIMEEXCEPTION );
573*cdf0e10cSrcweir 
574*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
575*cdf0e10cSrcweir 			@short		not implemented yet!
576*cdf0e10cSrcweir 			@descr		-
577*cdf0e10cSrcweir 
578*cdf0e10cSrcweir 			@seealso	-
579*cdf0e10cSrcweir 
580*cdf0e10cSrcweir 			@param		-
581*cdf0e10cSrcweir 			@return		-
582*cdf0e10cSrcweir 
583*cdf0e10cSrcweir 			@onerror	-
584*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
585*cdf0e10cSrcweir 
586*cdf0e10cSrcweir     	virtual void SAL_CALL endExecute() throw( RUNTIMEEXCEPTION );
587*cdf0e10cSrcweir 
588*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
589*cdf0e10cSrcweir 	//	protected methods
590*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
591*cdf0e10cSrcweir 
592*cdf0e10cSrcweir 	protected:
593*cdf0e10cSrcweir 
594*cdf0e10cSrcweir 		//---------------------------------------------------------------------------
595*cdf0e10cSrcweir 		//	OPropertySetHelper
596*cdf0e10cSrcweir 		//---------------------------------------------------------------------------
597*cdf0e10cSrcweir 
598*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
599*cdf0e10cSrcweir 			@short		try to convert a property value
600*cdf0e10cSrcweir 			@descr		This method is calling from helperclass "OPropertySetHelper".
601*cdf0e10cSrcweir 						Don't use this directly!
602*cdf0e10cSrcweir 						You must try to convert the value of given propertyhandle and
603*cdf0e10cSrcweir 						return results of this operation. This will be use to ask vetoable
604*cdf0e10cSrcweir 						listener. If no listener have a veto, we will change value realy!
605*cdf0e10cSrcweir 						( in method setFastPropertyValue_NoBroadcast(...) )
606*cdf0e10cSrcweir 
607*cdf0e10cSrcweir 			@seealso	class OPropertySetHelper
608*cdf0e10cSrcweir 			@seealso	method setFastPropertyValue_NoBroadcast()
609*cdf0e10cSrcweir 			@seealso	method impl_tryToChangeProperty()
610*cdf0e10cSrcweir 
611*cdf0e10cSrcweir 			@param		"aConvertedValue"	new converted value of property
612*cdf0e10cSrcweir 			@param		"aOldValue"			old value of property
613*cdf0e10cSrcweir 			@param		"nHandle"			handle of property
614*cdf0e10cSrcweir 			@param		"aValue"			new value of property
615*cdf0e10cSrcweir 			@return		sal_True if value will be changed, sal_FALSE otherway
616*cdf0e10cSrcweir 
617*cdf0e10cSrcweir 			@onerror	IllegalArgumentException, if you call this with an invalid argument
618*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
619*cdf0e10cSrcweir 
620*cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL convertFastPropertyValue(			ANY&		aConvertedValue	,
621*cdf0e10cSrcweir 								  									ANY&		aOldValue		,
622*cdf0e10cSrcweir 																	sal_Int32	nHandle			,
623*cdf0e10cSrcweir 															const	ANY&		aValue			) throw( ILLEGALARGUMENTEXCEPTION );
624*cdf0e10cSrcweir 
625*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
626*cdf0e10cSrcweir 			@short		set value of a transient property
627*cdf0e10cSrcweir 			@descr		This method is calling from helperclass "OPropertySetHelper".
628*cdf0e10cSrcweir 						Don't use this directly!
629*cdf0e10cSrcweir 						Handle and value are valid everyway! You must set the new value only.
630*cdf0e10cSrcweir 						After this, baseclass send messages to all listener automaticly.
631*cdf0e10cSrcweir 
632*cdf0e10cSrcweir 			@seealso	OPropertySetHelper
633*cdf0e10cSrcweir 
634*cdf0e10cSrcweir 			@param      "nHandle"	handle of property to change
635*cdf0e10cSrcweir 			@param      "aValue"	new value of property
636*cdf0e10cSrcweir 			@return		-
637*cdf0e10cSrcweir 
638*cdf0e10cSrcweir 			@onerror	An exception is thrown.
639*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
640*cdf0e10cSrcweir 
641*cdf0e10cSrcweir 		virtual void SAL_CALL setFastPropertyValue_NoBroadcast(			sal_Int32	nHandle	,
642*cdf0e10cSrcweir 							  									const	ANY&		aValue	) throw( EXCEPTION );
643*cdf0e10cSrcweir 
644*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
645*cdf0e10cSrcweir 			@short		get value of a transient property
646*cdf0e10cSrcweir 			@descr		This method is calling from helperclass "OPropertySetHelper".
647*cdf0e10cSrcweir 						Don't use this directly!
648*cdf0e10cSrcweir 
649*cdf0e10cSrcweir 			@seealso	OPropertySetHelper
650*cdf0e10cSrcweir 
651*cdf0e10cSrcweir 			@param      "nHandle"	handle of property to change
652*cdf0e10cSrcweir 			@param      "aValue"	current value of property
653*cdf0e10cSrcweir 			@return		-
654*cdf0e10cSrcweir 
655*cdf0e10cSrcweir 			@onerror	-
656*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
657*cdf0e10cSrcweir 
658*cdf0e10cSrcweir 		virtual void SAL_CALL getFastPropertyValue(	ANY&		aValue	,
659*cdf0e10cSrcweir 							  						sal_Int32	nHandle	) const;
660*cdf0e10cSrcweir 
661*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
662*cdf0e10cSrcweir 			@short      return structure and information about transient properties
663*cdf0e10cSrcweir 			@descr		This method is calling from helperclass "OPropertySetHelper".
664*cdf0e10cSrcweir 						Don't use this directly!
665*cdf0e10cSrcweir 
666*cdf0e10cSrcweir 			@seealso	OPropertySetHelper
667*cdf0e10cSrcweir 
668*cdf0e10cSrcweir 			@param		-
669*cdf0e10cSrcweir 			@return		structure with property-informations
670*cdf0e10cSrcweir 
671*cdf0e10cSrcweir 			@onerror	-
672*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
673*cdf0e10cSrcweir 
674*cdf0e10cSrcweir 		virtual IPROPERTYARRAYHELPER& SAL_CALL getInfoHelper();
675*cdf0e10cSrcweir 
676*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
677*cdf0e10cSrcweir 			@short		return propertysetinfo
678*cdf0e10cSrcweir 			@descr		You can call this method to get information about transient properties
679*cdf0e10cSrcweir 						of this object.
680*cdf0e10cSrcweir 
681*cdf0e10cSrcweir 			@seealso	OPropertySetHelper
682*cdf0e10cSrcweir 			@seealso	XPropertySet
683*cdf0e10cSrcweir 			@seealso	XMultiPropertySet
684*cdf0e10cSrcweir 
685*cdf0e10cSrcweir 			@param		-
686*cdf0e10cSrcweir 			@return		reference to object with information [XPropertySetInfo]
687*cdf0e10cSrcweir 
688*cdf0e10cSrcweir 			@onerror	-
689*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
690*cdf0e10cSrcweir 
691*cdf0e10cSrcweir 		virtual REFERENCE< XPROPERTYSETINFO > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException);
692*cdf0e10cSrcweir 
693*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
694*cdf0e10cSrcweir 	//	private methods
695*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
696*cdf0e10cSrcweir 
697*cdf0e10cSrcweir 	private:
698*cdf0e10cSrcweir 
699*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
700*cdf0e10cSrcweir 			@short		return table of all supported properties
701*cdf0e10cSrcweir 			@descr		We need this table to initialize our helper baseclass OPropertySetHelper
702*cdf0e10cSrcweir 
703*cdf0e10cSrcweir 			@seealso	-
704*cdf0e10cSrcweir 
705*cdf0e10cSrcweir 			@param		-
706*cdf0e10cSrcweir 			@return		-
707*cdf0e10cSrcweir 
708*cdf0e10cSrcweir 			@onerror	-
709*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
710*cdf0e10cSrcweir 
711*cdf0e10cSrcweir 		const SEQUENCE< PROPERTY > impl_getStaticPropertyDescriptor();
712*cdf0e10cSrcweir 
713*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
714*cdf0e10cSrcweir 			@short		helper method to check if a property will change his value
715*cdf0e10cSrcweir 			@descr		Is neccessary for vetoable listener mechanism of OPropertySethelper.
716*cdf0e10cSrcweir 
717*cdf0e10cSrcweir 			@seealso	-
718*cdf0e10cSrcweir 
719*cdf0e10cSrcweir 			@param		-
720*cdf0e10cSrcweir 			@return		-
721*cdf0e10cSrcweir 
722*cdf0e10cSrcweir 			@onerror	-
723*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
724*cdf0e10cSrcweir 
725*cdf0e10cSrcweir 		sal_Bool impl_tryToChangeProperty(	const	OUSTRING&				sProperty		,
726*cdf0e10cSrcweir 											const	ANY&					aValue			,
727*cdf0e10cSrcweir 													ANY&					aOldValue		,
728*cdf0e10cSrcweir 													ANY&					aConvertedValue	) throw( ILLEGALARGUMENTEXCEPTION );
729*cdf0e10cSrcweir 
730*cdf0e10cSrcweir 		sal_Bool impl_tryToChangeProperty(	const	SEQUENCE< OUSTRING >&	seqProperty		,
731*cdf0e10cSrcweir 											const	ANY&					aValue			,
732*cdf0e10cSrcweir 													ANY&					aOldValue		,
733*cdf0e10cSrcweir 													ANY&					aConvertedValue	) throw( ILLEGALARGUMENTEXCEPTION );
734*cdf0e10cSrcweir 
735*cdf0e10cSrcweir 		sal_Bool impl_tryToChangeProperty(	const	sal_Int32&				nProperty		,
736*cdf0e10cSrcweir 											const	ANY&					aValue			,
737*cdf0e10cSrcweir 													ANY&					aOldValue		,
738*cdf0e10cSrcweir 													ANY&					aConvertedValue	) throw( ILLEGALARGUMENTEXCEPTION );
739*cdf0e10cSrcweir 
740*cdf0e10cSrcweir 		sal_Bool impl_tryToChangeProperty(	const	LOCALE&					aProperty		,
741*cdf0e10cSrcweir 											const	ANY&					aValue			,
742*cdf0e10cSrcweir 													ANY&					aOldValue		,
743*cdf0e10cSrcweir 													ANY&					aConvertedValue	) throw( ILLEGALARGUMENTEXCEPTION );
744*cdf0e10cSrcweir 
745*cdf0e10cSrcweir         sal_Bool impl_tryToChangeProperty(  const   ANY&                    aProperty       ,
746*cdf0e10cSrcweir 											const	ANY&					aValue			,
747*cdf0e10cSrcweir 													ANY&					aOldValue		,
748*cdf0e10cSrcweir 													ANY&					aConvertedValue	) throw( ILLEGALARGUMENTEXCEPTION );
749*cdf0e10cSrcweir 
750*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
751*cdf0e10cSrcweir 			@short		search and open profile
752*cdf0e10cSrcweir 			@descr		This method search and open the ini file. It initialize some member too.
753*cdf0e10cSrcweir 
754*cdf0e10cSrcweir 			@seealso	-
755*cdf0e10cSrcweir 
756*cdf0e10cSrcweir 			@param		-
757*cdf0e10cSrcweir 			@return		-
758*cdf0e10cSrcweir 
759*cdf0e10cSrcweir 			@onerror	-
760*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
761*cdf0e10cSrcweir 
762*cdf0e10cSrcweir 		void impl_openProfile();
763*cdf0e10cSrcweir 
764*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
765*cdf0e10cSrcweir 			@short		close profile and free some member
766*cdf0e10cSrcweir 			@descr		This method close current opened ini file and deinitialize some member too.
767*cdf0e10cSrcweir 
768*cdf0e10cSrcweir 			@seealso	-
769*cdf0e10cSrcweir 
770*cdf0e10cSrcweir 			@param		-
771*cdf0e10cSrcweir 			@return		-
772*cdf0e10cSrcweir 
773*cdf0e10cSrcweir 			@onerror	-
774*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
775*cdf0e10cSrcweir 
776*cdf0e10cSrcweir 		void impl_closeProfile();
777*cdf0e10cSrcweir 
778*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
779*cdf0e10cSrcweir 			@short		write profile and free some member
780*cdf0e10cSrcweir 			@descr		This method writes current settings and deinitialize some member too.
781*cdf0e10cSrcweir 
782*cdf0e10cSrcweir 			@seealso	-
783*cdf0e10cSrcweir 
784*cdf0e10cSrcweir 			@param		-
785*cdf0e10cSrcweir 			@return		-
786*cdf0e10cSrcweir 
787*cdf0e10cSrcweir 			@onerror	-
788*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
789*cdf0e10cSrcweir 		void impl_writeProfile();
790*cdf0e10cSrcweir 
791*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
792*cdf0e10cSrcweir 			@short		check current server history
793*cdf0e10cSrcweir 			@descr		Our current server history implementation can handle 10 elements as maximum.
794*cdf0e10cSrcweir 						If more then 10 elements exist; old ones will be deleted.
795*cdf0e10cSrcweir 
796*cdf0e10cSrcweir 			@seealso	-
797*cdf0e10cSrcweir 
798*cdf0e10cSrcweir 			@param		"seqHistory"; current history
799*cdf0e10cSrcweir 			@return		Sequence< OUString >; checked and repaired history
800*cdf0e10cSrcweir 
801*cdf0e10cSrcweir 			@onerror	-
802*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
803*cdf0e10cSrcweir 
804*cdf0e10cSrcweir 		void impl_addServerToHistory(			SEQUENCE< OUSTRING >&	seqHistory		,
805*cdf0e10cSrcweir 												sal_Int32&				nActiveServer	,
806*cdf0e10cSrcweir 										const	OUSTRING&				sServer			);
807*cdf0e10cSrcweir 
808*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
809*cdf0e10cSrcweir 			@short		helper methods to read/write  properties from/to ini file
810*cdf0e10cSrcweir 			@descr		Using of Config-Class isn't easy everytime :-(
811*cdf0e10cSrcweir 						Thats the reason for these helper. State of operation isn't realy important ..
812*cdf0e10cSrcweir 						but we assert impossible cases or occured errors!
813*cdf0e10cSrcweir 
814*cdf0e10cSrcweir 			@seealso	-
815*cdf0e10cSrcweir 
816*cdf0e10cSrcweir 			@param		-
817*cdf0e10cSrcweir 			@return		-
818*cdf0e10cSrcweir 
819*cdf0e10cSrcweir 			@onerror	Assertions are shown.
820*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
821*cdf0e10cSrcweir 
822*cdf0e10cSrcweir 		void					impl_writeUserName				(	const	OUSTRING&				sUserName		);
823*cdf0e10cSrcweir 		void					impl_writeActiveServer			(			sal_Int32				nActiveServer	);
824*cdf0e10cSrcweir 		void					impl_writeServerHistory			(	const	SEQUENCE< OUSTRING >&	lHistory		);
825*cdf0e10cSrcweir 		void					impl_writeConnectionType		(	const	OUSTRING&				sConnectionType	);
826*cdf0e10cSrcweir 		void					impl_writeLanguage				(	const	LOCALE&					aLanguage		);
827*cdf0e10cSrcweir 		void					impl_writePortHttp				(			sal_Int32				nPort			);
828*cdf0e10cSrcweir 		void					impl_writePortHttps				(			sal_Int32				nPort			);
829*cdf0e10cSrcweir 		void					impl_writeSecurityProxy			(	const	OUSTRING&				sSecurityProxy	);
830*cdf0e10cSrcweir 		void					impl_writeUseProxy				(	const	OUSTRING&				sUseProxy		);
831*cdf0e10cSrcweir 		void					impl_writeDialog				(	const	OUSTRING&				sDialog			);
832*cdf0e10cSrcweir 
833*cdf0e10cSrcweir 		OUSTRING				impl_readUserName				(													);
834*cdf0e10cSrcweir 		sal_Int32				impl_readActiveServer			(													);
835*cdf0e10cSrcweir 		SEQUENCE< OUSTRING >	impl_readServerHistory			(													);
836*cdf0e10cSrcweir 		OUSTRING				impl_readConnectionType			(													);
837*cdf0e10cSrcweir 		LOCALE					impl_readLanguage				(													);
838*cdf0e10cSrcweir 		sal_Int32				impl_readPortHttp				(													);
839*cdf0e10cSrcweir 		sal_Int32				impl_readPortHttps				(													);
840*cdf0e10cSrcweir 		OUSTRING				impl_readSecurityProxy			(													);
841*cdf0e10cSrcweir 		OUSTRING				impl_readUseProxy				(													);
842*cdf0e10cSrcweir 		OUSTRING				impl_readDialog					(													);
843*cdf0e10cSrcweir 
844*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
845*cdf0e10cSrcweir 	//	debug methods
846*cdf0e10cSrcweir 	//	(should be private everyway!)
847*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
848*cdf0e10cSrcweir 
849*cdf0e10cSrcweir 		/*-****************************************************************************************************//**
850*cdf0e10cSrcweir 			@short		debug-method to check incoming parameter of some other mehods of this class
851*cdf0e10cSrcweir 			@descr		The following methods are used to check parameters for other methods
852*cdf0e10cSrcweir 						of this class. The return value is used directly for an ASSERT(...).
853*cdf0e10cSrcweir 
854*cdf0e10cSrcweir 			@seealso	ASSERTs in implementation!
855*cdf0e10cSrcweir 
856*cdf0e10cSrcweir 			@param		references to checking variables
857*cdf0e10cSrcweir 			@return		sal_False on invalid parameter<BR>
858*cdf0e10cSrcweir 						sal_True  otherway
859*cdf0e10cSrcweir 
860*cdf0e10cSrcweir 			@onerror	-
861*cdf0e10cSrcweir 		*//*-*****************************************************************************************************/
862*cdf0e10cSrcweir 
863*cdf0e10cSrcweir 	#ifdef ENABLE_ASSERTIONS
864*cdf0e10cSrcweir 
865*cdf0e10cSrcweir 	private:
866*cdf0e10cSrcweir 
867*cdf0e10cSrcweir 		sal_Bool impldbg_checkParameter_LoginDialog	(	const	REFERENCE< XMULTISERVICEFACTORY >&	xFactory	);
868*cdf0e10cSrcweir 		sal_Bool impldbg_checkParameter_setTitle	(	const	OUSTRING&							sTitle		);
869*cdf0e10cSrcweir 
870*cdf0e10cSrcweir 	#endif	// #ifdef ENABLE_ASSERTIONS
871*cdf0e10cSrcweir 
872*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
873*cdf0e10cSrcweir 	//	variables
874*cdf0e10cSrcweir 	//	(should be private everyway!)
875*cdf0e10cSrcweir 	//-------------------------------------------------------------------------------------------------------------
876*cdf0e10cSrcweir 
877*cdf0e10cSrcweir 	private:
878*cdf0e10cSrcweir 
879*cdf0e10cSrcweir 		REFERENCE< XMULTISERVICEFACTORY >		m_xFactory			;	/// reference to factory, which has created this instance
880*cdf0e10cSrcweir 		OUSTRING								m_sININame			;	/// full qualified path to profile UNC-notation
881*cdf0e10cSrcweir 		Config*									m_pINIManager		;	/// manager for full access to ini file
882*cdf0e10cSrcweir 		sal_Bool								m_bInExecuteMode	;	/// protection against setting of properties during showing of dialog
883*cdf0e10cSrcweir 		cIMPL_Dialog*							m_pDialog			;	/// VCL dialog
884*cdf0e10cSrcweir 		tIMPL_DialogData						m_aPropertySet		;
885*cdf0e10cSrcweir 
886*cdf0e10cSrcweir };		//	class LoginDialog
887*cdf0e10cSrcweir 
888*cdf0e10cSrcweir }		//	namespace framework
889*cdf0e10cSrcweir 
890*cdf0e10cSrcweir #endif	//	#ifndef __FRAMEWORK_LOGINDIALOG_LOGINDIALOG_HXX_
891