Blame SOURCES/0076-fdo-60705-Don-t-discard-valid-printing-options.patch

f0633d
From 23e8d0417c664fcb9b3f281f60629521153d6e55 Mon Sep 17 00:00:00 2001
f0633d
From: Andrzej Hunt <andrzej.hunt@collabora.com>
f0633d
Date: Fri, 6 Dec 2013 20:43:24 +0000
f0633d
Subject: [PATCH 076/109] fdo#60705 Don't discard valid printing options.
f0633d
MIME-Version: 1.0
f0633d
Content-Type: text/plain; charset=UTF-8
f0633d
Content-Transfer-Encoding: 8bit
f0633d
f0633d
PPDValue::m_aValue is simply an optional parameter description, whereas
f0633d
m_aOption is the actual option being passed to cups.
f0633d
f0633d
For example, for the key "PageSize" (which was previously passed
f0633d
without problem), a typical PPDValue could be:
f0633d
m_aOption = "A4"
f0633d
m_aValue = "<</PageSize[595.3 841.9]/ImagingBBox null>>setpagedevice"
f0633d
f0633d
However for the key "InputSlot" (which was previously not passed
f0633d
to the printer), a typical PPDValue could be:
f0633d
m_aOption = "RearPaperFeedSlot"
f0633d
m_aValue = ""
f0633d
f0633d
(cherry picked from commit 4c160e3d54ec1c6c04bc80c6cec7ee58e20af3bb)
f0633d
f0633d
Conflicts:
f0633d
	vcl/unx/generic/printer/cupsmgr.cxx
f0633d
f0633d
Change-Id: I7959317c9f9d67bfafd911e710927a70edfa8792
f0633d
Reviewed-on: https://gerrit.libreoffice.org/6963
f0633d
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
f0633d
Tested-by: Caolán McNamara <caolanm@redhat.com>
f0633d
---
f0633d
 vcl/unx/generic/printer/cupsmgr.cxx | 2 +-
f0633d
 1 file changed, 1 insertion(+), 1 deletion(-)
f0633d
f0633d
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
f0633d
index fe163bb..6b06596 100644
f0633d
--- a/vcl/unx/generic/printer/cupsmgr.cxx
f0633d
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
f0633d
@@ -618,7 +618,7 @@ void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, bool bBanner
f0633d
         {
f0633d
             const PPDKey* pKey = aKeys[i];
f0633d
             const PPDValue* pValue = rJob.m_aContext.getValue( pKey );
f0633d
-            if(pValue && pValue->m_eType == eInvocation && pValue->m_aValue.Len() )
f0633d
+            if(pValue && pValue->m_eType == eInvocation && pValue->m_aOption.Len() )
f0633d
             {
f0633d
                 OString aKey = OUStringToOString( pKey->getKey(), RTL_TEXTENCODING_ASCII_US );
f0633d
                 OString aValue = OUStringToOString( pValue->m_aOption, RTL_TEXTENCODING_ASCII_US );
f0633d
-- 
f0633d
1.8.4.2
f0633d