22#include <com/sun/star/task/DocumentMSPasswordRequest2.hpp>
23#include <com/sun/star/task/DocumentPasswordRequest2.hpp>
24#include <com/sun/star/task/PasswordRequest.hpp>
25#include <com/sun/star/task/XInteractionAbort.hpp>
26#include <com/sun/star/task/XInteractionPassword2.hpp>
29using ::com::sun::star::uno::Any;
30using ::com::sun::star::uno::Reference;
31using ::com::sun::star::uno::Sequence;
32using ::com::sun::star::uno::XInterface;
33using ::com::sun::star::task::InteractionClassification_QUERY;
34using ::com::sun::star::task::DocumentMSPasswordRequest2;
35using ::com::sun::star::task::DocumentPasswordRequest2;
36using ::com::sun::star::task::PasswordRequest;
37using ::com::sun::star::task::PasswordRequestMode;
38using ::com::sun::star::task::XInteractionAbort;
39using ::com::sun::star::task::XInteractionContinuation;
40using ::com::sun::star::task::XInteractionPassword2;
46class AbortContinuation :
public ::cppu::WeakImplHelper< XInteractionAbort >
49 virtual void SAL_CALL select()
override {}
82 PasswordRequest aRequest( OUString(), Reference< XInterface >(),
83 InteractionClassification_QUERY, css::task::PasswordRequestMode_PASSWORD_CREATE );
86 mxAbort =
new AbortContinuation;
116 PasswordRequestMode eMode,
const OUString& rDocumentUrl,
bool bPasswordToModify )
122 DocumentPasswordRequest2 aRequest( OUString(), Reference< XInterface >(),
123 InteractionClassification_QUERY, eMode, rDocumentUrl, bPasswordToModify );
129 DocumentMSPasswordRequest2 aRequest( OUString(), Reference< XInterface >(),
130 InteractionClassification_QUERY, eMode, rDocumentUrl, bPasswordToModify );
138 mxAbort =
new AbortContinuation;
virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL getContinuations() override
css::uno::Reference< css::task::XInteractionAbort > mxAbort
OUString getPassword() const
OUString getPasswordToModify() const
DocPasswordRequest(DocPasswordRequestType eType, css::task::PasswordRequestMode eMode, const OUString &rDocumentUrl, bool bPasswordToModify=false)
rtl::Reference< PasswordContinuation > mxPassword
virtual ~DocPasswordRequest() override
bool getRecommendReadOnly() const
virtual css::uno::Any SAL_CALL getRequest() override
virtual void SAL_CALL setPasswordToModify(const OUString &rPass) override
virtual void SAL_CALL setPassword(const OUString &rPass) override
OUString maModifyPassword
virtual OUString SAL_CALL getPassword() override
virtual sal_Bool SAL_CALL getRecommendReadOnly() override
virtual OUString SAL_CALL getPasswordToModify() override
virtual void SAL_CALL setRecommendReadOnly(sal_Bool bReadOnly) override
virtual void SAL_CALL select() override
rtl::Reference< PasswordContinuation > mxPassword
virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL getContinuations() override
css::uno::Reference< css::task::XInteractionAbort > mxAbort
OUString getPassword() const
virtual ~SimplePasswordRequest() override
virtual css::uno::Any SAL_CALL getRequest() override
DocPasswordRequestType
Selects which UNO document password request type to use.
@ MS
Uses the standard com.sun.star.task.DocumentPasswordRequest request.