Kaydet (Commit) 639e7003 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert UCB_GetFileListOfFolder from SvPtrarr to std::vector

Change-Id: I460f33d65ee2ea1b16296063715ae4040759b776
üst 722c6752
......@@ -31,6 +31,7 @@
#include <tools/solar.h>
#include <sal/types.h>
#include "swdllapi.h"
#include <tools/datetime.hxx>
#include <vector>
......@@ -69,10 +70,10 @@ SW_DLLPUBLIC sal_Bool UCB_IsReadOnlyFileName( const String& rURL );
// pDateTime != 0 -> returns also the modified date/time of
// the files in a SvPtrarr -->
// !! objects must be deleted from the caller!!
sal_Bool UCB_GetFileListOfFolder( const String& rURL,
bool UCB_GetFileListOfFolder( const String& rURL,
std::vector<String*>& rList,
const String* pExtension = 0,
SvPtrarr* pDateTimeList = 0 );
std::vector<DateTime*>* pDateTimeList = 0 );
// is the URL an existing file?
SW_DLLPUBLIC sal_Bool UCB_IsFile( const String& rURL );
......
......@@ -201,10 +201,10 @@ sal_Bool UCB_IsDirectory( const String& rURL )
// pDateTime != 0 -> returns also the modified date/time of
// the files in a SvPtrarr -->
// !! objects must be deleted from the caller!!
sal_Bool UCB_GetFileListOfFolder( const String& rURL,
bool UCB_GetFileListOfFolder( const String& rURL,
std::vector<String*>& rList,
const String* pExtension,
SvPtrarr* pDateTimeList )
std::vector< ::DateTime* >* pDateTimeList )
{
sal_Bool bOk = sal_False;
try
......@@ -256,9 +256,7 @@ sal_Bool UCB_GetFileListOfFolder( const String& rURL,
aStamp.Minutes,
aStamp.Seconds,
aStamp.HundredthSeconds ));
void* p = pDateTime;
pDateTimeList->Insert( p,
pDateTimeList->Count() );
pDateTimeList->push_back( pDateTime );
}
}
......
......@@ -304,7 +304,7 @@ void SwGlossaryList::Update()
{
std::vector<String> aFoundGroupNames;
std::vector<String*> aFiles;
SvPtrarr aDateTimeArr( 16 );
std::vector<DateTime*> aDateTimeArr( 16 );
SWUnoHelper::UCB_GetFileListOfFolder( rPathArr[nPath], aFiles,
&sExt, &aDateTimeArr );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment