Kaydet (Commit) e5647de7 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

callcatcher: clean up Dir and DirEntry

üst ca402fa0
...@@ -290,7 +290,6 @@ public: ...@@ -290,7 +290,6 @@ public:
void SetExtension( const String& rExt, char cSep = '.' ); void SetExtension( const String& rExt, char cSep = '.' );
String GetExtension( char cSep = '.' ) const; String GetExtension( char cSep = '.' ) const;
String CutExtension( char cSep = '.' );
void SetName( const String& rName, FSysPathStyle eFormatter = FSYS_STYLE_HOST ); void SetName( const String& rName, FSysPathStyle eFormatter = FSYS_STYLE_HOST );
inline const String GetNameDirect() const { return String(aName, osl_getThreadTextEncoding()); } inline const String GetNameDirect() const { return String(aName, osl_getThreadTextEncoding()); }
String GetName( FSysPathStyle eFormatter = FSYS_STYLE_HOST ) const; String GetName( FSysPathStyle eFormatter = FSYS_STYLE_HOST ) const;
...@@ -336,7 +335,6 @@ public: ...@@ -336,7 +335,6 @@ public:
sal_Bool operator !=( const DirEntry& rAnotherDir ) const sal_Bool operator !=( const DirEntry& rAnotherDir ) const
{ return !(DirEntry::operator==( rAnotherDir )); } { return !(DirEntry::operator==( rAnotherDir )); }
StringCompare NameCompare( const DirEntry &rWith ) const;
inline StringCompare NameCompareDirect( const DirEntry &rWith ) const inline StringCompare NameCompareDirect( const DirEntry &rWith ) const
{ {
#ifdef UNX #ifdef UNX
...@@ -447,12 +445,8 @@ protected: ...@@ -447,12 +445,8 @@ protected:
#endif #endif
public: public:
Dir();
Dir( const DirEntry& rDirEntry, Dir( const DirEntry& rDirEntry,
DirEntryKind nKind = FSYS_KIND_ALL ); DirEntryKind nKind = FSYS_KIND_ALL );
Dir( const DirEntry& rDirEntry,
DirEntryKind nKind,
FSysSort nSort, ... );
~Dir(); ~Dir();
void Reset(); void Reset();
......
...@@ -1133,31 +1133,6 @@ String DirEntry::CutName( FSysPathStyle eStyle ) ...@@ -1133,31 +1133,6 @@ String DirEntry::CutName( FSysPathStyle eStyle )
return aOldName; 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==() |* DirEntry::operator==()
...@@ -1373,31 +1348,6 @@ void DirEntry::SetExtension( const String& rExtension, char cSep ) ...@@ -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() |* DirEntry::SetName()
......
...@@ -386,27 +386,6 @@ sal_uInt16 Dir::Scan( sal_uInt16 nCount ) ...@@ -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 ): Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ):
DirEntry( rDirEntry ), DirEntry( rDirEntry ),
pReader( 0 ) pReader( 0 )
...@@ -417,24 +396,6 @@ Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ): ...@@ -417,24 +396,6 @@ Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ):
Reset(); 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() |* Dir::~Dir()
......
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