diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-07-26 02:47:04 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-07-26 14:57:33 +0200 |
commit | e67968c8a58741981923b0daa0d69c40802e58c1 (patch) | |
tree | 8627894ef400d4f7a582e4160d8299eab681c96d /sd | |
parent | cd2fa9783d2c46f1cbd246acd5b683c386f71315 (diff) |
change maPasswordList to ptr_vector
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index c720f1c806d8..60c48c19c513 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -82,6 +82,7 @@ #include <comphelper/processfactory.hxx> #include <vector> +#include <boost/ptr_container/ptr_vector.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -208,7 +209,7 @@ public: String GetPassword( const String rPath ); void DeletePassords(); - vector< PasswordEntry* > maPasswordList; + boost::ptr_vector< PasswordEntry > maPasswordList; String maDocFile; String maLayoutFile; @@ -1679,9 +1680,9 @@ void AssistentDlgImpl::SavePassword( SfxObjectShellLock xDoc, const String& rPat PasswordEntry* pEntry = NULL; for ( size_t i = 0, n = maPasswordList.size(); i < n; ++i ) { - if ( maPasswordList[ i ]->maPath == rPath ) + if ( maPasswordList[ i ].maPath == rPath ) { - pEntry = maPasswordList[ i ]; + pEntry = &maPasswordList[ i ]; break; } } @@ -1712,7 +1713,7 @@ String AssistentDlgImpl::GetPassword( const String rPath ) { for ( size_t i = 0, n = maPasswordList.size(); i < n; ++i ) { - PasswordEntry* pEntry = maPasswordList[ i ]; + PasswordEntry* pEntry = &maPasswordList[ i ]; if(pEntry->maPath == rPath) return pEntry->maPassword; } @@ -1721,8 +1722,6 @@ String AssistentDlgImpl::GetPassword( const String rPath ) void AssistentDlgImpl::DeletePassords() { - for ( size_t i = 0, n = maPasswordList.size(); i < n; ++i ) - delete maPasswordList[ i ]; maPasswordList.clear(); } |