LibreOffice Module vcl (master)  1
print.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_VCL_PRINT_HXX
21 #define INCLUDED_VCL_PRINT_HXX
22 
23 #include <rtl/ustring.hxx>
24 #include <i18nutil/paper.hxx>
25 
26 #include <vcl/errcode.hxx>
27 #include <vcl/dllapi.h>
28 #include <vcl/outdev.hxx>
29 #include <vcl/prntypes.hxx>
30 #include <vcl/jobset.hxx>
31 
32 #include <com/sun/star/beans/PropertyValue.hpp>
33 #include <com/sun/star/uno/Sequence.hxx>
34 #include <com/sun/star/view/PrintableState.hpp>
35 
36 #include <memory>
37 #include <unordered_map>
38 
39 class GDIMetaFile;
40 class SalInfoPrinter;
41 struct SalPrinterQueueInfo;
42 class SalPrinter;
43 class VirtualDevice;
44 enum class SalPrinterError;
45 
46 namespace vcl {
47  class PrinterController;
48  class Window;
49 }
50 
51 namespace weld { class Window; }
52 
53 enum class PrinterSupport
54 {
59 };
60 
61 
63 {
64  friend class Printer;
65 
66 private:
67  OUString maPrinterName;
68  OUString maDriver;
69  OUString maLocation;
70  OUString maComment;
72  sal_uInt32 mnJobs;
73 
74 public:
75  QueueInfo();
76 
77  const OUString& GetPrinterName() const { return maPrinterName; }
78  const OUString& GetDriver() const { return maDriver; }
79  const OUString& GetLocation() const { return maLocation; }
80  const OUString& GetComment() const { return maComment; }
81  PrintQueueFlags GetStatus() const { return mnStatus; }
82  sal_uInt32 GetJobs() const { return mnJobs; }
83 };
84 
85 
87 {
88  Auto = 0,
89  NONE = 1
90 };
91 
92 
94 {
95  Stripes = 0,
96  Color = 1
97 };
98 
99 
101 {
102  Optimal = 0,
103  Normal = 1,
104  Resolution = 2
105 };
106 
107 
109 {
110 private:
111 
123 
124 public:
125  PrinterOptions();
126 
127  bool IsReduceTransparency() const { return mbReduceTransparency; }
128  void SetReduceTransparency( bool bSet ) { mbReduceTransparency = bSet; }
129 
130  PrinterTransparencyMode GetReducedTransparencyMode() const { return meReducedTransparencyMode; }
132  { meReducedTransparencyMode = eMode; }
133 
134  bool IsReduceGradients() const { return mbReduceGradients; }
135  void SetReduceGradients( bool bSet ) { mbReduceGradients = bSet; }
136 
137  PrinterGradientMode GetReducedGradientMode() const { return meReducedGradientsMode; }
138  void SetReducedGradientMode( PrinterGradientMode eMode ) { meReducedGradientsMode = eMode; }
139 
140  sal_uInt16 GetReducedGradientStepCount() const { return mnReducedGradientStepCount; }
141  void SetReducedGradientStepCount( sal_uInt16 nStepCount )
142  { mnReducedGradientStepCount = nStepCount; }
143 
144  bool IsReduceBitmaps() const { return mbReduceBitmaps; }
145  void SetReduceBitmaps( bool bSet ) { mbReduceBitmaps = bSet; }
146 
147  PrinterBitmapMode GetReducedBitmapMode() const { return meReducedBitmapMode; }
148  void SetReducedBitmapMode( PrinterBitmapMode eMode ) { meReducedBitmapMode = eMode; }
149 
150  sal_uInt16 GetReducedBitmapResolution() const { return mnReducedBitmapResolution; }
151  void SetReducedBitmapResolution( sal_uInt16 nResolution )
152  { mnReducedBitmapResolution = nResolution; }
153 
154  bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; }
156  { mbReducedBitmapsIncludeTransparency = bSet; }
157 
158  bool IsConvertToGreyscales() const { return mbConvertToGreyscales; }
159  void SetConvertToGreyscales( bool bSet ) { mbConvertToGreyscales = bSet; }
160 
161  bool IsPDFAsStandardPrintJobFormat() const { return mbPDFAsStandardPrintJobFormat; }
162  void SetPDFAsStandardPrintJobFormat( bool bSet ) { mbPDFAsStandardPrintJobFormat = bSet; }
163 
169  void ReadFromConfig( bool bFile );
170 };
171 
172 
174 {
175  friend class ::OutputDevice;
176 
177 private:
179  std::unique_ptr<SalPrinter> mpPrinter;
184  std::unique_ptr<PrinterOptions> mpPrinterOptions;
185  OUString maPrinterName;
186  OUString maDriver;
187  OUString maPrintFile;
192  sal_uInt16 mnPageQueueSize;
193  sal_uInt16 mnCopyCount;
201 
202  VCL_DLLPRIVATE void ImplInitData();
203  VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
204  VCL_DLLPRIVATE void ImplInitDisplay();
206  ImplGetQueueInfo( const OUString& rPrinterName, const OUString* pDriver );
207  VCL_DLLPRIVATE void ImplUpdatePageData();
208  VCL_DLLPRIVATE void ImplUpdateFontList();
209  VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest );
210 
211  VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController> const & );
212 
213  static VCL_DLLPRIVATE ErrCode
214  ImplSalPrinterErrorCodeToVCL( SalPrinterError nError );
215 
216 private:
217  VCL_DLLPRIVATE void EndJob();
218  Printer( const Printer& rPrinter ) = delete;
219  Printer& operator =( const Printer& rPrinter ) = delete;
220 
221 public:
222  VCL_DLLPRIVATE void ImplStartPage();
223  VCL_DLLPRIVATE void ImplEndPage();
224 
225 protected:
226  virtual bool AcquireGraphics() const override;
227  virtual void ReleaseGraphics( bool bRelease = true ) override;
228  virtual void ImplReleaseFonts() override;
229 
230  virtual long GetGradientStepCount( long nMinRect ) override;
231  virtual bool UsePolyPolygonForComplexGradient() override;
232  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient,
233  const tools::PolyPolygon &rPolyPoly ) override;
234 
235  void ScaleBitmap ( Bitmap&, SalTwoRect& ) override { };
236  vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const override;
237 
238 public:
239  void DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect,
240  const Gradient& rGradient );
241  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override;
242 
243 protected:
244  virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
245  const Point& rDestPt, const Size& rDestSize,
246  const Point& rSrcPtPixel, const Size& rSrcSizePixel) override;
247 
248  bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix& aFullTransform,
249  const BitmapEx& rBitmapEx) override;
250 
252  basegfx::B2DRange &aVisibleRange, double &fMaximumArea) override;
253 
254  void DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize,
255  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
256  BitmapEx& rBitmapEx ) override;
257 
258  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly,
259  sal_uInt16 nTransparencePercent ) override;
260 
261  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const override;
262 
263 public:
264  Printer();
265  Printer( const JobSetup& rJobSetup );
266  Printer( const QueueInfo& rQueueInfo );
267  Printer( const OUString& rPrinterName );
268  virtual ~Printer() override;
269  virtual void dispose() override;
270 
271  static const std::vector< OUString >&
272  GetPrinterQueues();
273  static const QueueInfo* GetQueueInfo( const OUString& rPrinterName, bool bStatusUpdate );
274  static OUString GetDefaultPrinterName();
275 
276  const OUString& GetName() const { return maPrinterName; }
277  const OUString& GetDriverName() const { return maDriver; }
278  bool IsDefPrinter() const { return mbDefPrinter; }
279  bool IsDisplayPrinter() const { return mpDisplayDev != nullptr; }
280  bool IsValid() const { return !IsDisplayPrinter(); }
281 
282  sal_uInt32 GetCapabilities( PrinterCapType nType ) const;
283  bool HasSupport( PrinterSupport eFeature ) const;
284 
285  bool SetJobSetup( const JobSetup& rSetup );
286  const JobSetup& GetJobSetup() const { return maJobSetup; }
287 
288  bool Setup(weld::Window* pWindow,
290  bool SetPrinterProps( const Printer* pPrinter );
291 
292  Color GetBackgroundColor() const override { return COL_WHITE; }
293  Color GetReadableFontColor(const Color&, const Color&) const override { return COL_BLACK; }
294 
302  VCL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& rOptions );
303  const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); }
304 
305  bool SetOrientation( Orientation eOrient );
306  Orientation GetOrientation() const;
307  void SetDuplexMode( DuplexMode );
308  DuplexMode GetDuplexMode() const;
309 
310  bool SetPaperBin( sal_uInt16 nPaperBin );
311  sal_uInt16 GetPaperBin() const;
312  void SetPaper( Paper ePaper );
313  bool SetPaperSizeUser( const Size& rSize );
314  bool SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
315  Paper GetPaper() const;
316  static OUString GetPaperName( Paper ePaper );
317 
319  int GetPaperInfoCount() const;
320 
322  const PaperInfo& GetPaperInfo( int nPaper ) const;
323  sal_uInt16 GetPaperBinCount() const;
324  OUString GetPaperBinName( sal_uInt16 nPaperBin ) const;
325 
326  bool GetPrinterSettingsPreferred() const;
327  void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup );
328 
329  const Size& GetPaperSizePixel() const { return maPaperSize; }
330  Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
331  Size GetPaperSize( int nPaper );
332  const Point& GetPageOffsetPixel() const { return maPageOffset; }
333  Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
334 
335  void SetCopyCount( sal_uInt16 nCopy, bool bCollate );
336  sal_uInt16 GetCopyCount() const { return mnCopyCount; }
337  bool IsCollateCopy() const { return mbCollateCopy; }
338 
339  bool IsPrinting() const { return mbPrinting; }
340 
341  bool IsJobActive() const { return mbJobActive; }
342 
347  static void updatePrinters();
348 
353  static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
354  const JobSetup& i_rInitSetup );
355 
356  virtual bool HasMirroredGraphics() const override;
357 
358  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
359  const Point& rSrcPt, const Size& rSrcSize ) override;
360 
361  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
362  const Point& rSrcPt, const Size& rSrcSize,
363  const OutputDevice& rOutDev ) override;
364 
365  virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
366  const Size& rSrcSize, bool bWindowInvalidate = false ) override;
367 
368  // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
369  // by repeated calls to ExecutePrintJob(). Used by mailmerge.
370  static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
371  const JobSetup& i_rInitSetup );
372  static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController);
373  static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
374 
379  static void VCL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
380  const JobSetup& i_rInitSetup );
381 };
382 
383 namespace vcl
384 {
385 class ImplPrinterControllerData;
386 
387 enum class NupOrderType
388 {
389  LRTB, TBLR, TBRL, RLTB
390 };
391 
393 {
394  std::unique_ptr<ImplPrinterControllerData>
396 protected:
398 public:
400  {
401  // all metrics in 100th mm
402  int nRows;
403  int nColumns;
413 
415  : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
416  , nLeftMargin( 0 ), nTopMargin( 0 )
417  , nRightMargin( 0 ), nBottomMargin( 0 )
418  , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
419  , bDrawBorder( false )
420  , nOrder( NupOrderType::LRTB ) {}
421  };
422 
423  struct PageSize
424  {
427 
430 
431  PageSize( const Size& i_rSize = Size( 21000, 29700 ),
432  bool i_bFullPaper = false)
433  : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
434  };
435 
436  virtual ~PrinterController();
437 
438  const VclPtr<Printer>& getPrinter() const;
439  const VclPtr<vcl::Window>& getWindow() const;
440 
448  css::uno::Sequence< css::beans::PropertyValue >
449  getJobProperties(const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
450 
452  css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
453  const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
454 
459  bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
460 
465  sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
466 
468  void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
469  void setValue( const css::beans::PropertyValue& i_rValue );
470 
472  const css::uno::Sequence< css::beans::PropertyValue >&
473  getUIOptions() const;
474 
479  void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
480 
482  bool isUIOptionEnabled( const OUString& rPropName ) const;
483  bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
484 
492  OUString makeEnabled( const OUString& rPropName );
493 
495  virtual int getPageCount() const = 0;
496 
510  virtual css::uno::Sequence< css::beans::PropertyValue >
511  getPageParameters( int i_nPage ) const = 0;
513  virtual void printPage(int i_nPage) const = 0;
514 
516  virtual void jobStarted();
517  virtual void jobFinished( css::view::PrintableState );
518 
519  css::view::PrintableState getJobState() const;
520 
521  void abortJob();
522 
523  bool isShowDialogs() const;
524  bool isDirectPrint() const;
525 
526  // implementation details, not usable outside vcl
527  // don't use outside vcl. Some of these are exported for
528  // the benefit of vcl's plugins.
529  // Still: DO NOT USE OUTSIDE VCL
530  int getFilteredPageCount() const;
531  VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
532  bool i_bMayUseCache = false );
533  PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
534  bool i_bMayUseCache = false );
535  void printFilteredPage( int i_nPage );
536  VCL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
537  void createProgressDialog();
538  bool isProgressCanceled() const;
539  VCL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
540  VCL_DLLPRIVATE const MultiPageSetup&
541  getMultipage() const;
542  void setLastPage( bool i_bLastPage );
543  VCL_DLLPRIVATE void setReversePrint( bool i_bReverse );
544  VCL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
545  VCL_DLLPRIVATE bool getPapersizeFromSetup() const;
546  VCL_DLLPRIVATE Size& getPaperSizeSetup() const;
547  VCL_DLLPRIVATE void setPaperSizeFromUser( Size i_aUserSize );
548  VCL_DLLPRIVATE Size& getPaperSizeFromUser() const;
549  VCL_DLLPRIVATE bool isPaperSizeFromUser() const;
550  void setPrinterModified( bool i_bPapersizeFromSetup );
551  bool getPrinterModified() const;
552  VCL_DLLPRIVATE void pushPropertiesToPrinter();
553  VCL_DLLPRIVATE void resetPaperToLastConfigured();
554  void setJobState( css::view::PrintableState );
555  VCL_DLLPRIVATE void setupPrinter( weld::Window* i_pDlgParent );
556 
557  VCL_DLLPRIVATE int getPageCountProtected() const;
558  VCL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue >
559  getPageParametersProtected( int i_nPage ) const;
560 
561  VCL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile const & i_rIn, GDIMetaFile& o_rOut );
562  VCL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
563 };
564 
566 {
567 protected:
568  std::unordered_map< OUString, css::uno::Any >
570  std::vector< css::beans::PropertyValue >
572 
573 public:
574 
577 
582  bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp );
583 
589  void appendPrintUIOptions( css::uno::Sequence< css::beans::PropertyValue >& io_rProps ) const;
590 
592  css::uno::Any getValue( const OUString& i_rPropertyName ) const;
593 
594  bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const;
595  // convenience for fixed strings
596  bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const
597  { return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); }
598 
599  sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault ) const;
600  // convenience for fixed strings
601  sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault ) const
602  { return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
603 
604  OUString getStringValue( const OUString& i_rPropertyName ) const;
605  // convenience for fixed strings
606  OUString getStringValue( const char* i_pPropName ) const
607  { return getStringValue( OUString::createFromAscii( i_pPropName ) ); }
608 
609  // helper functions for user to create a single control
611  {
612  OUString const maDependsOnName;
613  sal_Int32 const mnDependsOnEntry;
615  OUString maGroupHint;
617  bool mbEnabled;
618  std::vector< css::beans::PropertyValue >
620 
621  UIControlOptions( const OUString& i_rDependsOnName = OUString(),
622  sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false)
623  : maDependsOnName( i_rDependsOnName )
624  , mnDependsOnEntry( i_nDependsOnEntry )
625  , mbAttachToDependency( i_bAttachToDependency )
626  , mbInternalOnly( false )
627  , mbEnabled( true ) {}
628  };
629 
630  // note: in the following helper functions HelpIds are expected as an OUString
631  // the normal HelpId form is OString (byte string instead of UTF16 string)
632  // this is because the whole interface is base on UNO properties; in fact the structures
633  // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
634  // transported via UTF16 strings.
635 
637  static css::uno::Any setUIControlOpt( const css::uno::Sequence< OUString >& i_rIDs, const OUString& i_rTitle,
638  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rType,
639  const css::beans::PropertyValue* i_pValue = nullptr,
640  const UIControlOptions& i_rControlOptions = UIControlOptions());
641 
643  static css::uno::Any setGroupControlOpt( const OUString& i_rID, const OUString& i_rTitle,
644  const OUString& i_rHelpId);
645 
647  static css::uno::Any setSubgroupControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
648  const UIControlOptions& i_rControlOptions = UIControlOptions());
649 
651  static css::uno::Any setBoolControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
652  const OUString& i_rProperty, bool i_bValue,
653  const UIControlOptions& i_rControlOptions = UIControlOptions());
654 
656  static css::uno::Any setChoiceListControlOpt( const OUString& i_rID, const OUString& i_rTitle,
657  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rProperty,
658  const css::uno::Sequence< OUString >& i_rChoices, sal_Int32 i_nValue,
659  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
660  const UIControlOptions& i_rControlOptions = UIControlOptions());
661 
663  static css::uno::Any setChoiceRadiosControlOpt( const css::uno::Sequence< OUString >& i_rIDs,
664  const OUString& i_rTitle, const css::uno::Sequence< OUString >& i_rHelpId,
665  const OUString& i_rProperty, const css::uno::Sequence< OUString >& i_rChoices,
666  sal_Int32 i_nValue,
667  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
668  const UIControlOptions& i_rControlOptions = UIControlOptions());
669 
674  static css::uno::Any setRangeControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
675  const OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue,
676  sal_Int32 i_nMaxValue, const UIControlOptions& i_rControlOptions);
677 
682  static css::uno::Any setEditControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
683  const OUString& i_rProperty, const OUString& i_rValue,
684  const UIControlOptions& i_rControlOptions);
685 }; // class PrinterOptionsHelper
686 
687 } // namespace vcl
688 
689 
690 #endif // INCLUDED_VCL_PRINT_HXX
691 
692 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
bool getBoolValue(const char *i_pPropName, bool i_bDefault=false) const
Definition: print.hxx:596
bool mbJobActive
Definition: print.hxx:196
const PrinterOptions & GetPrinterOptions() const
Definition: print.hxx:303
void SetReduceTransparency(bool bSet)
Definition: print.hxx:128
const OUString & GetName() const
Definition: print.hxx:276
Orientation
Definition: Exif.hxx:25
Size aSize
In 100th mm.
Definition: print.hxx:426
SalGraphics * mpJobGraphics
Definition: print.hxx:180
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
virtual bool UsePolyPolygonForComplexGradient()=0
bool IsDisplayPrinter() const
Definition: print.hxx:279
bool mbPDFAsStandardPrintJobFormat
Definition: print.hxx:122
JobSetup maJobSetup
Definition: print.hxx:188
const OUString & GetLocation() const
Definition: print.hxx:79
DrawModeFlags
Definition: outdev.hxx:200
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
Definition: print.hxx:569
Size maPaperSize
Definition: print.hxx:190
PrinterCapType
Definition: prntypes.hxx:71
const OUString & GetDriver() const
Definition: print.hxx:78
PageSize(const Size &i_rSize=Size(21000, 29700), bool i_bFullPaper=false)
Definition: print.hxx:431
friend class Printer
Definition: outdev.hxx:306
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
void SetPDFAsStandardPrintJobFormat(bool bSet)
Definition: print.hxx:162
bool IsPDFAsStandardPrintJobFormat() const
Definition: print.hxx:161
bool mbReduceTransparency
Definition: print.hxx:112
std::vector< css::beans::PropertyValue > m_aUIProperties
Definition: print.hxx:571
void SetReduceGradients(bool bSet)
Definition: print.hxx:135
OUString maPrinterName
Definition: print.hxx:67
css::beans::Optional< css::uno::Any > getValue(OUString const &id)
const OUString & GetComment() const
Definition: print.hxx:80
const JobSetup & GetJobSetup() const
Definition: print.hxx:286
PrinterTransparencyMode GetReducedTransparencyMode() const
Definition: print.hxx:130
PrinterGradientMode meReducedGradientsMode
Definition: print.hxx:115
void SetReducedGradientStepCount(sal_uInt16 nStepCount)
Definition: print.hxx:141
sal_Int64 getIntValue(const char *i_pPropName, sal_Int64 i_nDefault) const
Definition: print.hxx:601
std::unique_ptr< SalPrinter > mpPrinter
Definition: print.hxx:179
bool IsReduceBitmaps() const
Definition: print.hxx:144
PrinterSetupMode
Definition: prntypes.hxx:85
virtual void DrawDeviceMask(const Bitmap &rMask, const Color &rMaskColor, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
Definition: mask.cxx:102
OUString getStringValue(const char *i_pPropName) const
Definition: print.hxx:606
bool IsReducedBitmapIncludesTransparency() const
Definition: print.hxx:154
Point GetPageOffset() const
Definition: print.hxx:333
bool IsDefPrinter() const
Definition: print.hxx:278
PrinterGradientMode GetReducedGradientMode() const
Definition: print.hxx:137
sal_uInt32 mnJobs
Definition: print.hxx:72
bool mbCollateCopy
Definition: print.hxx:197
Paper
VclPtr< Printer > mpNext
Definition: print.hxx:182
std::vector< css::beans::PropertyValue > maAddProps
Definition: print.hxx:619
DuplexMode
Definition: prntypes.hxx:28
sal_uInt16 mnPageQueueSize
Definition: print.hxx:192
OUString maComment
Definition: print.hxx:70
OUString maLocation
Definition: print.hxx:69
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
const Size & GetPaperSizePixel() const
Definition: print.hxx:329
sal_uInt16 mnReducedGradientStepCount
Definition: print.hxx:116
std::unique_ptr< ImplPrinterControllerData > mpImplData
Definition: print.hxx:395
bool IsJobActive() const
Definition: print.hxx:341
virtual long GetGradientStepCount(long nMinRect)
Point maPageOffset
Definition: print.hxx:189
VclPtr< VirtualDevice > mpDisplayDev
Definition: print.hxx:183
void SetReducedBitmapResolution(sal_uInt16 nResolution)
Definition: print.hxx:151
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
Definition: outdev.cxx:473
virtual void EmulateDrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
void SetReducedBitmapMode(PrinterBitmapMode eMode)
Definition: print.hxx:148
void SetReducedBitmapIncludesTransparency(bool bSet)
Definition: print.hxx:155
sal_uInt16 GetReducedBitmapResolution() const
Definition: print.hxx:150
virtual void dispose() override
Definition: outdev.cxx:141
bool mbConvertToGreyscales
Definition: print.hxx:121
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
const OUString & GetDriverName() const
Definition: print.hxx:277
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
virtual bool HasMirroredGraphics() const
Definition: outdev.cxx:652
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
bool IsValid() const
Definition: print.hxx:280
bool mbPrinting
Definition: print.hxx:195
UIControlOptions(const OUString &i_rDependsOnName=OUString(), sal_Int32 i_nDependsOnEntry=-1, bool i_bAttachToDependency=false)
Definition: print.hxx:621
bool mbNewJobSetup
Definition: print.hxx:200
void SetReduceBitmaps(bool bSet)
Definition: print.hxx:145
OUString maDriver
Definition: print.hxx:186
void SetReducedTransparencyMode(PrinterTransparencyMode eMode)
Definition: print.hxx:131
sal_uInt16 GetCopyCount() const
Definition: print.hxx:336
Color GetReadableFontColor(const Color &, const Color &) const override
Definition: print.hxx:293
bool mbDefPrinter
Definition: print.hxx:194
PrinterBitmapMode GetReducedBitmapMode() const
Definition: print.hxx:147
PrinterOptionsHelper()
Create without ui properties.
Definition: print.hxx:576
PrintQueueFlags GetStatus() const
Definition: print.hxx:81
void SetConvertToGreyscales(bool bSet)
Definition: print.hxx:159
void ScaleBitmap(Bitmap &, SalTwoRect &) override
Definition: print.hxx:235
Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1185
sal_Int32 getPageCount(const uno::Reference< frame::XModel > &xModel)
bool IsPrinting() const
Definition: print.hxx:339
sal_uInt32 GetJobs() const
Definition: print.hxx:82
PrinterTransparencyMode meReducedTransparencyMode
Definition: print.hxx:113
const Point & GetPageOffsetPixel() const
Definition: print.hxx:332
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
sal_uInt16 mnReducedBitmapResolution
Definition: print.hxx:119
VclPtr< Printer > mpPrev
Definition: print.hxx:181
bool mbPrintFile
Definition: print.hxx:198
PrintQueueFlags
Definition: prntypes.hxx:34
ErrCode mnError
Definition: print.hxx:191
OUString maPrinterName
Definition: print.hxx:185
bool IsReduceGradients() const
Definition: print.hxx:134
sal_uInt16 mnCopyCount
Definition: print.hxx:193
virtual void DrawDeviceBitmap(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
PrinterBitmapMode meReducedBitmapMode
Definition: print.hxx:118
OUString maDriver
Definition: print.hxx:68
constexpr::Color COL_WHITE(0xFF, 0xFF, 0xFF)
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
Definition: outdev.cxx:348
virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const
Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the value...
SalInfoPrinter * mpInfoPrinter
Definition: print.hxx:178
#define VCL_DLLPRIVATE
Definition: dllapi.h:31
virtual bool TransformAndReduceBitmapExToTargetRange(const basegfx::B2DHomMatrix &aFullTransform, basegfx::B2DRange &aVisibleRange, double &fMaximumArea)
Transform and reduce the area that needs to be drawn of the bitmap and return the new visible range a...
OutputDevice & operator=(const OutputDevice &)=delete
const OUString & GetPrinterName() const
Definition: print.hxx:77
virtual bool DrawTransformBitmapExDirect(const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx)
Transform and draw a bitmap directly.
bool mbReduceGradients
Definition: print.hxx:114
bool mbInPrintPage
Definition: print.hxx:199
bool mbReducedBitmapsIncludeTransparency
Definition: print.hxx:120
NupOrderType
Definition: print.hxx:387
bool bFullPaper
Full paper, not only imageable area is printed.
Definition: print.hxx:429
bool IsCollateCopy() const
Definition: print.hxx:337
void SetReducedGradientMode(PrinterGradientMode eMode)
Definition: print.hxx:138
bool IsReduceTransparency() const
Definition: print.hxx:127
virtual void ImplReleaseFonts()
bool mbReduceBitmaps
Definition: print.hxx:117
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
PrintQueueFlags mnStatus
Definition: print.hxx:71
sal_uInt16 GetReducedGradientStepCount() const
Definition: print.hxx:140
OUString maPrintFile
Definition: print.hxx:187
std::unique_ptr< PrinterOptions > mpPrinterOptions
Definition: print.hxx:184
Color GetBackgroundColor() const override
Definition: print.hxx:292
SalPrinterError
Definition: salptype.hxx:41
bool IsConvertToGreyscales() const
Definition: print.hxx:158
Size GetPaperSize() const
Definition: print.hxx:330