summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2010-12-11 12:29:43 -0800
committerJoseph Powers <jpowers27@cox.net>2010-12-11 12:30:39 -0800
commit01346417a48d19aee51f040a693de752d03c49cf (patch)
tree893deb2e1216b8aa23a9c3f78994b94ca6f399c3
parentc3773ef054210d792755ef68f0be3917494f7a76 (diff)
remove DECLARE_LIST( PasswordEntryList, PasswordEntry * )
-rw-r--r--sd/source/ui/dlg/dlgass.cxx36
1 files changed, 15 insertions, 21 deletions
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 22197776b133..7098d5831e81 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -81,11 +81,13 @@
#include "WindowUpdater.hxx"
#include <comphelper/processfactory.hxx>
+#include <vector>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::sd;
+using ::std::vector;
void InterpolateFixedBitmap( FixedBitmap * pBitmap )
{
@@ -117,8 +119,6 @@ public:
String maPath;
};
-DECLARE_LIST( PasswordEntryList, PasswordEntry * )
-
// ====================================================================
/** A simple wrapper that looks like a PushButton and is used to force the
@@ -208,7 +208,7 @@ public:
String GetPassword( const String rPath );
void DeletePassords();
- PasswordEntryList maPasswordList;
+ vector< PasswordEntry* > maPasswordList;
String maDocFile;
String maLayoutFile;
@@ -1674,21 +1674,21 @@ void AssistentDlgImpl::SavePassword( SfxObjectShellLock xDoc, const String& rPat
if(aPass.Len() == 0)
return;
- PasswordEntry* pEntry = maPasswordList.First();
- while(pEntry)
+ PasswordEntry* pEntry = NULL;
+ for ( size_t i = 0, n = maPasswordList.size(); i < n; ++i )
{
- if(pEntry->maPath == rPath)
+ if ( maPasswordList[ i ]->maPath == rPath )
+ {
+ pEntry = maPasswordList[ i ];
break;
-
- pEntry = maPasswordList.Next();
-
+ }
}
if(pEntry == NULL)
{
pEntry = new PasswordEntry();
pEntry->maPath = rPath;
- maPasswordList.Insert( pEntry );
+ maPasswordList.push_back( pEntry );
}
if(pEntry)
@@ -1708,26 +1708,20 @@ void AssistentDlgImpl::RestorePassword( SfxItemSet* pSet, const String& rPath )
String AssistentDlgImpl::GetPassword( const String rPath )
{
- PasswordEntry* pEntry = maPasswordList.First();
- while(pEntry)
+ for ( size_t i = 0, n = maPasswordList.size(); i < n; ++i )
{
+ PasswordEntry* pEntry = maPasswordList[ i ];
if(pEntry->maPath == rPath)
return pEntry->maPassword;
-
- pEntry = maPasswordList.Next();
}
-
return String();
}
void AssistentDlgImpl::DeletePassords()
{
- PasswordEntry* pEntry = maPasswordList.First();
- while(pEntry)
- {
- delete pEntry;
- pEntry = maPasswordList.Next();
- }
+ for ( size_t i = 0, n = maPasswordList.size(); i < n; ++i )
+ delete maPasswordList[ i ];
+ maPasswordList.clear();
}
BOOL AssistentDlgImpl::IsOwnFormat( const String& rPath )