From ef5943a2099531ca72dce5fb22183777c9196a53 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 15 Sep 2021 20:51:02 +0200 Subject: [PATCH] libppd: In IPP-attr-to-PPD-option auto mapper consider "ColorMode" also with prefix This way we also cover "cupsColorMode" for example which appears in auto-generated PPDs for driverless IPP printers (in case we cannot print directly to the printer but only have access via a CUPS queue). --- ppd/ppd-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppd/ppd-cache.c b/ppd/ppd-cache.c index 41df2a322..b8a1c265a 100644 --- a/ppd/ppd-cache.c +++ b/ppd/ppd-cache.c @@ -2233,7 +2233,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, } /* - * Color/Gray - print-color-mode + * Color/Monochrome - print-color-mode */ /* If we have a color device, check whether this option sets mono or @@ -2257,7 +2257,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, properties->sets_color = 1; } else if (strcasecmp(o, "ColorModel") == 0 || - strcasecmp(o, "ColorMode") == 0 || + strcasestr(o, "ColorMode") || strcasecmp(o, "OutputMode") == 0 || strcasecmp(o, "PrintoutMode") == 0 || strcasecmp(o, "ARCMode") == 0 || /* Sharp */ @@ -2394,7 +2394,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, } /* Generic enumerated choice option and choice names */ else if (strcasecmp(o, "ColorModel") == 0 || - strcasecmp(o, "ColorMode") == 0 || + strcasestr(o, "ColorMode") || strcasecmp(o, "OutputMode") == 0 || /* HPLIP hpcups */ strcasecmp(o, "PrintoutMode") == 0 || /* Foomatic */ strcasecmp(o, "PrintQuality") == 0 || -- 2.47.3