From 95fc60bd8c90bbc5db9d47228d00f0aa0bcb4fa0 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 27 Nov 2024 00:08:06 +0100 Subject: [PATCH] Restore building with configure --disable-print (#1147) --- src/Fl_Device.cxx | 3 ++- src/Fl_Printer.cxx | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx index c723186f29..99e28a216a 100644 --- a/src/Fl_Device.cxx +++ b/src/Fl_Device.cxx @@ -180,7 +180,6 @@ Fl_PDF_File_Surface::~Fl_PDF_File_Surface() { delete platform_surface_; } -#endif // !defined(FL_NO_PRINT_SUPPORT) /** Localizable text of the "PDF document settings" dialog */ const char * Fl_PDF_File_Surface::format_dialog_title = "PDF document settings"; @@ -190,3 +189,5 @@ const char * Fl_PDF_File_Surface::format_dialog_page_size = "Page Size:"; const char * Fl_PDF_File_Surface::format_dialog_default = "Set as default"; /** Localizable text of the "PDF document settings" dialog */ const char * Fl_PDF_File_Surface::format_dialog_orientation = "Orientation:"; + +#endif // !defined(FL_NO_PRINT_SUPPORT) diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx index dc55092063..ced2d75ab3 100644 --- a/src/Fl_Printer.cxx +++ b/src/Fl_Printer.cxx @@ -20,6 +20,7 @@ #if defined(FL_NO_PRINT_SUPPORT) #include +#include Fl_Printer::Fl_Printer(void) { printer = NULL; @@ -97,6 +98,14 @@ void Fl_EPS_File_Surface::untranslate() {} FILE* Fl_EPS_File_Surface::file() {return NULL;} int Fl_EPS_File_Surface::close() {return 1;} +Fl_PDF_File_Surface::Fl_PDF_File_Surface(void) {} +int Fl_PDF_File_Surface::begin_job(const char* defaultfilename, char **perr) {return 2;} +int Fl_PDF_File_Surface::begin_document(const char* pathname, + enum Fl_Paged_Device::Page_Format format, + enum Fl_Paged_Device::Page_Layout layout, + char **perr) {return 2;} +Fl_PDF_File_Surface::~Fl_PDF_File_Surface(void) {} + #else