diff options
author | Jörg Budischewski <jbu@openoffice.org> | 2001-05-14 07:52:59 +0000 |
---|---|---|
committer | Jörg Budischewski <jbu@openoffice.org> | 2001-05-14 07:52:59 +0000 |
commit | b2ca499461bbd8f3c2cdfa361137d22a646a7021 (patch) | |
tree | 0c018260ba8efc3093062a37378d87b9d08c2988 | |
parent | c399c4b69f2d5df439fa12938192a7c538e3162d (diff) |
#tfu_630# file url changes, checked in blind (no env to build
-rw-r--r-- | psprint/source/printergfx/printerjob.cxx | 18 | ||||
-rw-r--r-- | psprint/source/printergfx/text_gfx.cxx | 8 |
2 files changed, 22 insertions, 4 deletions
diff --git a/psprint/source/printergfx/printerjob.cxx b/psprint/source/printergfx/printerjob.cxx index 2093cc68cdef..699671fc90ad 100644 --- a/psprint/source/printergfx/printerjob.cxx +++ b/psprint/source/printergfx/printerjob.cxx @@ -2,9 +2,9 @@ * * $RCSfile: printerjob.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: pl $ $Date: 2001-05-08 11:46:04 $ + * last change: $Author: jbu $ $Date: 2001-05-14 08:52:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -112,7 +112,11 @@ PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rE rtl::OUString aFileName = maSpoolDirName + rtl::OUString::createFromAscii ("/") + rName + rExtension; rtl::OUString aUNCFileName; +#ifdef + OSL_VERIFY( osl_File_E_None == osl::File::getFileURLFromSystemPath( aSubDir, aUNCSubDir ) ); +#else osl::File::normalizePath (aFileName, aUNCFileName); +#endif osl::File* pFile = new osl::File (aUNCFileName); pFile->open (OpenFlag_Read | OpenFlag_Write | OpenFlag_Create); @@ -293,7 +297,17 @@ void removeSpoolDir (const rtl::OUString& rSpoolDir) { rtl::OUString aSysPath; +#ifdef TF_FILEURL + if( osl_File_E_None != osl::File::getSystemPathFromFileURL( rSpoolDir, aSysPath ) ) + { + // Conversion did not work, as this is quite a dangerous action, + // we should abort here .... + OSL_ENSURE( 0, "psprint: couldn't remove spool directory" ); + return; + } +#else osl::File::getSystemPathFromNormalizedPath (rSpoolDir, aSysPath); +#endif rtl::OString aSysPathByte = rtl::OUStringToOString (aSysPath, osl_getThreadTextEncoding()); sal_Char pSystem [128]; diff --git a/psprint/source/printergfx/text_gfx.cxx b/psprint/source/printergfx/text_gfx.cxx index 4e84376d9a01..e8b12c15f5d2 100644 --- a/psprint/source/printergfx/text_gfx.cxx +++ b/psprint/source/printergfx/text_gfx.cxx @@ -2,9 +2,9 @@ * * $RCSfile: text_gfx.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: cp $ $Date: 2001-05-11 12:25:02 $ + * last change: $Author: jbu $ $Date: 2001-05-14 08:52:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -160,7 +160,11 @@ PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID) { const rtl::OString& rSysPath (mrFontMgr.getFontFileSysPath(nFontID) ); rtl::OUString aUNCPath; +#ifdef TF_FILEURL + osl::File::getFileURLFromSystemPath (OStringToOUString (rSysPath, osl_getThreadTextEncoding()), aUNCPath); +#else osl::File::normalizePath (OStringToOUString (rSysPath, osl_getThreadTextEncoding()), aUNCPath); +#endif osl::File aFontFile (aUNCPath); // provide the pfb or pfa font as a (pfa-)font resource |