summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/source/fsys/dirent.cxx12
-rw-r--r--tools/source/fsys/tempfile.cxx29
-rw-r--r--tools/source/fsys/urlobj.cxx18
-rw-r--r--tools/source/rc/resmgr.cxx8
-rw-r--r--tools/source/stream/strmwnt.cxx10
5 files changed, 66 insertions, 11 deletions
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 87a78fce058f..9e97170368d4 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -2,8 +2,8 @@
*
* $RCSfile: dirent.cxx,v $
*
- * $Revision: 1.5 $
- * last change: $Author: hro $ $Date: 2000-10-23 11:07:49 $
+ * $Revision: 1.6 $
+ * last change: $Author: hro $ $Date: 2001-05-10 10:17:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -936,11 +936,19 @@ DirEntry::DirEntry( const String& rInitName, FSysPathStyle eStyle )
{
::rtl::OUString aTmp;
::rtl::OUString aOInitName;
+#ifdef TF_FILEURL
+ if ( FileBase::getFileURLFromSystemPath( OUString( rInitName ), aTmp ) == osl_File_E_None )
+ {
+ FileBase::getSystemPathFromFileURL( aTmp, aOInitName );
+ aTmpName = ByteString( String(aOInitName), osl_getThreadTextEncoding() );
+ }
+#else
if ( FileBase::normalizePath( OUString( rInitName ), aTmp ) == osl_File_E_None )
{
FileBase::getSystemPathFromNormalizedPath( aTmp, aOInitName );
aTmpName = ByteString( String(aOInitName), osl_getThreadTextEncoding() );
}
+#endif
#ifdef DBG_UTIL
// ASF nur bei Default eStyle, nicht z.B. aus MakeShortName()
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index f920d18dde0f..522682d40090 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tempfile.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:03:07 $
+ * last change: $Author: hro $ $Date: 2001-05-10 10:18:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -92,7 +92,11 @@ String GetSystemTempDir_Impl()
const char *pDir = TempDirImpl(sBuf);
::rtl::OUString aTmp = ::rtl::OUString::createFromAscii( pDir );
rtl::OUString aRet;
- FileBase::normalizePath( aTmp, aRet );
+#ifdef TF_FILEURL
+ FileBase::getFileURLFromSystemPath( aTmp, aRet );
+#else
+ FileBase::normalize( aTmp, aRet );
+#endif
String aName = aRet;
sal_Int32 i = aName.Len();
if( aName.GetChar(i-1) != '/' )
@@ -111,7 +115,10 @@ String ConstructTempDir_Impl( const String* pParent )
rtl::OUString aRet;
// test for valid filename
+#ifdef TF_FILEURL
+#else
if ( FileBase::getNormalizedPathFromFileURL( aTmp, aRet ) == FileBase::E_None )
+#endif
{
::osl::DirectoryItem aItem;
sal_Int32 i = aRet.getLength();
@@ -205,7 +212,11 @@ String TempFile::CreateTempName( const String* pParent )
// convert to file URL
rtl::OUString aTmp;
if ( aName.Len() )
+#ifdef TF_FILEURL
+ aTmp = aName;
+#else
FileBase::getFileURLFromNormalizedPath( aName, aTmp );
+#endif
return aTmp;
}
@@ -296,7 +307,11 @@ sal_Bool TempFile::IsValid() const
String TempFile::GetName() const
{
rtl::OUString aTmp;
+#ifdef TF_FILEURL
+ aTmp = pImp->aName;
+#else
FileBase::getFileURLFromNormalizedPath( pImp->aName, aTmp );
+#endif
return aTmp;
}
@@ -321,7 +336,11 @@ String TempFile::SetTempNameBaseDirectory( const String &rBaseName )
}
rtl::OUString aTmp;
+#ifdef TF_FILEURL
+ aTmp = aTempNameBase_Impl;
+#else
FileBase::getFileURLFromNormalizedPath( aTempNameBase_Impl, aTmp );
+#endif
return aTmp;
}
@@ -331,7 +350,11 @@ String TempFile::GetTempNameBaseDirectory()
aTempNameBase_Impl = GetSystemTempDir_Impl();
rtl::OUString aTmp;
+#ifdef TF_FILEURL
+ aTmp = aTempNameBase_Impl;
+#else
FileBase::getFileURLFromNormalizedPath( aTempNameBase_Impl, aTmp );
+#endif
return aTmp;
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index ae19beeef749..f9236fe48aa0 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: urlobj.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: sb $ $Date: 2001-04-24 16:28:32 $
+ * last change: $Author: hro $ $Date: 2001-05-10 10:22:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -4873,6 +4873,19 @@ UniString INetURLObject::PathToFileName() const
{
if (m_eScheme != INET_PROT_FILE)
return UniString();
+
+#ifdef TF_FILEURL
+ rtl::OUString aSystemPath;
+ if (osl::FileBase::getSystemPathFromFileURL(
+ decode(m_aAbsURIRef.GetBuffer(),
+ m_aAbsURIRef.GetBuffer() + m_aPath.getEnd(),
+ getEscapePrefix(), NO_DECODE, RTL_TEXTENCODING_UTF8),
+ aSystemPath)
+ != osl::FileBase::E_None)
+ return UniString();
+ else
+ return aSystemPath;
+#else
rtl::OUString aNormalizedPath;
if (osl::FileBase::getNormalizedPathFromFileURL(
decode(m_aAbsURIRef.GetBuffer(),
@@ -4887,6 +4900,7 @@ UniString INetURLObject::PathToFileName() const
!= osl::FileBase::E_None)
return UniString();
return aSystemPath;
+#endif
}
//============================================================================
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index df00ee709e8c..f08095fcfd42 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: resmgr.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: nf $ $Date: 2001-04-05 09:01:31 $
+ * last change: $Author: hro $ $Date: 2001-05-10 10:26:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1257,7 +1257,11 @@ ResMgr* ResMgr::SearchCreateResMgr(
::rtl::OUString aRtlUniAppFileName;
osl_getExecutableFile( &aRtlUniAppFileName.pData );
::rtl::OUString aRtlAppFileName;
+#ifdef TF_FILEURL
+ ::osl::FileBase::getSystemPathFromFileURL( aRtlUniAppFileName, aRtlAppFileName );
+#else
::osl::FileBase::getSystemPathFromNormalizedPath( aRtlUniAppFileName, aRtlAppFileName );
+#endif
String aAppFileName( aRtlAppFileName );
const sal_Char* pLang = GetLang( nType, 0 );
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 3d219a84bfd4..f391efb181ac 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: strmwnt.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:03:09 $
+ * last change: $Author: hro $ $Date: 2001-05-10 10:30:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -173,10 +173,16 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode )
SetBufferSize( 8192 );
// convert URL to SystemPath, if necessary
::rtl::OUString aFileName, aNormPath;
+
+#ifdef TF_FILEURL
+ if ( FileBase::getSystemPathFromFileURL( rFileName, aFileName ) != FileBase::E_None )
+ aFileName = rFileName;
+#else
if ( FileBase::getNormalizedPathFromFileURL( rFileName, aNormPath ) == FileBase::E_None )
FileBase::getSystemPathFromNormalizedPath( aNormPath, aFileName );
else
aFileName = rFileName;
+#endif
Open( aFileName, nMode );
}