diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-10-04 17:21:56 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-10-04 17:21:56 +0000 |
commit | 64dd18e7464afb5c305e706af1f70f045a3a8f48 (patch) | |
tree | 3833179084a708e1f51f6084a837ae625129b8ec /sd/source/ui/dlg/dlgass.cxx | |
parent | 6b0978e31725af5bb98b29fea758730c136d7d27 (diff) |
INTEGRATION: CWS mav09 (1.25.60); FILE MERGED
2004/09/16 18:26:27 mav 1.25.60.4: RESYNC: (1.26-1.27); FILE MERGED
2004/04/29 18:06:38 mav 1.25.60.3: RESYNC: (1.25-1.26); FILE MERGED
2004/04/27 17:01:55 mba 1.25.60.2: #i27773#: new embedding API
2004/04/14 14:12:02 mba 1.25.60.1: #i27773#: remove so3; new storage API
Diffstat (limited to 'sd/source/ui/dlg/dlgass.cxx')
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 0b50cba0799f..b0d740c9c813 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dlgass.cxx,v $ * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * - * last change: $Author: rt $ $Date: 2004-08-23 08:14:49 $ + * last change: $Author: kz $ $Date: 2004-10-04 18:21:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1628,39 +1628,34 @@ void AssistentDlgImpl::SavePassword( SfxObjectShellLock xDoc, const String& rPat if(pMedium && pMedium->IsStorage()) { SfxItemSet * pSet = pMedium->GetItemSet(); -// const SfxPoolItem *pItem = 0; -// if( pSet->GetItemState(SID_PASSWORD, TRUE, &pItem) == SFX_ITEM_SET ) -// { -// String aPass( ((const SfxStringItem*)pItem)->GetValue()); - SvStorage* pStorage = pMedium->GetStorage(); - if(pStorage) + const SfxPoolItem *pItem = 0; + if( pSet->GetItemState(SID_PASSWORD, TRUE, &pItem) == SFX_ITEM_SET ) + { + //TODO/MBA: testing + String aPass( ((const SfxStringItem*)pItem)->GetValue()); + if(aPass.Len() == 0) + return; + + PasswordEntry* pEntry = m_aPasswordList.First(); + while(pEntry) { + if(pEntry->m_aPath == rPath) + break; - String aPass( pStorage->GetKey(), RTL_TEXTENCODING_ASCII_US ); + pEntry = m_aPasswordList.Next(); - if(aPass.Len() == 0) - return; - - PasswordEntry* pEntry = m_aPasswordList.First(); - while(pEntry) - { - if(pEntry->m_aPath == rPath) - break; - - pEntry = m_aPasswordList.Next(); - - } - - if(pEntry == NULL) - { - pEntry = new PasswordEntry(); - pEntry->m_aPath = rPath; - m_aPasswordList.Insert( pEntry ); - } + } - if(pEntry) - pEntry->m_aPassword = aPass; + if(pEntry == NULL) + { + pEntry = new PasswordEntry(); + pEntry->m_aPath = rPath; + m_aPasswordList.Insert( pEntry ); } + + if(pEntry) + pEntry->m_aPassword = aPass; + } } } } |