vcl/unx/generic/printer/ppdparser.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 43a72edb16545300352e49c00811634430e1ea4f
Author:     Michael Weghorn <[email protected]>
AuthorDate: Mon Aug 5 14:18:46 2024 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Aug 5 18:33:51 2024 +0200

    vcl: Drop obsolete CUPS version check
    
    This CUPS >= 1.7 version check was was introduced back in 2017 in
    
        commit 7fbf98d99737ac916cc2dc374f3139e2ea81e47b
        Date:   Thu Jul 27 08:11:34 2017 +0530
    
            Add Common Printing Dialog Functionality
    
    and is obsolete by now.
    According to [1], our AlmaLinux baseline has CUPS 2.2.6
    by now.
    
    Replace by a simple check whether CUPS is enabled for
    the build.
    (`pwg_media_t` used in that conditional code block
    is from a CUPS header and e.g. not available in
    the Android CI builds, see [2].)
    
    [1] https://pkgs.org/search/?q=cups
    [2] https://ci.libreoffice.org/job/gerrit_android_x86_64/40875/console
    
    Change-Id: I4683c86c2c9e44ff41ee8093d8f045bc955cba99
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171485
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/unx/generic/printer/ppdparser.cxx 
b/vcl/unx/generic/printer/ppdparser.cxx
index feb67317c46a..f885bc04aada 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -617,8 +617,7 @@ PPDParser::PPDParser(OUString aFile, const 
std::vector<PPDKey*>& keys)
     if ( pKey ) {
         std::unique_ptr<PPDKey> pImageableAreas(new 
PPDKey(u"ImageableArea"_ustr));
         std::unique_ptr<PPDKey> pPaperDimensions(new 
PPDKey(u"PaperDimension"_ustr));
-#if defined(CUPS_VERSION_MAJOR)
-#if (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 7) || CUPS_VERSION_MAJOR 
> 1
+#ifdef ENABLE_CUPS
         for (int i = 0; i < pKey->countValues(); i++) {
             const PPDValue* pValue = pKey -> getValue(i);
             OUString aValueName = pValue -> m_aOption;
@@ -646,7 +645,6 @@ PPDParser::PPDParser(OUString aFile, const 
std::vector<PPDKey*>& keys)
                 }
             }
         }
-#endif // HAVE_CUPS_API_1_7
 #endif
         insertKey(std::move(pImageableAreas));
         insertKey(std::move(pPaperDimensions));

Reply via email to