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
|
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: iahndl.hxx,v $
*
* $Revision: 1.20 $
*
* last change: $Author: kz $ $Date: 2008-03-07 12:25:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef UUI_IAHNDL_HXX
#define UUI_IAHNDL_HXX
#ifndef INCLUDED_VECTOR
#include <vector>
#define INCLUDED_VECTOR
#endif
#ifndef _OSL_MUTEX_HXX_
#include "osl/mutex.hxx"
#endif
#ifndef _COM_SUN_STAR_BEANS_OPTIONAL_HPP_
#include "com/sun/star/beans/Optional.hpp"
#endif
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include "com/sun/star/uno/Reference.hxx"
#endif
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include "com/sun/star/uno/Sequence.hxx"
#endif
#ifndef _COM_SUN_STAR_TASK_INTERACTIONCLASSIFICATION_HPP_
#include "com/sun/star/task/InteractionClassification.hpp"
#endif
#ifndef _COM_SUN_STAR_TASK_PASSWORDREQUESTMODE_HPP_
#include "com/sun/star/task/PasswordRequestMode.hpp"
#endif
#ifndef _COM_SUN_STAR_TASK_DOCUMENTMACROCONFIRMATIONREQUEST_HPP_
#include "com/sun/star/task/DocumentMacroConfirmationRequest.hpp"
#endif
#ifndef _SOLAR_H
#include "tools/solar.h"
#endif
#ifndef _ERRCODE_HXX
#include "tools/errcode.hxx"
#endif
#ifndef _SV_WINTYPES_HXX
#include "vcl/wintypes.hxx"
#endif
#ifndef UUI_FLTDLG_HXX
#include "fltdlg.hxx"
#endif
#ifndef _COM_SUN_STAR_SECURITY_XCERTIFICATE_HPP_
#include <com/sun/star/security/XCertificate.hpp>
#endif
#ifndef _COM_SUN_STAR_XML_CRYPTO_XXSECURITYENVIRONMENT_HPP_
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#endif
class Window;
class LoginErrorInfo;
struct CntHTTPCookieRequest;
#define DESCRIPTION_1 1
#define DESCRIPTION_2 2
#define TITLE 3
namespace cssu = com::sun::star::uno;
namespace dcss = ::com::sun::star;
namespace com { namespace sun { namespace star {
namespace document {
class AmbigousFilterRequest;
class FilterOptionsRequest;
class NoSuchFilterRequest;
class LockedDocumentRequest;
}
namespace lang {
class XMultiServiceFactory;
}
namespace task {
class XInteractionContinuation;
class XInteractionHandler;
class XInteractionRequest;
class XPasswordContainer;
}
namespace ucb {
class AuthenticationRequest;
class HandleCookiesRequest;
class NameClashResolveRequest;
class CertificateValidationRequest;
}
namespace uno {
class RuntimeException;
}
} } }
class UUIInteractionHelper
{
private:
osl::Mutex m_aPropertyMutex;
com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >
m_xServiceFactory;
com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_aProperties;
UUIInteractionHelper(UUIInteractionHelper &); // not implemented
void operator =(UUIInteractionHelper); // not implemented
public:
UUIInteractionHelper(com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >
const & rServiceFactory,
com::sun::star::uno::Sequence<
com::sun::star::uno::Any > const & rArguments)
SAL_THROW(());
UUIInteractionHelper(com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >
const & rServiceFactory)
SAL_THROW(());
~UUIInteractionHelper() SAL_THROW(());
void
handleRequest(com::sun::star::uno::Reference<
com::sun::star::task::XInteractionRequest > const &
rRequest)
throw (com::sun::star::uno::RuntimeException);
com::sun::star::beans::Optional< rtl::OUString >
getStringFromRequest(com::sun::star::uno::Reference<
com::sun::star::task::XInteractionRequest > const &
rRequest)
throw (com::sun::star::uno::RuntimeException);
private:
void
handle_impl(com::sun::star::uno::Reference<
com::sun::star::task::XInteractionRequest > const &
rRequest)
throw (com::sun::star::uno::RuntimeException);
sal_Bool
isDomainMatch( rtl::OUString hostName, rtl::OUString certHostName);
static long
handlerequest(void* pHandleData, void* pInteractionHandler);
com::sun::star::beans::Optional< rtl::OUString >
getStringFromRequest_impl(com::sun::star::uno::Reference<
com::sun::star::task::XInteractionRequest > const &
rRequest)
throw (com::sun::star::uno::RuntimeException);
static long
getstringfromrequest(void* pHandleData, void* pInteractionHandler);
Window * getParentProperty() SAL_THROW(());
rtl::OUString getContextProperty() SAL_THROW(());
bool
initPasswordContainer(com::sun::star::uno::Reference<
com::sun::star::task::XPasswordContainer > *
pContainer)
const SAL_THROW(());
com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >
getInteractionHandler() const
SAL_THROW((com::sun::star::uno::RuntimeException));
void executeLoginDialog(LoginErrorInfo & rInfo,
rtl::OUString const & rRealm)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
executeMasterPasswordDialog(LoginErrorInfo & rInfo,
com::sun::star::task::PasswordRequestMode nMode)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
executePasswordDialog(LoginErrorInfo & rInfo,
com::sun::star::task::PasswordRequestMode nMode,
::rtl::OUString aDocumentName)
SAL_THROW((com::sun::star::uno::RuntimeException));
void executeCookieDialog(CntHTTPCookieRequest & rRequest)
SAL_THROW((com::sun::star::uno::RuntimeException));
void executeFilterDialog(rtl::OUString const & rURL ,
uui::FilterNameList const & rFilters,
rtl::OUString & rFilter )
SAL_THROW((com::sun::star::uno::RuntimeException));
sal_Bool executeUnknownAuthDialog( const cssu::Reference< dcss::security::XCertificate >& rXCert )
SAL_THROW((com::sun::star::uno::RuntimeException));
sal_Bool executeSSLWarnDialog( const cssu::Reference< dcss::security::XCertificate >& rXCert,
sal_Int32 const & failures,
const rtl::OUString & hostName)
SAL_THROW((com::sun::star::uno::RuntimeException));
rtl::OUString
getLocalizedDatTimeStr( ::com::sun::star::util::DateTime aDateTime );
USHORT
executeErrorDialog(com::sun::star::task::InteractionClassification
eClassification,
rtl::OUString const & rContext,
rtl::OUString const & rMessage,
WinBits nButtonMask )
SAL_THROW((com::sun::star::uno::RuntimeException));
USHORT
executeMessageBox( rtl::OUString const & rTitle,
rtl::OUString const & rMessage,
WinBits nButtonMask )
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleAuthenticationRequest(
com::sun::star::ucb::AuthenticationRequest const & rRequest,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleCertificateValidationRequest(
com::sun::star::ucb::CertificateValidationRequest const & rRequest,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleNameClashResolveRequest(
com::sun::star::ucb::NameClashResolveRequest const & rRequest,
com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleMasterPasswordRequest(
com::sun::star::task::PasswordRequestMode nMode,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handlePasswordRequest(
com::sun::star::task::PasswordRequestMode nMode,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations,
::rtl::OUString aDocumentName = ::rtl::OUString())
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleCookiesRequest(
com::sun::star::ucb::HandleCookiesRequest const & rRequest,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleNoSuchFilterRequest(
com::sun::star::document::NoSuchFilterRequest const & rRequest,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleAmbigousFilterRequest(
com::sun::star::document::AmbigousFilterRequest const & rRequest,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleFilterOptionsRequest(
com::sun::star::document::FilterOptionsRequest const & rRequest,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleErrorRequest(
com::sun::star::task::InteractionClassification eClassification,
ErrCode nErrorCode,
std::vector< rtl::OUString > const & rArguments,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations,
bool bObtainErrorStringOnly,
bool & bHasErrorString,
rtl::OUString & rErrorString)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleGenericErrorRequest(
sal_Int32 nErrorCode,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations,
bool bObtainErrorStringOnly,
bool & bHasErrorString,
rtl::OUString & rErrorString)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleMacroConfirmRequest(
const ::com::sun::star::task::DocumentMacroConfirmationRequest& _rRequest,
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::task::XInteractionContinuation > > const &
rContinuations
)
SAL_THROW((com::sun::star::uno::RuntimeException));
void
handleBrokenPackageRequest(
std::vector< rtl::OUString > const & rArguments,
::com::sun::star::uno::Sequence<
::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionContinuation > > const &
rContinuations,
bool bObtainErrorStringOnly,
bool & bHasErrorString,
rtl::OUString & rErrorString)
SAL_THROW((::com::sun::star::uno::RuntimeException));
void handleMessageboxRequests(
::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionRequest > const &
rRequest,
bool bObtainErrorStringOnly,
bool & bHasErrorString,
rtl::OUString & rErrorString);
void handleDialogRequests(
::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionRequest > const &
rRequest);
void handleErrorHandlerRequests(
::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionRequest > const &
rRequest,
bool bObtainErrorStringOnly,
bool & bHasErrorString,
rtl::OUString & rErrorString);
void handleLockedDocumentRequest(
::com::sun::star::document::LockedDocumentRequest const & aRequest,
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionContinuation > > const &
rContinuations )
SAL_THROW((::com::sun::star::uno::RuntimeException));
};
#endif // UUI_IAHNDL_HXX
|