summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2000-11-18 15:48:27 +0000
committerPhilipp Lohmann <pl@openoffice.org>2000-11-18 15:48:27 +0000
commit75b81fc17baf47fa8e37455c22214d1e022ea5d7 (patch)
tree4292df90833196093eb278811a333d1d06c5dbed /vcl
parent079d7d84e65e8a774ec9c2f6fb6644b4dbd2b4bd (diff)
fax fo psprint
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/inc/salgdi.h13
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx9
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx58
3 files changed, 43 insertions, 37 deletions
diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h
index ff5d958ed785..6d82aad50ea4 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -2,9 +2,9 @@
*
* $RCSfile: salgdi.h,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: cp $ $Date: 2000-11-17 18:35:17 $
+ * last change: $Author: pl $ $Date: 2000-11-18 16:48:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,7 +62,7 @@
// //
// (C) 1997 Star Division GmbH, Hamburg, Germany //
// //
-// $Revision: 1.3 $ $Author: cp $ $Date: 2000-11-17 18:35:17 $ //
+// $Revision: 1.4 $ $Author: pl $ $Date: 2000-11-18 16:48:26 $ //
// //
// $Workfile: salgdi.h $ //
// $Modtime: 10 Sep 1997 11:55:36 $ //
@@ -121,8 +121,9 @@ class SalGraphicsData
STDAPI( SalGraphicsData )
#ifdef USE_PSPRINT
- ::psp::JobData* m_pJobData;
- ::psp::PrinterGfx* m_pPrinterGfx;
+ ::psp::JobData* m_pJobData;
+ ::psp::PrinterGfx* m_pPrinterGfx;
+ String* m_pPhoneNr;
#endif
SalColormapRef xColormap_;
@@ -257,6 +258,8 @@ public:
inline BOOL IsCompatible( USHORT nDepth,
SalColormap *pMap ) const;
inline Pixel GetPixel( SalColor nSalColor ) const;
+
+ void FaxPhoneComment( const sal_Unicode* pStr, USHORT nLen ) const;
};
#ifdef _SV_SALDATA_HXX
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 1a6b37063cbb..171e1aa02d31 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salgdi.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: cp $ $Date: 2000-11-17 18:42:12 $
+ * last change: $Author: pl $ $Date: 2000-11-18 16:48:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -137,10 +137,11 @@ inline SalPolyLine::~SalPolyLine()
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
final SalGraphicsData::SalGraphicsData()
{
- #if defined(USE_PSPRINT)
+#if defined(USE_PSPRINT)
m_pJobData = NULL;
m_pPrinterGfx = NULL;
- #endif
+ m_pPhoneNr = NULL;
+#endif
hDrawable_ = None;
pClipRegion_ = NULL;
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index cbfa0da94b7e..68da5e7390cf 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salgdi3.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cp $ $Date: 2000-11-17 18:42:12 $
+ * last change: $Author: pl $ $Date: 2000-11-18 16:48:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -130,13 +130,19 @@
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#ifndef PRINTER_DUMMY
-static void
-FaxPhoneComment( Display* pDisplay, const sal_Unicode* pStr, USHORT nLen )
+void SalGraphicsData::FaxPhoneComment( const sal_Unicode* pStr, USHORT nLen ) const
{
- #define FAX_PHONE_TOKEN "@@#"
- #define FAX_PHONE_TOKEN_LENGTH 3
- #define FAX_END_TOKEN "@@"
+#ifdef USE_PSPRINT
+ if( ! m_pPhoneNr )
+ return;
+#else
+ if( ! bPrinter_ )
+ return;
+#endif
+
+#define FAX_PHONE_TOKEN "@@#"
+#define FAX_PHONE_TOKEN_LENGTH 3
+#define FAX_END_TOKEN "@@"
USHORT nPos;
ByteString aPhone( pStr, nLen, gsl_getSystemTextEncoding() );
@@ -163,11 +169,15 @@ FaxPhoneComment( Display* pDisplay, const sal_Unicode* pStr, USHORT nLen )
aPhoneNumber += aPhone;
if( ! bIsCollecting )
{
+#ifndef PRINTER_DUMMY
+#ifndef USE_PSPRINT
aPhone = "PhoneNumber(";
aPhone += aPhoneNumber;
aPhone += ")\n";
-#ifndef USE_PSPRINT
- XpPSComment( pDisplay, aPhone.GetBuffer() );
+ XpPSComment( GetDisplay()->GetDisplay(), aPhone.GetBuffer() );
+#else
+ *m_pPhoneNr = String( aPhoneNumber, gsl_getSystemTextEncoding() );
+#endif
#endif
aPhoneNumber = ByteString();
}
@@ -178,7 +188,6 @@ FaxPhoneComment( Display* pDisplay, const sal_Unicode* pStr, USHORT nLen )
aPhoneNumber = ByteString();
}
}
-#endif
// ----------------------------------------------------------------------------
//
@@ -838,12 +847,7 @@ void
SalGraphicsData::DrawText( long nX, long nY,
const sal_Unicode *pStr, USHORT nLen )
{
-#ifndef PRINTER_DUMMY
- if( bPrinter_ )
- FaxPhoneComment( GetXDisplay(), pStr, nLen );
-#endif
-
- #ifdef __notdef__
+#ifdef __notdef__
// XXX Fix me this part is not unicode / multibyte aware
// Bug: #45670#
@@ -888,7 +892,7 @@ SalGraphicsData::DrawText( long nX, long nY,
}
}
- #endif /* __notdef__ */
+#endif /* __notdef__ */
Display *pDisplay = GetXDisplay();
SalConverterCache *pCvt = GetDisplay()->GetConverter();
@@ -901,18 +905,19 @@ SalGraphicsData::DrawText( long nX, long nY,
void
SalGraphics::DrawText( long nX, long nY, const xub_Unicode* pStr, USHORT nLen )
{
- #if defined(USE_PSPRINT)
+ maGraphicsData.FaxPhoneComment( pStr, nLen );
+#if defined(USE_PSPRINT)
if (maGraphicsData.m_pPrinterGfx != NULL)
maGraphicsData.m_pPrinterGfx->DrawText (Point(nX, nY), pStr, nLen);
else
{
- #endif
+#endif
maGraphicsData.DrawText( nX, nY, pStr, nLen );
- #if defined(USE_PSPRINT)
+#if defined(USE_PSPRINT)
}
- #endif
+#endif
}
//--------------------------------------------------------------------------
@@ -942,10 +947,6 @@ SalGraphicsData::DrawText(
long nX, long nY,
const sal_Unicode* pStr, USHORT nLen, const long* pDXAry )
{
- #ifndef PRINTER_DUMMY
- if( bPrinter_ )
- FaxPhoneComment( GetXDisplay(), pStr, nLen );
- #endif
GC pGC = SelectFont();
// workaround for problems with negative coordinates
@@ -1028,12 +1029,13 @@ void
SalGraphics::DrawTextArray( long nX, long nY,
const xub_Unicode *pStr, USHORT nLen, const long *pDXAry )
{
- #if defined(USE_PSPRINT)
+ maGraphicsData.FaxPhoneComment( pStr, nLen );
+#if defined(USE_PSPRINT)
if (maGraphicsData.m_pPrinterGfx != NULL)
maGraphicsData.m_pPrinterGfx->DrawText (Point(nX, nY), pStr, nLen, pDXAry);
else
{
- #endif
+#endif
maGraphicsData.DrawText( nX, nY, pStr, nLen, pDXAry );