LibreOffice Module uui (master) 1
iahndl.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <memory>
21
22#include <com/sun/star/awt/XWindow.hpp>
23#include <com/sun/star/configuration/theDefaultProvider.hpp>
24#include <com/sun/star/configuration/backend/MergeRecoveryRequest.hpp>
25#include <com/sun/star/configuration/backend/StratumCreationException.hpp>
26#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
27#include <com/sun/star/document/BrokenPackageRequest.hpp>
28#include <com/sun/star/document/ExoticFileLoadException.hpp>
29#include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
30#include <com/sun/star/java/WrongJavaVersionException.hpp>
31#include <com/sun/star/lang/XInitialization.hpp>
32#include <com/sun/star/lang/XMultiServiceFactory.hpp>
33#include <com/sun/star/script/ModuleSizeExceededRequest.hpp>
34#include <com/sun/star/task/ErrorCodeIOException.hpp>
35#include <com/sun/star/task/ErrorCodeRequest.hpp>
36#include <com/sun/star/task/InteractionHandler.hpp>
37#include <com/sun/star/task/XInteractionAbort.hpp>
38#include <com/sun/star/task/XInteractionApprove.hpp>
39#include <com/sun/star/task/XInteractionDisapprove.hpp>
40#include <com/sun/star/task/XInteractionHandler2.hpp>
41#include <com/sun/star/task/XInteractionRequest.hpp>
42#include <com/sun/star/ucb/AuthenticationFallbackRequest.hpp>
43#include <com/sun/star/ucb/InteractiveAppException.hpp>
44#include <com/sun/star/ucb/InteractiveLockingLockedException.hpp>
45#include <com/sun/star/ucb/InteractiveLockingNotLockedException.hpp>
46#include <com/sun/star/ucb/InteractiveLockingLockExpiredException.hpp>
47#include <com/sun/star/ucb/InteractiveNetworkConnectException.hpp>
48#include <com/sun/star/ucb/InteractiveNetworkOffLineException.hpp>
49#include <com/sun/star/ucb/InteractiveNetworkReadException.hpp>
50#include <com/sun/star/ucb/InteractiveNetworkResolveNameException.hpp>
51#include <com/sun/star/ucb/InteractiveNetworkWriteException.hpp>
52#include <com/sun/star/ucb/InteractiveWrongMediumException.hpp>
53#include <com/sun/star/ucb/NameClashException.hpp>
54#include <com/sun/star/ucb/NameClashResolveRequest.hpp>
55#include <com/sun/star/ucb/UnsupportedNameClashException.hpp>
56#include <com/sun/star/ucb/XInteractionReplaceExistingData.hpp>
57#include <com/sun/star/ucb/XInteractionSupplyName.hpp>
58#include <com/sun/star/xforms/InvalidDataOnSubmitException.hpp>
59#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
60
61#include <sal/log.hxx>
62#include <rtl/ustrbuf.hxx>
63#include <osl/conditn.hxx>
64#include <unotools/resmgr.hxx>
65#include <utility>
66#include <vcl/errinf.hxx>
67#include <vcl/svapp.hxx>
68#include <vcl/weld.hxx>
72#include <svtools/sfxecode.hxx>
75#include <typelib/typedescription.hxx>
77
78#include <ids.hxx>
79#include <ids.hrc>
80#include <strings.hrc>
81
82#include "getcontinuations.hxx"
83#include "secmacrowarnings.hxx"
84
85#include "iahndl.hxx"
86#include "nameclashdlg.hxx"
87#include <comphelper/string.hxx>
88
89using ::com::sun::star::uno::Sequence;
90using ::com::sun::star::uno::UNO_QUERY;
91using ::com::sun::star::uno::Reference;
92using ::com::sun::star::task::XInteractionContinuation;
93using ::com::sun::star::task::XInteractionAbort;
94using ::com::sun::star::task::XInteractionApprove;
95using ::com::sun::star::uno::XInterface;
96using ::com::sun::star::lang::XInitialization;
97using ::com::sun::star::uno::UNO_QUERY_THROW;
98using ::com::sun::star::task::InteractionHandler;
99using ::com::sun::star::task::XInteractionHandler2;
100using ::com::sun::star::uno::Exception;
101using ::com::sun::star::uno::Any;
102using ::com::sun::star::task::XInteractionRequest;
103using ::com::sun::star::lang::XMultiServiceFactory;
104
105using namespace ::com::sun::star;
106
107namespace {
108
109class HandleData : public osl::Condition
110{
111public:
112 explicit HandleData(
113 uno::Reference< task::XInteractionRequest > xRequest)
114 : m_rRequest(std::move(xRequest)),
115 bHandled( false )
116 {
117 }
118 uno::Reference< task::XInteractionRequest > m_rRequest;
119 bool bHandled;
120 beans::Optional< OUString > m_aResult;
121};
122
123} /* namespace */
124
126 uno::Reference< uno::XComponentContext > xContext)
127 : m_xContext(std::move(xContext))
128{
129}
130
132{
133}
134
136 void* pHandleData, void* pInteractionHelper)
137{
138 HandleData* pHND
139 = static_cast< HandleData * >(pHandleData);
141 = static_cast< UUIInteractionHelper * >(pInteractionHelper);
142 bool bDummy = false;
143 OUString aDummy;
144 pHND->bHandled
145 = pUUI->handleRequest_impl(pHND->m_rRequest, false, bDummy, aDummy);
146 pHND->set();
147}
148
149bool
151 uno::Reference< task::XInteractionRequest > const & rRequest)
152{
154 {
155 // we are not in the main thread, let it handle that stuff
156 HandleData aHD(rRequest);
158 Application::PostUserEvent(aLink,this);
160 sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0;
161 aHD.wait();
162 if (nLockCount)
163 rSolarMutex.acquire(nLockCount);
164 return aHD.bHandled;
165 }
166 else
167 {
168 bool bDummy = false;
169 OUString aDummy;
170 return handleRequest_impl(rRequest, false, bDummy, aDummy);
171 }
172}
173
175 void* pHandleData,void* pInteractionHelper)
176{
177 HandleData* pHND = static_cast<HandleData*>(pHandleData);
178 UUIInteractionHelper* pUUI = static_cast<UUIInteractionHelper*>(pInteractionHelper);
179 pHND->m_aResult = pUUI->getStringFromRequest_impl(pHND->m_rRequest);
180 pHND->set();
181}
182
183beans::Optional< OUString >
185 uno::Reference< task::XInteractionRequest > const & rRequest)
186{
187 bool bSuccess = false;
188 OUString aMessage;
189 handleRequest_impl(rRequest, true, bSuccess, aMessage);
190
191 OSL_ENSURE(bSuccess ||
193 rRequest->getContinuations()),
194 "Interaction request is a candidate for a string representation."
195 "Please implement!");
196
197 return beans::Optional< OUString >(bSuccess, aMessage);
198}
199
200beans::Optional< OUString >
202 uno::Reference< task::XInteractionRequest > const & rRequest)
203{
205 {
206 // we are not in the main thread, let it handle that stuff
207 HandleData aHD(rRequest);
209 Application::PostUserEvent(aLink,this);
211 sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0;
212 aHD.wait();
213 if (nLockCount)
214 rSolarMutex.acquire(nLockCount);
215 return aHD.m_aResult;
216 }
217 else
218 return getStringFromRequest_impl(rRequest);
219}
220
221OUString
223 const OUString& _aMessage,
224 std::vector< OUString > const & rArguments )
225{
226 OUString aMessage = _aMessage;
227
228 SAL_WARN_IF(rArguments.empty(), "uui", "replaceMessageWithArguments: No arguments passed!");
229 for (size_t i = 0; i < rArguments.size(); ++i)
230 {
231 const OUString sReplaceTemplate = "$(ARG" + OUString::number(i+1) + ")";
232 aMessage = aMessage.replaceAll(sReplaceTemplate, rArguments[i]);
233 }
234
235 return aMessage;
236}
237
238bool
240 uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
241 rContinuations)
242{
243 // Only requests with a single continuation (user has no choice, request
244 // is just informational)
245 if (rContinuations.getLength() != 1 )
246 return false;
247
248 // user can only abort or approve, all other continuations are not
249 // considered to be informational.
250 uno::Reference< task::XInteractionApprove > xApprove(
251 rContinuations[0], uno::UNO_QUERY);
252 if (xApprove.is())
253 return true;
254
255 uno::Reference< task::XInteractionAbort > xAbort(
256 rContinuations[0], uno::UNO_QUERY);
257 return xAbort.is();
258}
259
260bool
262 uno::Reference< task::XInteractionRequest > const & rRequest)
263{
266
267 return std::any_of(dataList.cbegin(), dataList.cend(),
268 [&](const InteractionHandlerData& rData) { return handleCustomRequest( rRequest, rData.ServiceName ); });
269}
270
271namespace
272{
273
274 bool lcl_matchesRequest( const Any& i_rRequest, const OUString& i_rTypeName, std::u16string_view i_rPropagation )
275 {
276 const css::uno::TypeDescription aTypeDesc( i_rTypeName );
277 const typelib_TypeDescription* pTypeDesc = aTypeDesc.get();
278 if ( !pTypeDesc || !pTypeDesc->pWeakRef )
279 {
280 SAL_WARN( "uui","no type found for '" << i_rTypeName << "'" );
281 return false;
282 }
283 const css::uno::Type aType( pTypeDesc->pWeakRef );
284
285 const bool bExactMatch = i_rPropagation == u"named-only";
286 if ( bExactMatch )
287 return i_rRequest.getValueType().equals( aType );
288
289 return i_rRequest.isExtractableTo( aType );
290 }
291}
292
293
294bool UUIInteractionHelper::handleCustomRequest( const Reference< XInteractionRequest >& i_rRequest, const OUString& i_rServiceName ) const
295{
296 try
297 {
298 Reference< XInteractionHandler2 > xHandler( m_xContext->getServiceManager()->createInstanceWithContext( i_rServiceName, m_xContext ), UNO_QUERY_THROW );
299
300 Reference< XInitialization > xHandlerInit( xHandler, UNO_QUERY );
301 if ( xHandlerInit.is() )
302 {
304 aInitArgs.put( "Parent", getParentXWindow() );
305 xHandlerInit->initialize( aInitArgs.getWrappedPropertyValues() );
306 }
307
308 if ( xHandler->handleInteractionRequest( i_rRequest ) )
309 return true;
310 }
311 catch( const Exception& )
312 {
314 }
315 return false;
316}
317
318
319bool UUIInteractionHelper::handleTypedHandlerImplementations( Reference< XInteractionRequest > const & rRequest )
320{
321 // the request
322 const Any aRequest( rRequest->getRequest() );
323
324 const StringHashMap::const_iterator aCacheHitTest = m_aTypedCustomHandlers.find( aRequest.getValueTypeName() );
325 if ( aCacheHitTest != m_aTypedCustomHandlers.end() )
326 return handleCustomRequest( rRequest, aCacheHitTest->second );
327
328 // the base registration node for "typed" interaction handlers
329 const ::utl::OConfigurationTreeRoot aConfigRoot( ::utl::OConfigurationTreeRoot::createWithComponentContext(
331 "/org.openoffice.Interaction/InteractionHandlers",
332 -1,
334 ) );
335
336 // loop through all registered implementations
337 const Sequence< OUString > aRegisteredHandlers( aConfigRoot.getNodeNames() );
338 for ( auto const & handlerName : aRegisteredHandlers )
339 {
340 const ::utl::OConfigurationNode aHandlerNode( aConfigRoot.openNode( handlerName ) );
341 const ::utl::OConfigurationNode aTypesNode( aHandlerNode.openNode( "HandledRequestTypes" ) );
342
343 // loop through all the types which the current handler is registered for
344 const Sequence< OUString > aHandledTypes( aTypesNode.getNodeNames() );
345 for ( auto const & type : aHandledTypes )
346 {
347 // the UNO type is the node name
348 ::utl::OConfigurationNode aType( aTypesNode.openNode( type ) );
349 // and there's a child denoting how the responsibility propagates
350 OUString sPropagation;
351 OSL_VERIFY( aType.getNodeValue( "Propagation" ) >>= sPropagation );
352 if ( lcl_matchesRequest( aRequest, type, sPropagation ) )
353 {
354 // retrieve the service/implementation name of the handler
355 OUString sServiceName;
356 OSL_VERIFY( aHandlerNode.getNodeValue( "ServiceName" ) >>= sServiceName );
357 // cache the information who feels responsible for requests of this type
358 m_aTypedCustomHandlers[ aRequest.getValueTypeName() ] = sServiceName;
359 // actually handle the request
360 return handleCustomRequest( rRequest, sServiceName );
361 }
362 }
363 }
364
365 return false;
366}
367
368bool
370 uno::Reference< task::XInteractionRequest > const & rRequest,
371 bool bObtainErrorStringOnly,
372 bool & bHasErrorString,
373 OUString & rErrorString)
374{
375 try
376 {
377 if (!rRequest.is())
378 return false;
379
380 uno::Any aAnyRequest(rRequest->getRequest());
381
382 script::ModuleSizeExceededRequest aModSizeException;
383 if (aAnyRequest >>= aModSizeException )
384 {
385 std::vector< OUString > aArguments;
386 aArguments.push_back(
387 comphelper::string::convertCommaSeparated(aModSizeException.Names));
388 handleErrorHandlerRequest( task::InteractionClassification_WARNING,
391 rRequest->getContinuations(),
392 bObtainErrorStringOnly,
393 bHasErrorString,
394 rErrorString);
395 return true;
396 }
397
398 document::ExoticFileLoadException aExoticFileLoadException;
399 if (aAnyRequest >>= aExoticFileLoadException)
400 {
401 std::vector< OUString > aArguments;
402
403 if( !aExoticFileLoadException.URL.isEmpty() )
404 {
405 aArguments.push_back( aExoticFileLoadException.URL );
406 }
407 if( !aExoticFileLoadException.FilterUIName.isEmpty() )
408 {
409 aArguments.push_back( aExoticFileLoadException.FilterUIName );
410 }
411
412 handleErrorHandlerRequest( task::InteractionClassification_WARNING,
415 rRequest->getContinuations(),
416 bObtainErrorStringOnly,
417 bHasErrorString,
418 rErrorString);
419 return true;
420 }
421
422 ucb::NameClashException aNCException;
423 if (aAnyRequest >>= aNCException)
424 {
426 std::vector< OUString > aArguments;
427
428 if( !aNCException.Name.isEmpty() )
429 {
430 nErrorCode = ERRCODE_UUI_IO_ALREADYEXISTS;
431 aArguments.push_back( aNCException.Name );
432 }
433
434 handleErrorHandlerRequest( aNCException.Classification,
435 nErrorCode,
437 rRequest->getContinuations(),
438 bObtainErrorStringOnly,
439 bHasErrorString,
440 rErrorString);
441 return true;
442 }
443
444 ucb::UnsupportedNameClashException aUORequest;
445 if (aAnyRequest >>= aUORequest)
446 {
447
448 uno::Reference< task::XInteractionApprove > xApprove;
449 uno::Reference< task::XInteractionDisapprove > xDisapprove;
451 rRequest->getContinuations(), &xApprove, &xDisapprove);
452
453 if ( xApprove.is() && xDisapprove.is() )
454 {
455 std::vector< OUString > aArguments;
456 handleErrorHandlerRequest( task::InteractionClassification_QUERY,
459 rRequest->getContinuations(),
460 bObtainErrorStringOnly,
461 bHasErrorString,
462 rErrorString);
463 }
464 return true;
465 }
466
467 if ( handleInteractiveIOException( rRequest,
468 bObtainErrorStringOnly,
469 bHasErrorString,
470 rErrorString ) )
471 return true;
472
473 ucb::InteractiveAppException aAppException;
474 if (aAnyRequest >>= aAppException)
475 {
476 std::vector< OUString > aArguments;
477 handleErrorHandlerRequest( aAppException.Classification,
478 ErrCode(aAppException.Code),
480 rRequest->getContinuations(),
481 bObtainErrorStringOnly,
482 bHasErrorString,
483 rErrorString);
484 return true;
485 }
486
487 ucb::InteractiveNetworkException aNetworkException;
488 if (aAnyRequest >>= aNetworkException)
489 {
490 ErrCode nErrorCode;
491 std::vector< OUString > aArguments;
492 ucb::InteractiveNetworkOffLineException aOffLineException;
493 ucb::InteractiveNetworkResolveNameException aResolveNameException;
494 ucb::InteractiveNetworkConnectException aConnectException;
495 ucb::InteractiveNetworkReadException aReadException;
496 ucb::InteractiveNetworkWriteException aWriteException;
497 if (aAnyRequest >>= aOffLineException)
498 nErrorCode = ERRCODE_INET_OFFLINE;
499 else if (aAnyRequest >>= aResolveNameException)
500 {
501 nErrorCode = ERRCODE_INET_NAME_RESOLVE;
502 aArguments.push_back(aResolveNameException.Server);
503 }
504 else if (aAnyRequest >>= aConnectException)
505 {
506 nErrorCode = ERRCODE_INET_CONNECT;
507 aArguments.push_back(aConnectException.Server);
508 }
509 else if (aAnyRequest >>= aReadException)
510 {
511 nErrorCode = ERRCODE_INET_READ;
512 aArguments.push_back(aReadException.Diagnostic);
513 }
514 else if (aAnyRequest >>= aWriteException)
515 {
516 nErrorCode = ERRCODE_INET_WRITE;
517 aArguments.push_back(aWriteException.Diagnostic);
518 }
519 else
520 nErrorCode = ERRCODE_INET_GENERAL;
521
522 handleErrorHandlerRequest(aNetworkException.Classification,
523 nErrorCode,
525 rRequest->getContinuations(),
526 bObtainErrorStringOnly,
527 bHasErrorString,
528 rErrorString);
529 return true;
530 }
531
532 ucb::InteractiveWrongMediumException aWrongMediumException;
533 if (aAnyRequest >>= aWrongMediumException)
534 {
535 sal_Int32 nMedium = 0;
536 aWrongMediumException.Medium >>= nMedium;
537 std::vector< OUString > aArguments { OUString::number(nMedium + 1) };
538 handleErrorHandlerRequest(aWrongMediumException.Classification,
541 rRequest->getContinuations(),
542 bObtainErrorStringOnly,
543 bHasErrorString,
544 rErrorString);
545 return true;
546 }
547
548 java::WrongJavaVersionException aWrongJavaVersionException;
549 if (aAnyRequest >>= aWrongJavaVersionException)
550 {
551 ErrCode nErrorCode;
552 std::vector< OUString > aArguments;
553 if (aWrongJavaVersionException.DetectedVersion.isEmpty())
554 if (aWrongJavaVersionException.LowestSupportedVersion.isEmpty())
555 nErrorCode = ERRCODE_UUI_WRONGJAVA;
556 else
557 {
558 nErrorCode = ERRCODE_UUI_WRONGJAVA_MIN;
559 aArguments.push_back(aWrongJavaVersionException.LowestSupportedVersion);
560 }
561 else if (aWrongJavaVersionException.LowestSupportedVersion.isEmpty())
562 {
564 aArguments.push_back(aWrongJavaVersionException.DetectedVersion);
565 }
566 else
567 {
569 aArguments.reserve(2);
570 aArguments.push_back(aWrongJavaVersionException.DetectedVersion);
571 aArguments.push_back(aWrongJavaVersionException.LowestSupportedVersion);
572 }
573 handleErrorHandlerRequest(task::InteractionClassification_ERROR,
574 nErrorCode,
576 rRequest->getContinuations(),
577 bObtainErrorStringOnly,
578 bHasErrorString,
579 rErrorString);
580 return true;
581 }
582
583 configuration::backend::MergeRecoveryRequest aMergeRecoveryRequest;
584 if (aAnyRequest >>= aMergeRecoveryRequest)
585 {
586 ErrCode nErrorCode = aMergeRecoveryRequest.IsRemovalRequest
589
590 std::vector< OUString > aArguments { aMergeRecoveryRequest.ErrorLayerId };
591
592 handleErrorHandlerRequest(task::InteractionClassification_ERROR,
593 nErrorCode,
595 rRequest->getContinuations(),
596 bObtainErrorStringOnly,
597 bHasErrorString,
598 rErrorString);
599 return true;
600 }
601
602 configuration::backend::StratumCreationException
603 aStratumCreationException;
604
605 if (aAnyRequest >>= aStratumCreationException)
606 {
608
609 OUString aStratum = aStratumCreationException.StratumData;
610 if (aStratum.isEmpty())
611 aStratum = aStratumCreationException.StratumService;
612
613 std::vector< OUString > aArguments { aStratum };
614
615 handleErrorHandlerRequest(task::InteractionClassification_ERROR,
616 nErrorCode,
618 rRequest->getContinuations(),
619 bObtainErrorStringOnly,
620 bHasErrorString,
621 rErrorString);
622 return true;
623 }
624
625 xforms::InvalidDataOnSubmitException aInvalidDataOnSubmitException;
626 if (aAnyRequest >>= aInvalidDataOnSubmitException)
627 {
628 const ErrCode nErrorCode =
630
631 std::vector< OUString > aArguments;
632
633 handleErrorHandlerRequest(task::InteractionClassification_QUERY,
634 nErrorCode,
636 rRequest->getContinuations(),
637 bObtainErrorStringOnly,
638 bHasErrorString,
639 rErrorString);
640 return true;
641 }
642
643 ucb::InteractiveLockingLockedException aLLException;
644 if (aAnyRequest >>= aLLException)
645 {
646 ErrCode nErrorCode = aLLException.SelfOwned
648 std::vector< OUString > aArguments { aLLException.Url };
649
650 handleErrorHandlerRequest( aLLException.Classification,
651 nErrorCode,
653 rRequest->getContinuations(),
654 bObtainErrorStringOnly,
655 bHasErrorString,
656 rErrorString );
657 return true;
658 }
659
660 ucb::InteractiveLockingNotLockedException aLNLException;
661 if (aAnyRequest >>= aLNLException)
662 {
663 std::vector< OUString > aArguments { aLNLException.Url };
664
665 handleErrorHandlerRequest( aLNLException.Classification,
668 rRequest->getContinuations(),
669 bObtainErrorStringOnly,
670 bHasErrorString,
671 rErrorString );
672 return true;
673 }
674
675 ucb::InteractiveLockingLockExpiredException aLLEException;
676 if (aAnyRequest >>= aLLEException)
677 {
678 std::vector< OUString > aArguments { aLLEException.Url };
679
680 handleErrorHandlerRequest( aLLEException.Classification,
683 rRequest->getContinuations(),
684 bObtainErrorStringOnly,
685 bHasErrorString,
686 rErrorString );
687 return true;
688 }
689
690 document::BrokenPackageRequest aBrokenPackageRequest;
691 if (aAnyRequest >>= aBrokenPackageRequest)
692 {
693 std::vector< OUString > aArguments;
694
695 if( !aBrokenPackageRequest.aName.isEmpty() )
696 aArguments.push_back( aBrokenPackageRequest.aName );
697
699 rRequest->getContinuations(),
700 bObtainErrorStringOnly,
701 bHasErrorString,
702 rErrorString );
703 return true;
704 }
705
706 task::ErrorCodeRequest aErrorCodeRequest;
707 if (aAnyRequest >>= aErrorCodeRequest)
708 {
709 handleGenericErrorRequest( ErrCode(aErrorCodeRequest.ErrCode),
710 rRequest->getContinuations(),
711 bObtainErrorStringOnly,
712 bHasErrorString,
713 rErrorString);
714 return true;
715 }
716
717 task::ErrorCodeIOException aErrorCodeIOException;
718 if (aAnyRequest >>= aErrorCodeIOException)
719 {
720 handleGenericErrorRequest( ErrCode(aErrorCodeIOException.ErrCode),
721 rRequest->getContinuations(),
722 bObtainErrorStringOnly,
723 bHasErrorString,
724 rErrorString);
725 return true;
726 }
727
728 loader::CannotActivateFactoryException aCannotActivateFactoryException;
729 if (aAnyRequest >>= aCannotActivateFactoryException)
730 {
731 std::vector< OUString > aArguments { aCannotActivateFactoryException.Message };
732
733 handleErrorHandlerRequest( task::InteractionClassification_ERROR,
736 rRequest->getContinuations(),
737 bObtainErrorStringOnly,
738 bHasErrorString,
739 rErrorString );
740 return true;
741 }
742
743
744 // Handle requests which do not have a plain string representation.
745
746 if (!bObtainErrorStringOnly)
747 {
748 ucb::AuthenticationFallbackRequest anAuthFallbackRequest;
749 if ( aAnyRequest >>= anAuthFallbackRequest )
750 {
751 handleAuthFallbackRequest( anAuthFallbackRequest.instructions,
752 anAuthFallbackRequest.url, rRequest->getContinuations() );
753 return true;
754 }
755
756 if ( handleAuthenticationRequest( rRequest ) )
757 return true;
758
759 if ( handleCertificateValidationRequest( rRequest ) )
760 return true;
761
762 ucb::NameClashResolveRequest aNameClashResolveRequest;
763 if (aAnyRequest >>= aNameClashResolveRequest)
764 {
765 handleNameClashResolveRequest(aNameClashResolveRequest,
766 rRequest->getContinuations());
767 return true;
768 }
769
770 if ( handleMasterPasswordRequest( rRequest ) )
771 return true;
772
773 if ( handlePasswordRequest( rRequest ) )
774 return true;
775
776 if ( handleNoSuchFilterRequest( rRequest ) )
777 return true;
778
779 if ( handleFilterOptionsRequest( rRequest ) )
780 return true;
781
782 if ( handleLockedDocumentRequest( rRequest ) )
783 return true;
784
785 if ( handleChangedByOthersRequest( rRequest ) )
786 return true;
787
788 if ( handleLockFileProblemRequest( rRequest ) )
789 return true;
790
791 if ( handleReloadEditableRequest( rRequest ) )
792 return true;
793
794 task::DocumentMacroConfirmationRequest aMacroConfirmRequest;
795 if (aAnyRequest >>= aMacroConfirmRequest)
796 {
798 aMacroConfirmRequest.DocumentURL,
799 aMacroConfirmRequest.DocumentStorage,
800 !aMacroConfirmRequest.DocumentVersion.isEmpty() ? aMacroConfirmRequest.DocumentVersion : ODFVER_013_TEXT,
801 aMacroConfirmRequest.DocumentSignatureInformation,
802 rRequest->getContinuations());
803 return true;
804 }
805
806 // Last chance: interaction handlers registered in the configuration
807
808
809 // typed InteractionHandlers (ooo.Interactions)
810 if ( handleTypedHandlerImplementations( rRequest ) )
811 return true;
812
813 // legacy configuration (ooo.ucb.InteractionHandlers)
814 if (tryOtherInteractionHandler( rRequest ))
815 return true;
816 }
817
818 // Not handled.
819 return false;
820 }
821 catch( const uno::RuntimeException& )
822 {
823 throw; // allowed to leave here
824 }
825 catch( const uno::Exception& )
826 {
828 }
829 return false;
830}
831
832void
835{
836 try
837 {
838 uno::Reference< lang::XMultiServiceFactory > xConfigProv =
839 configuration::theDefaultProvider::get( m_xContext );
840
841 uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
842 {
843 {"nodepath", uno::Any(OUString("/org.openoffice.ucb.InteractionHandler/InteractionHandlers"))}
844 }));
845
846 uno::Reference< uno::XInterface > xInterface(
847 xConfigProv->createInstanceWithArguments(
848 "com.sun.star.configuration.ConfigurationAccess" , aArguments ) );
849
850 if ( !xInterface.is() )
851 throw uno::RuntimeException("unable to instantiate config access");
852
853 uno::Reference< container::XNameAccess > xNameAccess(
854 xInterface, uno::UNO_QUERY_THROW );
855 const uno::Sequence< OUString > aElems = xNameAccess->getElementNames();
856
857 if ( aElems.hasElements() )
858 {
859 uno::Reference< container::XHierarchicalNameAccess >
860 xHierNameAccess( xInterface, uno::UNO_QUERY_THROW );
861
862 // Iterate over children.
863 for ( const auto& rElem : aElems )
864 {
865 try
866 {
868
869 // Obtain service name.
870 OUString aKeyBuffer = "['" + rElem + "']/ServiceName";
871
872 OUString aValue;
873 if ( !( xHierNameAccess->getByHierarchicalName(
874 aKeyBuffer ) >>= aValue ) )
875 {
876 OSL_FAIL( "GetInteractionHandlerList - "
877 "Error getting item value!" );
878 continue;
879 }
880
881 aInfo.ServiceName = aValue;
882
883 // Append info to list.
884 rdataList.push_back( aInfo );
885 }
886 catch ( container::NoSuchElementException& )
887 {
888 // getByHierarchicalName
889
890 OSL_FAIL( "GetInteractionHandlerList - "
891 "caught NoSuchElementException!" );
892 }
893 }
894 }
895 }
896 catch ( uno::RuntimeException const & )
897 {
898 throw;
899 }
900 catch ( uno::Exception const & )
901 {
902 TOOLS_WARN_EXCEPTION( "uui", "GetInteractionHandlerList" );
903 }
904}
905
906const uno::Reference< awt::XWindow>&
908{
909 return m_xWindowParam;
910}
911
912uno::Reference< task::XInteractionHandler2 >
914{
915 return InteractionHandler::createWithParentAndContext(
918}
919
920namespace {
921
923executeMessageBox(
924 weld::Window * pParent,
925 OUString const & rTitle,
926 OUString const & rMessage,
927 VclMessageType eMessageType)
928{
929 SolarMutexGuard aGuard;
930
931 std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent, eMessageType,
932 eMessageType == VclMessageType::Question ? VclButtonsType::YesNo : VclButtonsType::Ok, rMessage));
933 xBox->set_title(rTitle);
934
935 short nMessResult = xBox->run();
936 DialogMask aResult = DialogMask::NONE;
937 switch (nMessResult)
938 {
939 case RET_OK:
940 aResult = DialogMask::ButtonsOk;
941 break;
942 case RET_CANCEL:
943 aResult = DialogMask::ButtonsCancel;
944 break;
945 case RET_YES:
946 aResult = DialogMask::ButtonsYes;
947 break;
948 case RET_NO:
949 aResult = DialogMask::ButtonsNo;
950 break;
951 default:
952 assert(false);
953 }
954
955 return aResult;
956}
957
958NameClashResolveDialogResult executeSimpleNameClashResolveDialog(weld::Window *pParent,
959 OUString const & rTargetFolderURL,
960 OUString const & rClashingName,
961 OUString & rProposedNewName,
962 bool bAllowOverwrite)
963{
964 std::locale aResLocale = Translate::Create("uui");
965 NameClashDialog aDialog(pParent, aResLocale, rTargetFolderURL,
966 rClashingName, rProposedNewName, bAllowOverwrite);
967
968 NameClashResolveDialogResult eResult = static_cast<NameClashResolveDialogResult>(aDialog.run());
969 rProposedNewName = aDialog.getNewName();
970 return eResult;
971}
972
973} // namespace
974
975void
977 ucb::NameClashResolveRequest const & rRequest,
978 uno::Sequence< uno::Reference<
979 task::XInteractionContinuation > > const & rContinuations)
980{
981 OSL_ENSURE(!rRequest.TargetFolderURL.isEmpty(),
982 "NameClashResolveRequest must not contain empty TargetFolderURL" );
983
984 OSL_ENSURE(!rRequest.ClashingName.isEmpty(),
985 "NameClashResolveRequest must not contain empty ClashingName" );
986
987 uno::Reference< task::XInteractionAbort > xAbort;
988 uno::Reference< ucb::XInteractionSupplyName > xSupplyName;
989 uno::Reference< ucb::XInteractionReplaceExistingData > xReplaceExistingData;
991 rContinuations, &xAbort, &xSupplyName, &xReplaceExistingData);
992
993 OSL_ENSURE( xAbort.is(),
994 "NameClashResolveRequest must contain Abort continuation" );
995
996 OSL_ENSURE( xSupplyName.is(),
997 "NameClashResolveRequest must contain SupplyName continuation" );
998
1000 OUString aProposedNewName( rRequest.ProposedNewName );
1001
1002 uno::Reference<awt::XWindow> xParent = getParentXWindow();
1003 eResult = executeSimpleNameClashResolveDialog(Application::GetFrameWeld(xParent),
1004 rRequest.TargetFolderURL,
1005 rRequest.ClashingName,
1006 aProposedNewName,
1007 xReplaceExistingData.is());
1008
1009 switch ( eResult )
1010 {
1011 case ABORT:
1012 xAbort->select();
1013 break;
1014
1015 case RENAME:
1016 xSupplyName->setName( aProposedNewName );
1017 xSupplyName->select();
1018 break;
1019
1020 case OVERWRITE:
1021 OSL_ENSURE(
1022 xReplaceExistingData.is(),
1023 "Invalid NameClashResolveDialogResult: OVERWRITE - "
1024 "No ReplaceExistingData continuation available!" );
1025 xReplaceExistingData->select();
1026 break;
1027 }
1028}
1029
1030void
1032 ErrCode nErrorCode,
1033 uno::Sequence< uno::Reference<
1034 task::XInteractionContinuation > > const & rContinuations,
1035 bool bObtainErrorStringOnly,
1036 bool & bHasErrorString,
1037 OUString & rErrorString)
1038{
1039 if (bObtainErrorStringOnly)
1040 {
1041 bHasErrorString = isInformationalErrorMessageRequest(rContinuations);
1042 if (bHasErrorString)
1043 {
1044 OUString aErrorString;
1045 ErrorHandler::GetErrorString(nErrorCode, aErrorString);
1046 rErrorString = aErrorString;
1047 }
1048 }
1049 else
1050 {
1051 uno::Reference< task::XInteractionAbort > xAbort;
1052 uno::Reference< task::XInteractionApprove > xApprove;
1053 getContinuations(rContinuations, &xApprove, &xAbort);
1054
1055 // Note: It's important to convert the transported long to the
1056 // required unsigned long value. Otherwise using as flag field
1057 // can fail ...
1058 ErrCode nError(nErrorCode);
1059 bool bWarning = !nError.IgnoreWarning();
1060
1061 if ( nError == ERRCODE_SFX_INCOMPLETE_ENCRYPTION )
1062 {
1063 // the security warning box needs a special title
1064 OUString aErrorString;
1065 ErrorHandler::GetErrorString( nErrorCode, aErrorString );
1066
1067 std::locale aResLocale = Translate::Create("uui");
1068 OUString aTitle( utl::ConfigManager::getProductName() );
1069
1070 OUString aErrTitle = Translate::get(STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE, aResLocale);
1071
1072 if ( !aTitle.isEmpty() && !aErrTitle.isEmpty() )
1073 aTitle += " - " ;
1074 aTitle += aErrTitle;
1075
1076 uno::Reference<awt::XWindow> xParent = getParentXWindow();
1077 executeMessageBox(Application::GetFrameWeld(xParent), aTitle, aErrorString, VclMessageType::Error);
1078 }
1079 else
1080 {
1081 uno::Reference<awt::XWindow> xParent = getParentXWindow();
1083 }
1084
1085 if (xApprove.is() && bWarning)
1086 xApprove->select();
1087 else if (xAbort.is())
1088 xAbort->select();
1089 }
1090}
1091
1092void
1094 const OUString& aDocumentURL,
1095 const uno::Reference< embed::XStorage >& xZipStorage,
1096 const OUString& aDocumentVersion,
1097 const uno::Sequence< security::DocumentSignatureInformation >& aSignInfo,
1098 uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
1099 rContinuations )
1100{
1101 uno::Reference< task::XInteractionAbort > xAbort;
1102 uno::Reference< task::XInteractionApprove > xApprove;
1103 getContinuations( rContinuations, &xApprove, &xAbort );
1104
1105 bool bApprove = false;
1106
1107 bool bShowSignatures = aSignInfo.hasElements();
1108 uno::Reference<awt::XWindow> xParent = getParentXWindow();
1109 MacroWarning aWarning(Application::GetFrameWeld(xParent), bShowSignatures);
1110
1111 aWarning.SetDocumentURL(aDocumentURL);
1112 if ( aSignInfo.getLength() > 1 )
1113 {
1114 aWarning.SetStorage(xZipStorage, aDocumentVersion, aSignInfo);
1115 }
1116 else if ( aSignInfo.getLength() == 1 )
1117 {
1118 aWarning.SetCertificate(aSignInfo[0].Signer);
1119 }
1120
1121 bApprove = aWarning.run() == RET_OK;
1122
1123 if ( bApprove && xApprove.is() )
1124 xApprove->select();
1125 else if ( xAbort.is() )
1126 xAbort->select();
1127}
1128
1129void
1131 std::vector< OUString > const & rArguments,
1132 uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
1133 rContinuations,
1134 bool bObtainErrorStringOnly,
1135 bool & bHasErrorString,
1136 OUString & rErrorString)
1137{
1138 if (bObtainErrorStringOnly)
1139 {
1140 bHasErrorString = isInformationalErrorMessageRequest(rContinuations);
1141 if (!bHasErrorString)
1142 return;
1143 }
1144
1145 uno::Reference< task::XInteractionApprove > xApprove;
1146 uno::Reference< task::XInteractionDisapprove > xDisapprove;
1147 uno::Reference< task::XInteractionAbort > xAbort;
1148 getContinuations(rContinuations, &xApprove, &xDisapprove, &xAbort);
1149
1150 ErrCode nErrorCode;
1151 if( xApprove.is() && xDisapprove.is() )
1152 {
1153 nErrorCode = ERRCODE_UUI_IO_BROKENPACKAGE;
1154 }
1155 else if ( xAbort.is() )
1156 {
1158 }
1159 else
1160 return;
1161
1162 OUString aMessage;
1163 {
1164 std::locale aResLocale = Translate::Create("uui");
1165 ErrorResource aErrorResource(RID_UUI_ERRHDL, aResLocale);
1166 if (!aErrorResource.getString(nErrorCode, aMessage))
1167 return;
1168 }
1169
1170 aMessage = replaceMessageWithArguments( aMessage, rArguments );
1171
1172 if (bObtainErrorStringOnly)
1173 {
1174 rErrorString = aMessage;
1175 return;
1176 }
1177
1178 VclMessageType eMessageType;
1179 if( xApprove.is() && xDisapprove.is() )
1180 eMessageType = VclMessageType::Question;
1181 else if ( xAbort.is() )
1182 eMessageType = VclMessageType::Warning;
1183 else
1184 return;
1185
1186 OUString title(
1188 " " +
1190
1191 uno::Reference<awt::XWindow> xParent = getParentXWindow();
1192 switch (executeMessageBox(Application::GetFrameWeld(xParent), title, aMessage, eMessageType))
1193 {
1194 case DialogMask::ButtonsOk:
1195 OSL_ENSURE( xAbort.is(), "unexpected situation" );
1196 if (xAbort.is())
1197 xAbort->select();
1198 break;
1199
1200 case DialogMask::ButtonsNo:
1201 OSL_ENSURE(xDisapprove.is(), "unexpected situation");
1202 if (xDisapprove.is())
1203 xDisapprove->select();
1204 break;
1205
1206 case DialogMask::ButtonsYes:
1207 OSL_ENSURE(xApprove.is(), "unexpected situation");
1208 if (xApprove.is())
1209 xApprove->select();
1210 break;
1211
1212 default: break;
1213 }
1214}
1215
1216// ErrorResource Implementation
1217bool ErrorResource::getString(ErrCode nErrorCode, OUString &rString) const
1218{
1219 for (const std::pair<TranslateId, ErrCode>* pStringArray = m_pStringArray; pStringArray->first; ++pStringArray)
1220 {
1221 if (nErrorCode.StripWarningAndDynamic() == pStringArray->second.StripWarningAndDynamic())
1222 {
1223 rString = Translate::get(pStringArray->first, m_rResLocale);
1224 return true;
1225 }
1226 }
1227 return false;
1228}
1229
1230/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
constexpr OUStringLiteral sServiceName
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
static bool IsMainThread()
static comphelper::SolarMutex & GetSolarMutex()
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
ErrCode IgnoreWarning() const
constexpr ErrCode StripWarningAndDynamic() const
static bool GetErrorString(ErrCode nId, OUString &rStr)
static DialogMask HandleError(ErrCode nId, weld::Window *pParent=nullptr, DialogMask nMask=DialogMask::MAX)
const std::locale & m_rResLocale
Definition: iahndl.hxx:246
bool getString(ErrCode nErrorCode, OUString &rString) const
Definition: iahndl.cxx:1217
const std::pair< TranslateId, ErrCode > * m_pStringArray
Definition: iahndl.hxx:245
void SetStorage(const css::uno::Reference< css::embed::XStorage > &rxStore, const OUString &aODFVersion, const css::uno::Sequence< css::security::DocumentSignatureInformation > &_rInfos)
void SetDocumentURL(const OUString &rDocURL)
void SetCertificate(const css::uno::Reference< css::security::XCertificate > &_rxCert)
void handleErrorHandlerRequest(css::task::InteractionClassification eClassification, ErrCode nErrorCode, std::vector< OUString > const &rArguments, css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations, bool bObtainErrorStringOnly, bool &bHasErrorString, OUString &rErrorString)
bool handleInteractiveIOException(css::uno::Reference< css::task::XInteractionRequest > const &rRequest, bool bObtainErrorStringOnly, bool &bHasErrorString, OUString &rErrorString)
bool handleRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
Definition: iahndl.cxx:150
bool handleReloadEditableRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
void getInteractionHandlerList(InteractionHandlerDataList &rdataList)
Definition: iahndl.cxx:833
css::beans::Optional< OUString > getStringFromRequest_impl(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
Definition: iahndl.cxx:184
static void getstringfromrequest(void *pHandleData, void *pInteractionHandler)
Definition: iahndl.cxx:174
css::uno::Reference< css::awt::XWindow > m_xWindowParam
Definition: iahndl.hxx:75
bool handleLockedDocumentRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
bool handlePasswordRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
bool handleFilterOptionsRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
css::beans::Optional< OUString > getStringFromRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
Definition: iahndl.cxx:201
void handleNameClashResolveRequest(css::ucb::NameClashResolveRequest const &rRequest, css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations)
Definition: iahndl.cxx:976
bool handleAuthenticationRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
bool handleChangedByOthersRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
css::uno::Reference< css::task::XInteractionHandler2 > getInteractionHandler() const
Definition: iahndl.cxx:913
bool handleTypedHandlerImplementations(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
Definition: iahndl.cxx:319
bool tryOtherInteractionHandler(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
Definition: iahndl.cxx:261
static bool isInformationalErrorMessageRequest(css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations)
Definition: iahndl.cxx:239
static void handlerequest(void *pHandleData, void *pInteractionHandler)
Definition: iahndl.cxx:135
bool handleCertificateValidationRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
Definition: iahndl-ssl.cxx:346
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: iahndl.hxx:74
OUString m_aContextParam
Definition: iahndl.hxx:76
UUIInteractionHelper(UUIInteractionHelper const &)=delete
StringHashMap m_aTypedCustomHandlers
Definition: iahndl.hxx:77
static OUString replaceMessageWithArguments(const OUString &aMessage, std::vector< OUString > const &rArguments)
Definition: iahndl.cxx:222
bool handleNoSuchFilterRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
bool handleLockFileProblemRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
bool handleMasterPasswordRequest(css::uno::Reference< css::task::XInteractionRequest > const &rRequest)
void handleMacroConfirmRequest(const OUString &aDocumentURL, const css::uno::Reference< css::embed::XStorage > &xZipStorage, const OUString &aDocumentVersion, const css::uno::Sequence< css::security::DocumentSignatureInformation > &aSignInfo, css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations)
Definition: iahndl.cxx:1093
bool handleRequest_impl(css::uno::Reference< css::task::XInteractionRequest > const &rRequest, bool bObtainErrorStringOnly, bool &bHasErrorString, OUString &rErrorString)
Definition: iahndl.cxx:369
void handleAuthFallbackRequest(const OUString &instructions, const OUString &url, css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations)
void handleBrokenPackageRequest(std::vector< OUString > const &rArguments, css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations, bool bObtainErrorStringOnly, bool &bHasErrorString, OUString &rErrorString)
Definition: iahndl.cxx:1130
bool handleCustomRequest(const css::uno::Reference< css::task::XInteractionRequest > &i_rRequest, const OUString &i_rServiceName) const
Definition: iahndl.cxx:294
const css::uno::Reference< css::awt::XWindow > & getParentXWindow() const
Definition: iahndl.cxx:907
void handleGenericErrorRequest(ErrCode nErrorCode, css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations, bool bObtainErrorStringOnly, bool &bHasErrorString, OUString &rErrorString)
Definition: iahndl.cxx:1031
css::uno::Sequence< css::uno::Any > getWrappedPropertyValues() const
bool put(const OUString &_rValueName, const VALUE_TYPE &_rValue)
sal_uInt32 release(bool bUnlockAll=false)
virtual bool IsCurrentThread() const
void acquire(sal_uInt32 nLockCount=1)
static OUString getProductVersion()
static OUString getProductName()
css::uno::Any getNodeValue(const OUString &_rPath) const noexcept
static OConfigurationTreeRoot createWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
virtual short run()
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr OUStringLiteral ODFVER_013_TEXT
float u
#define ERRCODE_INET_WRITE
#define ERRCODE_INET_GENERAL
#define ERRCODE_INET_OFFLINE
#define ERRCODE_INET_READ
#define ERRCODE_INET_CONNECT
#define ERRCODE_INET_NAME_RESOLVE
DialogMask
void getContinuations(css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > const &rContinuations, css::uno::Reference< t1 > *pContinuation1, css::uno::Reference< t2 > *pContinuation2)
std::vector< InteractionHandlerData > InteractionHandlerDataList
Definition: iahndl.hxx:67
#define ERRCODE_UUI_WRONGJAVA
Definition: ids.hxx:62
#define ERRCODE_UUI_CONFIGURATION_BACKENDMISSING
Definition: ids.hxx:79
#define ERRCODE_UUI_IO_MODULESIZEEXCEEDED
Definition: ids.hxx:82
#define ERRCODE_UUI_CONFIGURATION_BROKENDATA_NOREMOVE
Definition: ids.hxx:77
#define ERRCODE_UUI_WRONGJAVA_VERSION
Definition: ids.hxx:63
#define ERRCODE_UUI_INVALID_XFORMS_SUBMISSION_DATA
Definition: ids.hxx:81
#define ERRCODE_UUI_WRONGMEDIUM
Definition: ids.hxx:71
#define ERRCODE_UUI_IO_UNSUPPORTEDOVERWRITE
Definition: ids.hxx:74
#define ERRCODE_UUI_LOCKING_LOCKED_SELF
Definition: ids.hxx:84
#define ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY
Definition: ids.hxx:87
#define ERRCODE_UUI_IO_EXOTICFILEFORMAT
Definition: ids.hxx:88
#define ERRCODE_UUI_CONFIGURATION_BROKENDATA_WITHREMOVE
Definition: ids.hxx:78
#define ERRCODE_UUI_LOCKING_LOCKED
Definition: ids.hxx:83
#define ERRCODE_UUI_LOCKING_NOT_LOCKED
Definition: ids.hxx:85
#define ERRCODE_UUI_WRONGJAVA_MIN
Definition: ids.hxx:64
#define ERRCODE_UUI_IO_BROKENPACKAGE_CANTREPAIR
Definition: ids.hxx:76
#define ERRCODE_UUI_WRONGJAVA_VERSION_MIN
Definition: ids.hxx:65
#define ERRCODE_UUI_IO_TARGETALREADYEXISTS
Definition: ids.hxx:73
#define ERRCODE_UUI_IO_BROKENPACKAGE
Definition: ids.hxx:75
#define ERRCODE_UUI_IO_ALREADYEXISTS
Definition: ids.hxx:26
#define ERRCODE_UUI_LOCKING_LOCK_EXPIRED
Definition: ids.hxx:86
Sequence< PropertyValue > aArguments
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
struct _typelib_TypeDescription typelib_TypeDescription
NameClashResolveDialogResult
@ OVERWRITE
@ ABORT
@ RENAME
std::locale Create(std::string_view aPrefixName, const LanguageTag &rLocale)
OUString get(TranslateId sContextAndId, const std::locale &loc)
@ Exception
OUString convertCommaSeparated(uno::Sequence< OUString > const &i_rSeq)
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
int i
#define ERRCODE_SFX_INCOMPLETE_ENCRYPTION
OUString ServiceName
The UNO service name to use to instantiate the content provider.
Definition: iahndl.hxx:64
VCL_DLLPUBLIC Application * GetpApp()
Any m_aResult
ResultType type
RET_OK
RET_CANCEL
RET_NO
RET_YES
VclMessageType