summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2015-08-25 11:51:11 +0200
committerSzymon Kłos <eszkadev@gmail.com>2015-08-29 12:33:18 +0200
commit808f14886c08b7140ecff06c4d65d2db8286f0b1 (patch)
tree8818c5db259dc5fd4290450af6758a706b4a3bfe /fpicker
parent6bf5bc98739c89537f7f3f1247f703943f907818 (diff)
Remove stored password if service is deleted
Change-Id: I500a8ee2874f7a9577e37fe25f5813e5821e9719
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 1b541ba9096e..4d1cc1515716 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -822,6 +822,30 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
if( aBox->Execute() == RET_YES )
{
+ // remove password
+ try
+ {
+ if( m_xMasterPasswd->isPersistentStoringAllowed() )
+ {
+ OUString sUrl( m_aServices[nPos]->GetUrl() );
+
+ Reference< XInteractionHandler > xInteractionHandler(
+ InteractionHandler::createWithParent( m_xContext, 0 ),
+ UNO_QUERY );
+
+ UrlRecord aURLEntries = m_xMasterPasswd->find( sUrl, xInteractionHandler );
+
+ if( aURLEntries.Url == sUrl && aURLEntries.UserList.getLength() )
+ {
+ OUString sUserName = aURLEntries.UserList[0].UserName;
+
+ m_xMasterPasswd->removePersistent( sUrl, sUserName );
+ }
+ }
+ }
+ catch( const Exception& )
+ {}
+
m_aServices.erase( m_aServices.begin() + nPos );
m_pServices_lb->RemoveEntry( nSelected );