[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/os2

Yuri Dario ydario at apache.org
Sun Feb 23 10:07:22 PST 2014


 vcl/os2/source/gdi/salprn.cxx |   23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

New commits:
commit 034ca8fdc5b4c90aa3047682c06187cfc6757a29
Author: Yuri Dario <ydario at apache.org>
Date:   Sun Feb 23 16:44:37 2014 +0000

    #i124294# use rAppName to fill pszComment field when opening the printer device.

diff --git a/vcl/os2/source/gdi/salprn.cxx b/vcl/os2/source/gdi/salprn.cxx
index b98694e..a71bf0a 100644
--- a/vcl/os2/source/gdi/salprn.cxx
+++ b/vcl/os2/source/gdi/salprn.cxx
@@ -1671,25 +1671,9 @@ sal_Bool Os2SalPrinter::StartJob( const XubString* pFileName,
         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 XubString* pFileName,
 #endif
 
     // JobName ermitteln und Job starten
+    ByteString jobName( rJobName, gsl_getSystemTextEncoding());
     PSZ pszJobName = NULL;
     int nJobNameLen = 0;
     if ( jobName.Len() > 0 )


More information about the Libreoffice-commits mailing list