summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 11:47:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-17 15:27:33 +0200
commit5830ef9a65d268ca7939d5489a75e3873bdc5d96 (patch)
tree529d4545de6f45a21423096b8cb2c9c17ecc2684 /comphelper/source
parent574335a1ad68bdde15a67607f2460ef3828f6c3c (diff)
use rtl::Reference in DocPasswordRequest and SimplePasswordRequest
Change-Id: If1bad2bc852712b8315e44480ee81f797736bb95
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/misc/docpasswordrequest.cxx28
1 files changed, 12 insertions, 16 deletions
diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx
index 29cf4a90d704..3ebcde4e82f7 100644
--- a/comphelper/source/misc/docpasswordrequest.cxx
+++ b/comphelper/source/misc/docpasswordrequest.cxx
@@ -82,10 +82,8 @@ SimplePasswordRequest::SimplePasswordRequest( PasswordRequestMode eMode )
InteractionClassification_QUERY, eMode );
maRequest <<= aRequest;
- maContinuations.realloc( 2 );
- maContinuations[ 0 ].set( new AbortContinuation );
- mpPassword = new PasswordContinuation;
- maContinuations[ 1 ].set( mpPassword );
+ mxAbort = new AbortContinuation;
+ mxPassword = new PasswordContinuation;
}
SimplePasswordRequest::~SimplePasswordRequest()
@@ -94,12 +92,12 @@ SimplePasswordRequest::~SimplePasswordRequest()
bool SimplePasswordRequest::isPassword() const
{
- return mpPassword->isSelected();
+ return mxPassword->isSelected();
}
OUString SimplePasswordRequest::getPassword() const
{
- return mpPassword->getPassword();
+ return mxPassword->getPassword();
}
Any SAL_CALL SimplePasswordRequest::getRequest() throw( RuntimeException, std::exception )
@@ -109,7 +107,7 @@ Any SAL_CALL SimplePasswordRequest::getRequest() throw( RuntimeException, std::e
Sequence< Reference< XInteractionContinuation > > SAL_CALL SimplePasswordRequest::getContinuations() throw( RuntimeException, std::exception )
{
- return maContinuations;
+ return { mxAbort.get(), mxPassword.get() };
}
@@ -136,10 +134,8 @@ DocPasswordRequest::DocPasswordRequest( DocPasswordRequestType eType,
implementation of a new enum value. */
}
- maContinuations.realloc( 2 );
- maContinuations[ 0 ].set( new AbortContinuation );
- mpPassword = new PasswordContinuation;
- maContinuations[ 1 ].set( mpPassword );
+ mxAbort = new AbortContinuation;
+ mxPassword = new PasswordContinuation;
}
DocPasswordRequest::~DocPasswordRequest()
@@ -148,22 +144,22 @@ DocPasswordRequest::~DocPasswordRequest()
bool DocPasswordRequest::isPassword() const
{
- return mpPassword->isSelected();
+ return mxPassword->isSelected();
}
OUString DocPasswordRequest::getPassword() const
{
- return mpPassword->getPassword();
+ return mxPassword->getPassword();
}
OUString DocPasswordRequest::getPasswordToModify() const
{
- return mpPassword->getPasswordToModify();
+ return mxPassword->getPasswordToModify();
}
bool DocPasswordRequest::getRecommendReadOnly() const
{
- return mpPassword->getRecommendReadOnly();
+ return mxPassword->getRecommendReadOnly();
}
Any SAL_CALL DocPasswordRequest::getRequest() throw( RuntimeException, std::exception )
@@ -173,7 +169,7 @@ Any SAL_CALL DocPasswordRequest::getRequest() throw( RuntimeException, std::exce
Sequence< Reference< XInteractionContinuation > > SAL_CALL DocPasswordRequest::getContinuations() throw( RuntimeException, std::exception )
{
- return maContinuations;
+ return { mxAbort.get(), mxPassword.get() };
}