summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-07-26 02:47:04 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-07-26 14:57:33 +0200
commit3956169f4e4db08346b6cf3a2fd4a8cb81f9d356 (patch)
tree152807b72c7dee315129b21cf0508f39f6244a27
parentbe68b7b8a437e3d9d8e5314d31d9b4ae4871a4cf (diff)
change maPasswordList to ptr_vector
-rw-r--r--sd/source/ui/dlg/dlgass.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 5ee4d8e40..38f4b2b0f 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();
}