summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-08-11 10:11:06 +0200
committerSzymon Kłos <eszkadev@gmail.com>2015-08-14 08:45:47 +0200
commitbb924a8176a04ad356599cbcdfca9e4686b7fa67 (patch)
tree17262210f7bdc3816ee08fd0fc5d6a49f8188102 /fpicker
parent9bb6fc8969b38d657c80138900ed4f93afebb0f2 (diff)
shared PasswordContainer
Change-Id: I73d4532cd9e6f811e32d46738808c81a03c2e895
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx15
-rw-r--r--fpicker/source/office/RemoteFilesDialog.hxx3
2 files changed, 7 insertions, 11 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 37c95351179a..ade4e2327067 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -171,6 +171,7 @@ class FileViewContainer : public vcl::Window
RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
: SvtFileDialog_Base( pParent, "RemoteFilesDialog", "fps/ui/remotefilesdialog.ui" )
, m_context( comphelper::getProcessComponentContext() )
+ , m_xMasterPasswd( PasswordContainer::create( m_context ) )
, m_pCurrentAsyncAction( NULL )
, m_pFileNotifier( NULL )
, m_pSplitter( NULL )
@@ -587,10 +588,7 @@ void RemoteFilesDialog::EnableControls()
try
{
- Reference< XPasswordContainer2 > xMasterPasswd(
- PasswordContainer::create( comphelper::getProcessComponentContext() ) );
-
- if( xMasterPasswd->isPersistentStoringAllowed() )
+ if( m_xMasterPasswd->isPersistentStoringAllowed() )
{
int nPos = GetSelectedServicePos();
@@ -598,7 +596,7 @@ void RemoteFilesDialog::EnableControls()
{
OUString sUrl( m_aServices[nPos]->GetUrl() );
- UrlRecord aURLEntries = xMasterPasswd->find( sUrl, Reference< XInteractionHandler>() );
+ UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, Reference< XInteractionHandler>() );
if( aURLEntries.UserList.getLength() )
{
@@ -775,10 +773,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
{
try
{
- Reference< XPasswordContainer2 > xMasterPasswd(
- PasswordContainer::create( comphelper::getProcessComponentContext() ) );
-
- if( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< XInteractionHandler>() ) )
+ if( m_xMasterPasswd->isPersistentStoringAllowed() && m_xMasterPasswd->authorizateWithMasterPassword( Reference< XInteractionHandler>() ) )
{
int nPos = GetSelectedServicePos();
@@ -790,7 +785,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), 0 ),
UNO_QUERY );
- UrlRecord aURLEntries = xMasterPasswd->find( sUrl, xInteractionHandler );
+ UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, xInteractionHandler );
if( aURLEntries.Url == sUrl && aURLEntries.UserList.getLength() )
{
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 740262a6529a..12751d094b11 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -122,7 +122,8 @@ public:
virtual OUString getCurFilter( ) const SAL_OVERRIDE;
private:
- ::com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_context;
+ Reference< com::sun::star::uno::XComponentContext > m_context;
+ Reference< XPasswordContainer2 > m_xMasterPasswd;
SvtRemoteDlgMode m_eMode;
SvtRemoteDlgType m_eType;