callcatcher: clean up Dir and DirEntry
This commit is contained in:
@@ -290,7 +290,6 @@ public:
|
||||
|
||||
void SetExtension( const String& rExt, char cSep = '.' );
|
||||
String GetExtension( char cSep = '.' ) const;
|
||||
String CutExtension( char cSep = '.' );
|
||||
void SetName( const String& rName, FSysPathStyle eFormatter = FSYS_STYLE_HOST );
|
||||
inline const String GetNameDirect() const { return String(aName, osl_getThreadTextEncoding()); }
|
||||
String GetName( FSysPathStyle eFormatter = FSYS_STYLE_HOST ) const;
|
||||
@@ -336,7 +335,6 @@ public:
|
||||
sal_Bool operator !=( const DirEntry& rAnotherDir ) const
|
||||
{ return !(DirEntry::operator==( rAnotherDir )); }
|
||||
|
||||
StringCompare NameCompare( const DirEntry &rWith ) const;
|
||||
inline StringCompare NameCompareDirect( const DirEntry &rWith ) const
|
||||
{
|
||||
#ifdef UNX
|
||||
@@ -447,12 +445,8 @@ protected:
|
||||
#endif
|
||||
|
||||
public:
|
||||
Dir();
|
||||
Dir( const DirEntry& rDirEntry,
|
||||
DirEntryKind nKind = FSYS_KIND_ALL );
|
||||
Dir( const DirEntry& rDirEntry,
|
||||
DirEntryKind nKind,
|
||||
FSysSort nSort, ... );
|
||||
~Dir();
|
||||
|
||||
void Reset();
|
||||
|
@@ -1133,31 +1133,6 @@ String DirEntry::CutName( FSysPathStyle eStyle )
|
||||
return aOldName;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* DirEntry::NameCompare
|
||||
|*
|
||||
|* Beschreibung Vergleich nur die Namen (ohne Pfad, aber mit Gross/Klein)
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
StringCompare DirEntry::NameCompare( const DirEntry &rWith ) const
|
||||
{
|
||||
ByteString aThisName;
|
||||
ByteString aParameterName;
|
||||
|
||||
#ifdef UNX
|
||||
aThisName = aName;
|
||||
aParameterName = rWith.aName;
|
||||
#else
|
||||
aThisName = ByteString(aName).ToLowerAscii();
|
||||
aParameterName = ByteString(rWith.aName).ToLowerAscii();
|
||||
#endif
|
||||
|
||||
return aThisName.CompareTo( aParameterName );
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* DirEntry::operator==()
|
||||
@@ -1373,31 +1348,6 @@ void DirEntry::SetExtension( const String& rExtension, char cSep )
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* DirEntry::CutExtension()
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
String DirEntry::CutExtension( char cSep )
|
||||
{
|
||||
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
|
||||
|
||||
const char *p0 = ( aName.GetBuffer() );
|
||||
const char *p1 = p0 + aName.Len() - 1;
|
||||
while ( p1 >= p0 && *p1 != cSep )
|
||||
p1--;
|
||||
|
||||
if ( p1 >= p0 )
|
||||
{
|
||||
// es wurde ein cSep an der Position p1 gefunden
|
||||
aName.Erase( static_cast< xub_StrLen >(p1-p0) );
|
||||
return String(p1 + 1, osl_getThreadTextEncoding());
|
||||
}
|
||||
|
||||
return String();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* DirEntry::SetName()
|
||||
|
@@ -386,27 +386,6 @@ sal_uInt16 Dir::Scan( sal_uInt16 nCount )
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags, FSysSort nSort, ... ):
|
||||
DirEntry( rDirEntry ),
|
||||
pReader( 0 )
|
||||
{
|
||||
DBG_CTOR( Dir, NULL );
|
||||
|
||||
Construct( nKindFlags );
|
||||
|
||||
std::va_list pArgs;
|
||||
va_start( pArgs, nSort );
|
||||
ImpSetSort( pArgs, nSort );
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Dir::Dir()
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ):
|
||||
DirEntry( rDirEntry ),
|
||||
pReader( 0 )
|
||||
@@ -417,24 +396,6 @@ Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ):
|
||||
Reset();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Dir::Dir()
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
Dir::Dir():
|
||||
pReader( 0 )
|
||||
{
|
||||
DBG_CTOR( Dir, NULL );
|
||||
|
||||
pLst = NULL;
|
||||
pSortLst = NULL;
|
||||
pStatLst = NULL;
|
||||
eAttrMask = FSYS_KIND_ALL;
|
||||
aNameMask = String("*", osl_getThreadTextEncoding());
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Dir::~Dir()
|
||||
|
Reference in New Issue
Block a user