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