Make CPDB work with --enable-cpdb --disable-cups
The `PrinterInfoManager` implementation in vcl/unx/generic/printer/printerinfomanager.cxx takes care of actually using the `CUPSManager` or the `CPDManager` for handling printers/printing. Therefore, build that one also when `--disable-cups` is used in addition to `--enable-cpdb`, and only make the CUPS-specific bits depend on `ENABLE_CUPS`, rather than building the dummy version of the `PrinterInfoManager` implemented in vcl/null/printerinfomanager.cxx. This makes the CPDB printers show up in the print dialog with WIP Gerrit change [1] in place in addition. [1] https://gerrit.libreoffice.org/c/core/+/169617/25 Change-Id: I5dddc72b8e679a84225f1dfb9c87d7562613a9f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172401 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -634,6 +634,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
|
||||
$(if $(USE_HEADLESS_CODE), \
|
||||
$(if $(ENABLE_CUPS), \
|
||||
vcl/unx/generic/printer/cupsmgr \
|
||||
) \
|
||||
$(if $(filter TRUE,$(ENABLE_CPDB) $(ENABLE_CUPS)),\
|
||||
vcl/unx/generic/printer/printerinfomanager \
|
||||
, \
|
||||
vcl/null/printerinfomanager \
|
||||
|
||||
@@ -18,12 +18,16 @@
|
||||
*/
|
||||
|
||||
#include <config_cpdb.h>
|
||||
#include <config_cups.h>
|
||||
|
||||
#if ENABLE_CPDB
|
||||
#include <unx/cpdmgr.hxx>
|
||||
#endif
|
||||
|
||||
#if ENABLE_CUPS
|
||||
#include <unx/cupsmgr.hxx>
|
||||
#endif
|
||||
|
||||
#include <unx/gendata.hxx>
|
||||
#include <unx/helper.hxx>
|
||||
|
||||
@@ -89,8 +93,10 @@ PrinterInfoManager& PrinterInfoManager::get()
|
||||
#if ENABLE_CPDB
|
||||
pPIM = CPDManager::tryLoadCPD();
|
||||
#endif
|
||||
#if ENABLE_CUPS
|
||||
if (!pPIM)
|
||||
pPIM = CUPSManager::tryLoadCUPS();
|
||||
#endif
|
||||
if (!pPIM)
|
||||
pPIM = new PrinterInfoManager();
|
||||
pSalData->m_pPrinterInfoManager.reset(pPIM);
|
||||
|
||||
Reference in New Issue
Block a user