tdf#156230: Drop freshly unused PSLevel setting

Change-Id: I9331b5532f8066f7d13815487c7af0e7fd37e54f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155068
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
diff --git a/vcl/inc/jobdata.hxx b/vcl/inc/jobdata.hxx
index ceb7a8b..ae9db11 100644
--- a/vcl/inc/jobdata.hxx
+++ b/vcl/inc/jobdata.hxx
@@ -39,7 +39,6 @@ struct VCL_DLLPUBLIC JobData
    int                     m_nBottomMarginAdjust;
    // user overrides for PPD
    int                     m_nColorDepth;
    int                     m_nPSLevel;     // 0: no override, else languagelevel to use
    int                     m_nColorDevice; // 0: no override, -1 grey scale, +1 color
    orientation             m_eOrientation;
    OUString                m_aPrinterName;
@@ -55,7 +54,6 @@ struct VCL_DLLPUBLIC JobData
            m_nTopMarginAdjust( 0 ),
            m_nBottomMarginAdjust( 0 ),
            m_nColorDepth( 24 ),
            m_nPSLevel( 0 ),
            m_nColorDevice( 0 ),
            m_eOrientation( orientation::Portrait ),
            m_bPapersizeFromSetup( false ),
diff --git a/vcl/unx/generic/printer/configuration/psprint.conf b/vcl/unx/generic/printer/configuration/psprint.conf
index 1b56e08..015a310 100644
--- a/vcl/unx/generic/printer/configuration/psprint.conf
+++ b/vcl/unx/generic/printer/configuration/psprint.conf
@@ -46,11 +46,6 @@
;         if key is absent the default is 0
; ColorDepth=0

; PSLevel: the default setting of the PostScript level of the output
;         possible values: 0: driver setting, 1: level 1, 2: level2
;         if key is absent the default is 0
; PSLevel=0

; PPD_PageSize: the default page size to use. If a specific printer does
;         not support this page size its default is used instead.
;         possible values: A0, A1, A2, A3, A4, A5, A6, B4, B5, B6,
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index bb2dded..c53bf06 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -45,7 +45,6 @@ JobData& JobData::operator=(const JobData& rRight)
    m_bPapersizeFromSetup   = rRight.m_bPapersizeFromSetup;
    m_pParser               = rRight.m_pParser;
    m_aContext              = rRight.m_aContext;
    m_nPSLevel              = rRight.m_nPSLevel;
    m_nColorDevice          = rRight.m_nColorDevice;

    if( !m_pParser && !m_aPrinterName.isEmpty() )
@@ -130,8 +129,6 @@ bool JobData::getStreamBuffer( void*& pData, sal_uInt32& bytes )

    aStream.WriteLine(Concat2View("colordepth=" + OString::number(static_cast<sal_Int32>(m_nColorDepth))));

    aStream.WriteLine(Concat2View("pslevel=" + OString::number(static_cast<sal_Int32>(m_nPSLevel))));

    aStream.WriteLine(Concat2View("colordevice=" + OString::number(static_cast<sal_Int32>(m_nColorDevice))));

    // now append the PPDContext stream buffer
@@ -161,7 +158,6 @@ bool JobData::constructFromStreamBuffer( const void* pData, sal_uInt32 bytes, Jo
    bool bMargin        = false;
    bool bColorDepth    = false;
    bool bColorDevice   = false;
    bool bPSLevel       = false;

    const char printerEquals[] = "printer=";
    const char orientatationEquals[] = "orientation=";
@@ -170,7 +166,6 @@ bool JobData::constructFromStreamBuffer( const void* pData, sal_uInt32 bytes, Jo
    const char marginadjustmentEquals[] = "marginadjustment=";
    const char colordepthEquals[] = "colordepth=";
    const char colordeviceEquals[] = "colordevice=";
    const char pslevelEquals[] = "pslevel=";

    while( ! aStream.eof() )
    {
@@ -215,11 +210,6 @@ bool JobData::constructFromStreamBuffer( const void* pData, sal_uInt32 bytes, Jo
            bColorDevice = true;
            rJobData.m_nColorDevice = o3tl::toInt32(aLine.subView(RTL_CONSTASCII_LENGTH(colordeviceEquals)));
        }
        else if (aLine.startsWith(pslevelEquals))
        {
            bPSLevel = true;
            rJobData.m_nPSLevel = o3tl::toInt32(aLine.subView(RTL_CONSTASCII_LENGTH(pslevelEquals)));
        }
        else if (aLine == "PPDContextData" && bPrinter)
        {
            PrinterInfoManager& rManager = PrinterInfoManager::get();
@@ -242,7 +232,7 @@ bool JobData::constructFromStreamBuffer( const void* pData, sal_uInt32 bytes, Jo
        }
    }

    return bVersion && bPrinter && bOrientation && bCopies && bContext && bMargin && bPSLevel && bColorDevice && bColorDepth;
    return bVersion && bPrinter && bOrientation && bCopies && bContext && bMargin && bColorDevice && bColorDepth;
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 3957e36..473645a 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -240,10 +240,6 @@ void PrinterInfoManager::initialize()
            if (!aValue.isEmpty())
                m_aGlobalDefaults.m_nColorDevice = aValue.toInt32();

            aValue = aConfig.ReadKey( "PSLevel" );
            if (!aValue.isEmpty())
                m_aGlobalDefaults.m_nPSLevel = aValue.toInt32();

            // get the PPDContext of global JobData
            for( int nKey = 0; nKey < aConfig.GetKeyCount(); ++nKey )
            {
@@ -420,10 +416,6 @@ void PrinterInfoManager::initialize()
                if (!aValue.isEmpty())
                    aPrinter.m_aInfo.m_nColorDevice = aValue.toInt32();

                aValue = aConfig.ReadKey( "PSLevel" );
                if (!aValue.isEmpty())
                    aPrinter.m_aInfo.m_nPSLevel = aValue.toInt32();

                // now iterate over all keys to extract multi key information:
                // 1. PPDContext information
                for( int nKey = 0; nKey < aConfig.GetKeyCount(); ++nKey )