diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2015-02-26 15:56:24 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-11 16:21:43 +0100 |
commit | 138d29aa09417eba4d15ade4c9f4dab2620b6326 (patch) | |
tree | 315abb86be92a0f871780912167a611fec7c4d8f /include | |
parent | e0ad036eed6b151ea81311fcf9ba46f1726b103c (diff) |
support fast MM printing in non-single-file mode only for CUPS
As said in the comment, the non-single-file mode could create way too many print
jobs, so enable this only for the CUPS backend, which has been modified
to send them as a single batch.
Conflicts:
configure.ac
include/vcl/printerinfomanager.hxx
sw/source/uibase/dbui/dbmgr.cxx
vcl/inc/cupsmgr.hxx
vcl/unx/generic/printer/cupsmgr.cxx
vcl/unx/generic/printer/printerinfomanager.cxx
Change-Id: I4c02ca0e8b91323b1d02f004c7b4813433064a11
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/jobdata.hxx | 6 | ||||
-rw-r--r-- | include/vcl/printerinfomanager.hxx | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/vcl/jobdata.hxx b/include/vcl/jobdata.hxx index 8cffdd1c234c..c173863721c4 100644 --- a/include/vcl/jobdata.hxx +++ b/include/vcl/jobdata.hxx @@ -79,6 +79,12 @@ struct VCL_DLLPUBLIC JobData static bool constructFromStreamBuffer( void* pData, int bytes, JobData& rJobData ); }; +bool operator==(const psp::JobData& rLeft, const psp::JobData& rRight); +inline bool operator!=(const psp::JobData& rLeft, const psp::JobData& rRight) +{ + return !( rLeft == rRight ); +} + } // namespace diff --git a/include/vcl/printerinfomanager.hxx b/include/vcl/printerinfomanager.hxx index 97e68d15e47c..ec5c587838c9 100644 --- a/include/vcl/printerinfomanager.hxx +++ b/include/vcl/printerinfomanager.hxx @@ -196,6 +196,16 @@ public: // check whether a printer's feature string contains a subfeature bool checkFeatureToken( const OUString& rPrinterName, const char* pToken ) const; + // Starts printing in a batch mode, in which all printing will be done together instead of separate jobs. + // If the implementation supports it, calls to endSpool() will only delay the printing until flushBatchPrint() + // is called to print all delayed jobs. + // Returns false if failed or not supported (in which case endSpool() will print normally). + virtual bool startBatchPrint(); + // Actually spools all delayed print jobs, if enabled, and disables batch mode. + virtual bool flushBatchPrint(); + // Returns true batch printing is supported at all. + virtual bool supportsBatchPrint() const; + virtual ~PrinterInfoManager(); }; |