21#include <com/sun/star/lang/XTypeProvider.hpp>
22#include <com/sun/star/task/DocumentPasswordRequest.hpp>
23#include <com/sun/star/task/XInteractionPassword.hpp>
40 class InteractionSupplyPassword :
42 public lang::XTypeProvider,
43 public task::XInteractionPassword
47 : InteractionContinuation( pRequest ) {}
51 virtual void SAL_CALL acquire()
53 virtual
void SAL_CALL release()
57 virtual
uno::Sequence<
uno::
Type > SAL_CALL getTypes() override;
58 virtual
uno::Sequence<
sal_Int8 > SAL_CALL getImplementationId() override;
61 virtual
void SAL_CALL select() override;
64 virtual
void SAL_CALL setPassword( const OUString & aPasswd ) override;
65 virtual OUString SAL_CALL getPassword() override;
83void SAL_CALL InteractionSupplyPassword::acquire()
86 OWeakObject::acquire();
91void SAL_CALL InteractionSupplyPassword::release()
94 OWeakObject::release();
100InteractionSupplyPassword::queryInterface(
const uno::Type & rType )
103 static_cast< lang::XTypeProvider *
>(
this ),
104 static_cast< task::XInteractionContinuation *
>(
this ),
105 static_cast< task::XInteractionPassword *
>(
this ) );
108 ? aRet : InteractionContinuation::queryInterface( rType );
116uno::Sequence< sal_Int8 > SAL_CALL
117InteractionSupplyPassword::getImplementationId()
119 return css::uno::Sequence<sal_Int8>();
124uno::Sequence< uno::Type > SAL_CALL InteractionSupplyPassword::getTypes()
130 return s_aCollection.getTypes();
138void SAL_CALL InteractionSupplyPassword::select()
149InteractionSupplyPassword::setPassword(
const OUString& aPasswd )
151 std::scoped_lock aGuard(
m_aMutex );
156OUString SAL_CALL InteractionSupplyPassword::getPassword()
158 std::scoped_lock aGuard(
m_aMutex );
167 task::PasswordRequestMode eMode,
168 const OUString & rDocumentName )
171 task::DocumentPasswordRequest aRequest;
174 aRequest.Classification = task::InteractionClassification_ERROR;
175 aRequest.Mode =
eMode;
176 aRequest.Name = rDocumentName;
182 uno::Reference< task::XInteractionContinuation > > aContinuations{
185 new InteractionSupplyPassword(
this )
188 setContinuations( aContinuations );
DocumentPasswordRequest(css::task::PasswordRequestMode eMode, const OUString &rDocumentName)
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)