summaryrefslogtreecommitdiff
path: root/psprint/source
diff options
context:
space:
mode:
authorChristof Pintaske <cp@openoffice.org>2001-05-23 10:49:56 +0000
committerChristof Pintaske <cp@openoffice.org>2001-05-23 10:49:56 +0000
commit5e72bdf7884dec98e12bae83f8a695180a342837 (patch)
treec378d35274b4923f07ac696fafe532ac93dc0644 /psprint/source
parent5aa8c5c4aa8e74583ecb35078fb0acea18590cf9 (diff)
#82073# export psp symbols only
Diffstat (limited to 'psprint/source')
-rw-r--r--psprint/source/printergfx/printerjob.cxx71
1 files changed, 41 insertions, 30 deletions
diff --git a/psprint/source/printergfx/printerjob.cxx b/psprint/source/printergfx/printerjob.cxx
index 71debe207359..a706ba09eadd 100644
--- a/psprint/source/printergfx/printerjob.cxx
+++ b/psprint/source/printergfx/printerjob.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: printerjob.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: jbu $ $Date: 2001-05-22 09:02:08 $
+ * last change: $Author: cp $ $Date: 2001-05-23 11:49:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,37 +97,12 @@ using namespace psp ;
#define nBLOCKSIZE 0x2000
-sal_Bool
-AppendPS(FILE* pDst, osl::File* pSrc,
- sal_uChar* pBuffer = NULL, sal_uInt64 nBlockSize = nBLOCKSIZE);
-
-/*
- * private convenience routines for file handling
- */
-
-osl::File*
-PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rExtension)
+namespace psp
{
- rtl::OUString aFileName = maSpoolDirName + rtl::OUString::createFromAscii ("/")
- + rName + rExtension;
- rtl::OUString aNormFileName;
-#ifdef TF_FILEURL
- OSL_VERIFY( osl_File_E_None == osl::File::getFileURLFromSystemPath( aFileName, aNormFileName ) );
-#else
- osl::File::normalizePath (aFileName, aNormFileName);
-#endif
-
- osl::File* pFile = new osl::File (aNormFileName);
- pFile->open (OpenFlag_Read | OpenFlag_Write | OpenFlag_Create);
- pFile->setAttributes (aNormFileName,
- osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead );
-
- return pFile;
-}
-
sal_Bool
-AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer, sal_uInt64 nBlockSize)
+AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer,
+ sal_uInt64 nBlockSize = nBLOCKSIZE)
{
if ((pDst == NULL) || (pSrc == NULL))
return sal_False;
@@ -152,6 +127,33 @@ AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer, sal_uInt64 nBlockSize
return sal_True;
}
+} // namespace psp
+
+/*
+ * private convenience routines for file handling
+ */
+
+osl::File*
+PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rExtension)
+{
+
+ rtl::OUString aFileName = maSpoolDirName + rtl::OUString::createFromAscii ("/")
+ + rName + rExtension;
+ rtl::OUString aNormFileName;
+#ifdef TF_FILEURL
+ OSL_VERIFY( osl_File_E_None == osl::File::getFileURLFromSystemPath( aFileName, aNormFileName ) );
+#else
+ osl::File::normalizePath (aFileName, aNormFileName);
+#endif
+
+ osl::File* pFile = new osl::File (aNormFileName);
+ pFile->open (OpenFlag_Read | OpenFlag_Write | OpenFlag_Create);
+ pFile->setAttributes (aNormFileName,
+ osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead );
+
+ return pFile;
+}
+
/*
* public methods of PrinterJob: for use in PrinterGfx
*/
@@ -243,6 +245,9 @@ PrinterJob::PrinterJob () :
{
}
+namespace psp
+{
+
/* check whether the given name points to a directory which is
usable for the user */
sal_Bool
@@ -354,6 +359,8 @@ createSpoolDir ()
return aUNCSubDir;
}
+} // namespace psp
+
PrinterJob::~PrinterJob ()
{
std::list< osl::File* >::iterator pPage;
@@ -378,6 +385,8 @@ PrinterJob::~PrinterJob ()
// osl::Directory::remove (maSpoolDirName);
}
+namespace psp
+{
// get locale invariant, 7bit clean current local time string
sal_Char*
@@ -390,6 +399,8 @@ getLocalTime(sal_Char* pBuffer, sal_uInt32 nBufSize)
return asctime_r(pLocalTime, pBuffer);
}
+}
+
sal_Bool
PrinterJob::StartJob (
const rtl::OUString& rFileName,