[Libreoffice-commits] .: tools/source
François Tigeot
ftigeot at kemper.freedesktop.org
Thu May 5 00:23:53 PDT 2011
tools/source/fsys/dirent.cxx | 89 -------------------------------------------
1 file changed, 89 deletions(-)
New commits:
commit 0f0173149cd50c39e47683391cd87bb2d2de345b
Author: Francois Tigeot <ftigeot at wolfpond.org>
Date: Thu May 5 09:19:40 2011 +0200
Remove unused DirEntry methods
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 731a1d2..84ed562 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -1650,95 +1650,6 @@ sal_Bool DirEntry::Find( const String& rPfad, char cDelim )
/*************************************************************************
|*
-|* DirEntry::ImpToRel()
-|*
-*************************************************************************/
-
-sal_Bool DirEntry::ImpToRel( String aCurStr )
-{
- DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
-
- DirEntry aThis(*this);
- aThis.ToAbs();
- String aThisStr( aThis.GetFull( FSYS_STYLE_HPFS ) );
-
- // preserve case of path even if caseinsensitive
- String aThisCompareStr( aThisStr ), aCurCompareStr( aCurStr );
-
-#if defined(WNT)
- aThisCompareStr.ToLowerAscii();
- aCurCompareStr.ToLowerAscii();
-#endif
-
- // "Ubereinstimmung pr"ufen
- sal_uInt16 nPos = aThisCompareStr.Match( aCurCompareStr );
- if ( nPos == STRING_MATCH && aThisStr.Len() != aCurStr.Len() )
- nPos = Min( aThisStr.Len(), aCurStr.Len() );
-
- // Sonderfall, die DirEntries sind identisch
- if ( nPos == STRING_MATCH )
- {
- // dann ist der relative Pfad das aktuelle Verzeichnis
- *this = DirEntry();
- return sal_True;
- }
-
- // Sonderfall, die DirEntries sind total verschieden
- if ( nPos == 0 )
- {
- // dann ist der relativste Pfad absolut
- *this = aThis;
- return sal_False;
- }
-
- // sonst nehmen wir die identischen Einzelteile vorne weg
- while ( nPos > 0 && aThisStr.GetChar(nPos) != '\\' )
- --nPos;
- aThisStr.Erase( 0, nPos + ( ( aThisStr.GetChar(nPos) == '\\' ) ? 1 : 0 ) );
- aCurStr.Erase( 0, nPos + ( ( aCurStr.GetChar(nPos) == '\\' ) ? 1 : 0 ) );
-
- // und fuellen mit dem Level der Directories auf
- for ( nPos = 0; nPos < aCurStr.Len(); ++nPos )
- if ( aCurStr.GetChar(nPos) == '\\' )
- aThisStr.Insert( String( "..\\", osl_getThreadTextEncoding() ), 0 );
-
- // das ist dann unser relativer Pfad
- *this = DirEntry( aThisStr, FSYS_STYLE_HPFS );
- return sal_True;
-}
-
-/*************************************************************************
-|*
-|* DirEntry::ToRel()
-|*
-*************************************************************************/
-
-sal_Bool DirEntry::ToRel()
-{
- DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
-
- DirEntry aCur;
- aCur.ToAbs();
- return ImpToRel( aCur.GetFull( FSYS_STYLE_HPFS ) );
-}
-
-/*************************************************************************
-|*
-|* DirEntry::ToRel()
-|*
-*************************************************************************/
-
-sal_Bool DirEntry::ToRel( const DirEntry& rStart )
-{
- DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
-
- DirEntry aStart( rStart );
- aStart.ToAbs();
- return ImpToRel( aStart.GetFull( FSYS_STYLE_HPFS ) );
-}
-
-/*************************************************************************
-|*
|* DirEntry::GetDevice()
|*
*************************************************************************/
More information about the Libreoffice-commits
mailing list