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 <config_options.h>
24 #include <rtl/ustring.hxx>
25 #include <i18nutil/paper.hxx>
26 
27 #include <vcl/errcode.hxx>
28 #include <vcl/dllapi.h>
29 #include <vcl/outdev.hxx>
30 #include <vcl/prntypes.hxx>
31 #include <vcl/PrinterSupport.hxx>
32 #include <vcl/jobset.hxx>
33 
34 #include <com/sun/star/beans/PropertyValue.hpp>
35 #include <com/sun/star/uno/Sequence.hxx>
36 #include <com/sun/star/view/PrintableState.hpp>
37 
38 #include <memory>
39 #include <unordered_map>
40 
41 class GDIMetaFile;
42 class SalInfoPrinter;
43 struct SalPrinterQueueInfo;
44 class QueueInfo;
45 class SalPrinter;
46 class VirtualDevice;
47 enum class SalPrinterError;
48 
49 namespace vcl {
50  class PrinterController;
51  class Window;
52 }
53 
54 namespace weld { class Window; }
55 
57 {
58  Auto = 0,
59  NONE = 1
60 };
61 
62 
64 {
65  Stripes = 0,
66  Color = 1
67 };
68 
69 
71 {
72  Optimal = 0,
73  Normal = 1,
74  Resolution = 2
75 };
76 
77 
78 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) PrinterOptions
79 {
80 private:
81 
82  bool mbReduceTransparency;
83  PrinterTransparencyMode meReducedTransparencyMode;
84  bool mbReduceGradients;
85  PrinterGradientMode meReducedGradientsMode;
86  sal_uInt16 mnReducedGradientStepCount;
87  bool mbReduceBitmaps;
88  PrinterBitmapMode meReducedBitmapMode;
89  sal_uInt16 mnReducedBitmapResolution;
90  bool mbReducedBitmapsIncludeTransparency;
91  bool mbConvertToGreyscales;
92  bool mbPDFAsStandardPrintJobFormat;
93 
94 public:
95  PrinterOptions();
96 
97  bool IsReduceTransparency() const { return mbReduceTransparency; }
98  void SetReduceTransparency( bool bSet ) { mbReduceTransparency = bSet; }
99 
100  PrinterTransparencyMode GetReducedTransparencyMode() const { return meReducedTransparencyMode; }
101  void SetReducedTransparencyMode( PrinterTransparencyMode eMode )
102  { meReducedTransparencyMode = eMode; }
103 
104  bool IsReduceGradients() const { return mbReduceGradients; }
105  void SetReduceGradients( bool bSet ) { mbReduceGradients = bSet; }
106 
107  PrinterGradientMode GetReducedGradientMode() const { return meReducedGradientsMode; }
108  void SetReducedGradientMode( PrinterGradientMode eMode ) { meReducedGradientsMode = eMode; }
109 
110  sal_uInt16 GetReducedGradientStepCount() const { return mnReducedGradientStepCount; }
111  void SetReducedGradientStepCount( sal_uInt16 nStepCount )
112  { mnReducedGradientStepCount = nStepCount; }
113 
114  bool IsReduceBitmaps() const { return mbReduceBitmaps; }
115  void SetReduceBitmaps( bool bSet ) { mbReduceBitmaps = bSet; }
116 
117  PrinterBitmapMode GetReducedBitmapMode() const { return meReducedBitmapMode; }
118  void SetReducedBitmapMode( PrinterBitmapMode eMode ) { meReducedBitmapMode = eMode; }
119 
120  sal_uInt16 GetReducedBitmapResolution() const { return mnReducedBitmapResolution; }
121  void SetReducedBitmapResolution( sal_uInt16 nResolution )
122  { mnReducedBitmapResolution = nResolution; }
123 
124  bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; }
125  void SetReducedBitmapIncludesTransparency( bool bSet )
126  { mbReducedBitmapsIncludeTransparency = bSet; }
127 
128  bool IsConvertToGreyscales() const { return mbConvertToGreyscales; }
129  void SetConvertToGreyscales( bool bSet ) { mbConvertToGreyscales = bSet; }
130 
131  bool IsPDFAsStandardPrintJobFormat() const { return mbPDFAsStandardPrintJobFormat; }
132  void SetPDFAsStandardPrintJobFormat( bool bSet ) { mbPDFAsStandardPrintJobFormat = bSet; }
133 
139  void ReadFromConfig( bool bFile );
140 };
141 
142 
144 {
145  friend class ::OutputDevice;
146 
147 private:
149  std::unique_ptr<SalPrinter> mpPrinter;
154  std::unique_ptr<PrinterOptions> mpPrinterOptions;
155  OUString maPrinterName;
156  OUString maDriver;
157  OUString maPrintFile;
162  sal_uInt16 mnPageQueueSize;
163  sal_uInt16 mnCopyCount;
171 
172  VCL_DLLPRIVATE void ImplInitData();
173  VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
174  VCL_DLLPRIVATE void ImplInitDisplay();
176  ImplGetQueueInfo( const OUString& rPrinterName, const OUString* pDriver );
177  VCL_DLLPRIVATE void ImplUpdatePageData();
178  VCL_DLLPRIVATE void ImplUpdateFontList();
179  VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest );
180 
181  VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController> const & );
182 
183  static VCL_DLLPRIVATE ErrCode
184  ImplSalPrinterErrorCodeToVCL( SalPrinterError nError );
185 
186 private:
187  VCL_DLLPRIVATE void EndJob();
188  Printer( const Printer& rPrinter ) = delete;
189  Printer& operator =( const Printer& rPrinter ) = delete;
190 
191 public:
192  VCL_DLLPRIVATE void ImplStartPage();
193  VCL_DLLPRIVATE void ImplEndPage();
194 
195 protected:
196  virtual bool AcquireGraphics() const override;
197  virtual void ReleaseGraphics( bool bRelease = true ) override;
198  virtual void ImplReleaseFonts() override;
199 
200  virtual long GetGradientStepCount( long nMinRect ) override;
201  virtual bool UsePolyPolygonForComplexGradient() override;
202  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient,
203  const tools::PolyPolygon &rPolyPoly ) override;
204 
205  void ScaleBitmap ( Bitmap&, SalTwoRect& ) override { };
206  vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const override;
207 
208 public:
209  void DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect,
210  const Gradient& rGradient );
211  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override;
212  virtual Size GetButtonBorderSize() override;
213  virtual Color GetMonochromeButtonColor() override { return COL_LIGHTGRAY; }
214 
215  bool IsScreenComp() const override { return false; }
216 
217  void DrawBorder(tools::Rectangle aBorderRect) override
218  {
220  DrawRect(aBorderRect);
221  }
222 
223 protected:
224  virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
225  const Point& rDestPt, const Size& rDestSize,
226  const Point& rSrcPtPixel, const Size& rSrcSizePixel) override;
227 
228  bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix& aFullTransform,
229  const BitmapEx& rBitmapEx) override;
230 
231  bool TransformAndReduceBitmapExToTargetRange( const basegfx::B2DHomMatrix& aFullTransform,
232  basegfx::B2DRange &aVisibleRange, double &fMaximumArea) override;
233 
234  void DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize,
235  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
236  BitmapEx& rBitmapEx ) override;
237 
238  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly,
239  sal_uInt16 nTransparencePercent ) override;
240 
241  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const override;
242 
243 public:
244  Printer();
245  Printer( const JobSetup& rJobSetup );
246  Printer( const QueueInfo& rQueueInfo );
247  Printer( const OUString& rPrinterName );
248  virtual ~Printer() override;
249  virtual void dispose() override;
250 
251  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool) override { SetMapMode(rNewMapMode); }
252 
253  static const std::vector< OUString >&
254  GetPrinterQueues();
255  static const QueueInfo* GetQueueInfo( const OUString& rPrinterName, bool bStatusUpdate );
256  static OUString GetDefaultPrinterName();
257 
258  const OUString& GetName() const { return maPrinterName; }
259  const OUString& GetDriverName() const { return maDriver; }
260  bool IsDefPrinter() const { return mbDefPrinter; }
261  bool IsDisplayPrinter() const { return mpDisplayDev != nullptr; }
262  bool IsValid() const { return !IsDisplayPrinter(); }
263 
264  sal_uInt32 GetCapabilities( PrinterCapType nType ) const;
265  bool HasSupport( PrinterSupport eFeature ) const;
266 
267  bool SetJobSetup( const JobSetup& rSetup );
268  const JobSetup& GetJobSetup() const { return maJobSetup; }
269 
270  bool Setup(weld::Window* pWindow,
272  bool SetPrinterProps( const Printer* pPrinter );
273 
274  Color GetBackgroundColor() const override { return COL_WHITE; }
275  Color GetReadableFontColor(const Color&, const Color&) const override { return COL_BLACK; }
276 
284  VCL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& rOptions );
285  const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); }
286 
287  bool SetOrientation( Orientation eOrient );
288  Orientation GetOrientation() const;
289  void SetDuplexMode( DuplexMode );
290  DuplexMode GetDuplexMode() const;
291 
292  bool SetPaperBin( sal_uInt16 nPaperBin );
293  sal_uInt16 GetPaperBin() const;
294  void SetPaper( Paper ePaper );
295  bool SetPaperSizeUser( const Size& rSize );
296  bool SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
297  Paper GetPaper() const;
298  static OUString GetPaperName( Paper ePaper );
299 
301  int GetPaperInfoCount() const;
302 
304  const PaperInfo& GetPaperInfo( int nPaper ) const;
305  sal_uInt16 GetPaperBinCount() const;
306  OUString GetPaperBinName( sal_uInt16 nPaperBin ) const;
307 
308  bool GetPrinterSettingsPreferred() const;
309  void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup );
310 
311  const Size& GetPaperSizePixel() const { return maPaperSize; }
312  Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
313  Size GetPaperSize( int nPaper );
314  const Point& GetPageOffsetPixel() const { return maPageOffset; }
315  Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
316 
317  void SetCopyCount( sal_uInt16 nCopy, bool bCollate );
318  sal_uInt16 GetCopyCount() const { return mnCopyCount; }
319  bool IsCollateCopy() const { return mbCollateCopy; }
320 
321  bool IsPrinting() const { return mbPrinting; }
322 
323  bool IsJobActive() const { return mbJobActive; }
324 
329  static void updatePrinters();
330 
335  static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
336  const JobSetup& i_rInitSetup );
337 
338  virtual bool HasMirroredGraphics() const override;
339 
340  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
341  const Point& rSrcPt, const Size& rSrcSize ) override;
342 
343  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
344  const Point& rSrcPt, const Size& rSrcSize,
345  const OutputDevice& rOutDev ) override;
346 
347  virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
348  const Size& rSrcSize, bool bWindowInvalidate = false ) override;
349 
350  virtual tools::Rectangle GetBackgroundComponentBounds() const override;
351 
352  // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
353  // by repeated calls to ExecutePrintJob(). Used by mailmerge.
354  static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
355  const JobSetup& i_rInitSetup );
356  static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController);
357  static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
358 
363  static void VCL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
364  const JobSetup& i_rInitSetup );
365 };
366 
367 namespace vcl
368 {
369 class ImplPrinterControllerData;
370 
371 enum class NupOrderType
372 {
373  LRTB, TBLR, TBRL, RLTB
374 };
375 
377 {
378  std::unique_ptr<ImplPrinterControllerData>
380 protected:
382 public:
384  {
385  // all metrics in 100th mm
386  int nRows;
387  int nColumns;
397 
399  : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
400  , nLeftMargin( 0 ), nTopMargin( 0 )
401  , nRightMargin( 0 ), nBottomMargin( 0 )
402  , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
403  , bDrawBorder( false )
404  , nOrder( NupOrderType::LRTB ) {}
405  };
406 
407  struct PageSize
408  {
411 
414 
415  PageSize( const Size& i_rSize = Size( 21000, 29700 ),
416  bool i_bFullPaper = false)
417  : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
418  };
419 
420  virtual ~PrinterController();
421 
422  const VclPtr<Printer>& getPrinter() const;
423  weld::Window* getWindow() const;
424 
432  css::uno::Sequence< css::beans::PropertyValue >
433  getJobProperties(const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
434 
436  css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
437  const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
438 
443  bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
444 
449  sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
450 
452  void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
453  void setValue( const css::beans::PropertyValue& i_rValue );
454 
456  const css::uno::Sequence< css::beans::PropertyValue >&
457  getUIOptions() const;
458 
463  void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
464 
466  bool isUIOptionEnabled( const OUString& rPropName ) const;
467  bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
468 
476  OUString makeEnabled( const OUString& rPropName );
477 
479  virtual int getPageCount() const = 0;
480 
494  virtual css::uno::Sequence< css::beans::PropertyValue >
495  getPageParameters( int i_nPage ) const = 0;
497  virtual void printPage(int i_nPage) const = 0;
498 
500  virtual void jobStarted();
501  virtual void jobFinished( css::view::PrintableState );
502 
503  css::view::PrintableState getJobState() const;
504 
505  void abortJob();
506 
507  bool isShowDialogs() const;
508  bool isDirectPrint() const;
509 
510  // implementation details, not usable outside vcl
511  // don't use outside vcl. Some of these are exported for
512  // the benefit of vcl's plugins.
513  // Still: DO NOT USE OUTSIDE VCL
514  int getFilteredPageCount() const;
515  VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
516  bool i_bMayUseCache = false );
517  PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
518  bool i_bMayUseCache = false );
519  void printFilteredPage( int i_nPage );
520  VCL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
521  void createProgressDialog();
522  bool isProgressCanceled() const;
523  VCL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
524  VCL_DLLPRIVATE const MultiPageSetup&
525  getMultipage() const;
526  void setLastPage( bool i_bLastPage );
527  VCL_DLLPRIVATE void setReversePrint( bool i_bReverse );
528  VCL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
529  VCL_DLLPRIVATE bool getPapersizeFromSetup() const;
530  VCL_DLLPRIVATE Size& getPaperSizeSetup() const;
531  VCL_DLLPRIVATE void setPaperSizeFromUser( Size i_aUserSize );
532  VCL_DLLPRIVATE Size& getPaperSizeFromUser() const;
533  VCL_DLLPRIVATE bool isPaperSizeFromUser() const;
534  void setPrinterModified( bool i_bPapersizeFromSetup );
535  bool getPrinterModified() const;
536  VCL_DLLPRIVATE void pushPropertiesToPrinter();
537  VCL_DLLPRIVATE void resetPaperToLastConfigured();
538  void setJobState( css::view::PrintableState );
539  VCL_DLLPRIVATE void setupPrinter( weld::Window* i_pDlgParent );
540 
541  VCL_DLLPRIVATE int getPageCountProtected() const;
542  VCL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue >
543  getPageParametersProtected( int i_nPage ) const;
544 
545  VCL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile const & i_rIn, GDIMetaFile& o_rOut );
546  VCL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
547 };
548 
550 {
551 protected:
552  std::unordered_map< OUString, css::uno::Any >
554  std::vector< css::beans::PropertyValue >
556 
557 public:
558 
561 
566  bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp );
567 
573  void appendPrintUIOptions( css::uno::Sequence< css::beans::PropertyValue >& io_rProps ) const;
574 
576  css::uno::Any getValue( const OUString& i_rPropertyName ) const;
577 
578  bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const;
579  // convenience for fixed strings
580  bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const
581  { return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); }
582 
583  sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault ) const;
584  // convenience for fixed strings
585  sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault ) const
586  { return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
587 
588  OUString getStringValue( const OUString& i_rPropertyName ) const;
589  // convenience for fixed strings
590  OUString getStringValue( const char* i_pPropName ) const
591  { return getStringValue( OUString::createFromAscii( i_pPropName ) ); }
592 
593  // helper functions for user to create a single control
595  {
596  OUString maDependsOnName;
597  sal_Int32 mnDependsOnEntry;
599  OUString maGroupHint;
601  bool mbEnabled;
602  std::vector< css::beans::PropertyValue >
604 
605  UIControlOptions( const OUString& i_rDependsOnName = OUString(),
606  sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false)
607  : maDependsOnName( i_rDependsOnName )
608  , mnDependsOnEntry( i_nDependsOnEntry )
609  , mbAttachToDependency( i_bAttachToDependency )
610  , mbInternalOnly( false )
611  , mbEnabled( true ) {}
612  };
613 
614  // note: in the following helper functions HelpIds are expected as an OUString
615  // the normal HelpId form is OString (byte string instead of UTF16 string)
616  // this is because the whole interface is base on UNO properties; in fact the structures
617  // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
618  // transported via UTF16 strings.
619 
621  static css::uno::Any setUIControlOpt( const css::uno::Sequence< OUString >& i_rIDs, const OUString& i_rTitle,
622  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rType,
623  const css::beans::PropertyValue* i_pValue = nullptr,
624  const UIControlOptions& i_rControlOptions = UIControlOptions());
625 
627  static css::uno::Any setGroupControlOpt( const OUString& i_rID, const OUString& i_rTitle,
628  const OUString& i_rHelpId);
629 
631  static css::uno::Any setSubgroupControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
632  const UIControlOptions& i_rControlOptions = UIControlOptions());
633 
635  static css::uno::Any setBoolControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
636  const OUString& i_rProperty, bool i_bValue,
637  const UIControlOptions& i_rControlOptions = UIControlOptions());
638 
640  static css::uno::Any setChoiceListControlOpt( const OUString& i_rID, const OUString& i_rTitle,
641  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rProperty,
642  const css::uno::Sequence< OUString >& i_rChoices, sal_Int32 i_nValue,
643  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
644  const UIControlOptions& i_rControlOptions = UIControlOptions());
645 
647  static css::uno::Any setChoiceRadiosControlOpt( const css::uno::Sequence< OUString >& i_rIDs,
648  const OUString& i_rTitle, const css::uno::Sequence< OUString >& i_rHelpId,
649  const OUString& i_rProperty, const css::uno::Sequence< OUString >& i_rChoices,
650  sal_Int32 i_nValue,
651  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
652  const UIControlOptions& i_rControlOptions = UIControlOptions());
653 
658  static css::uno::Any setRangeControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
659  const OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue,
660  sal_Int32 i_nMaxValue, const UIControlOptions& i_rControlOptions);
661 
666  static css::uno::Any setEditControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
667  const OUString& i_rProperty, const OUString& i_rValue,
668  const UIControlOptions& i_rControlOptions);
669 }; // class PrinterOptionsHelper
670 
671 } // namespace vcl
672 
673 
674 #endif // INCLUDED_VCL_PRINT_HXX
675 
676 /* 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:580
bool mbJobActive
Definition: print.hxx:166
const PrinterOptions & GetPrinterOptions() const
Definition: print.hxx:285
const OUString & GetName() const
Definition: print.hxx:258
Size aSize
In 100th mm.
Definition: print.hxx:410
SalGraphics * mpJobGraphics
Definition: print.hxx:150
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
bool IsDisplayPrinter() const
Definition: print.hxx:261
JobSetup maJobSetup
Definition: print.hxx:158
virtual Color GetMonochromeButtonColor() override
Definition: print.hxx:213
DrawModeFlags
Definition: outdev.hxx:198
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
Definition: print.hxx:553
Size maPaperSize
Definition: print.hxx:160
PrinterCapType
Definition: prntypes.hxx:71
PageSize(const Size &i_rSize=Size(21000, 29700), bool i_bFullPaper=false)
Definition: print.hxx:415
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool) override
Definition: print.hxx:251
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
std::vector< css::beans::PropertyValue > m_aUIProperties
Definition: print.hxx:555
css::beans::Optional< css::uno::Any > getValue(OUString const &id)
const JobSetup & GetJobSetup() const
Definition: print.hxx:268
sal_Int64 getIntValue(const char *i_pPropName, sal_Int64 i_nDefault) const
Definition: print.hxx:585
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
std::unique_ptr< SalPrinter > mpPrinter
Definition: print.hxx:149
PrinterSetupMode
Definition: prntypes.hxx:85
OUString getStringValue(const char *i_pPropName) const
Definition: print.hxx:590
Point GetPageOffset() const
Definition: print.hxx:315
bool IsDefPrinter() const
Definition: print.hxx:260
bool mbCollateCopy
Definition: print.hxx:167
Paper
VclPtr< Printer > mpNext
Definition: print.hxx:152
std::vector< css::beans::PropertyValue > maAddProps
Definition: print.hxx:603
DuplexMode
Definition: prntypes.hxx:28
sal_uInt16 mnPageQueueSize
Definition: print.hxx:162
void DrawBorder(tools::Rectangle aBorderRect) override
Definition: print.hxx:217
const Size & GetPaperSizePixel() const
Definition: print.hxx:311
Mode eMode
std::unique_ptr< ImplPrinterControllerData > mpImplData
Definition: print.hxx:379
bool IsJobActive() const
Definition: print.hxx:323
Point maPageOffset
Definition: print.hxx:159
VclPtr< VirtualDevice > mpDisplayDev
Definition: print.hxx:153
const OUString & GetDriverName() const
Definition: print.hxx:259
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
bool IsValid() const
Definition: print.hxx:262
bool mbPrinting
Definition: print.hxx:165
UIControlOptions(const OUString &i_rDependsOnName=OUString(), sal_Int32 i_nDependsOnEntry=-1, bool i_bAttachToDependency=false)
Definition: print.hxx:605
bool mbNewJobSetup
Definition: print.hxx:170
OUString maDriver
Definition: print.hxx:156
sal_uInt16 GetCopyCount() const
Definition: print.hxx:318
Color GetReadableFontColor(const Color &, const Color &) const override
Definition: print.hxx:275
bool mbDefPrinter
Definition: print.hxx:164
PrinterOptionsHelper()
Create without ui properties.
Definition: print.hxx:560
void ScaleBitmap(Bitmap &, SalTwoRect &) override
Definition: print.hxx:205
sal_Int32 getPageCount(const uno::Reference< frame::XModel > &xModel)
bool IsPrinting() const
Definition: print.hxx:321
const Point & GetPageOffsetPixel() const
Definition: print.hxx:314
VclPtr< Printer > mpPrev
Definition: print.hxx:151
bool mbPrintFile
Definition: print.hxx:168
ErrCode mnError
Definition: print.hxx:161
OUString maPrinterName
Definition: print.hxx:155
sal_uInt16 mnCopyCount
Definition: print.hxx:163
Orientation
Definition: prntypes.hxx:31
constexpr::Color COL_WHITE(0xFF, 0xFF, 0xFF)
SalInfoPrinter * mpInfoPrinter
Definition: print.hxx:148
PrinterSupport
#define VCL_DLLPRIVATE
Definition: dllapi.h:31
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
bool mbInPrintPage
Definition: print.hxx:169
void dispose()
NupOrderType
Definition: print.hxx:371
bool bFullPaper
Full paper, not only imageable area is printed.
Definition: print.hxx:413
bool IsCollateCopy() const
Definition: print.hxx:319
bool IsScreenComp() const override
Definition: print.hxx:215
OUString maPrintFile
Definition: print.hxx:157
std::unique_ptr< PrinterOptions > mpPrinterOptions
Definition: print.hxx:154
Color GetBackgroundColor() const override
Definition: print.hxx:274
SalPrinterError
Definition: salptype.hxx:41
Size GetPaperSize() const
Definition: print.hxx:312