You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by yd...@apache.org on 2014/02/23 17:44:37 UTC
svn commit: r1571026 - /openoffice/trunk/main/vcl/os2/source/gdi/salprn.cxx
Author: ydario
Date: Sun Feb 23 16:44:37 2014
New Revision: 1571026
URL: http://svn.apache.org/r1571026
Log:
#i124294# use rAppName to fill pszComment field when opening the printer device.
Modified:
openoffice/trunk/main/vcl/os2/source/gdi/salprn.cxx
Modified: openoffice/trunk/main/vcl/os2/source/gdi/salprn.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/os2/source/gdi/salprn.cxx?rev=1571026&r1=1571025&r2=1571026&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/os2/source/gdi/salprn.cxx (original)
+++ openoffice/trunk/main/vcl/os2/source/gdi/salprn.cxx Sun Feb 23 16:44:37 2014
@@ -1671,25 +1671,9 @@ sal_Bool Os2SalPrinter::StartJob( const
lType = OD_QUEUED;
}
-#if 0 // YD FIXME
- // Set comment (AppName nur bis zum 1. Space-Zeichen nehmen)
- const xub_Unicode* pComment = rAppName;
- USHORT nCommentLen = 0;
- memset( maCommentBuf, 0, sizeof( maCommentBuf ) );
- while ( (nCommentLen < 32) &&
- (((*pComment >= 'a') && (*pComment <= 'z')) ||
- ((*pComment >= 'A') && (*pComment <= 'Z')) ||
- ((*pComment >= '0') && (*pComment <= '9')) ||
- (*pComment == '-')))
- {
- maCommentBuf[nCommentLen] = (char)(*pComment);
- nCommentLen++;
- pComment++;
- }
- aDevOpenStruc.pszComment = (PSZ)maCommentBuf;
-#endif
- ByteString jobName( rJobName, gsl_getSystemTextEncoding());
- aDevOpenStruc.pszComment = (PSZ)jobName.GetBuffer();
+ // Set comment using application name
+ ByteString appName( rAppName, gsl_getSystemTextEncoding());
+ aDevOpenStruc.pszComment = (PSZ)appName.GetBuffer();
// Kopien
if ( nCopies > 1 )
@@ -1740,6 +1724,7 @@ sal_Bool Os2SalPrinter::StartJob( const
#endif
// JobName ermitteln und Job starten
+ ByteString jobName( rJobName, gsl_getSystemTextEncoding());
PSZ pszJobName = NULL;
int nJobNameLen = 0;
if ( jobName.Len() > 0 )