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