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;
172 
173  VCL_DLLPRIVATE void ImplInitData();
174  VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
175  VCL_DLLPRIVATE void ImplInitDisplay();
177  ImplGetQueueInfo( const OUString& rPrinterName, const OUString* pDriver );
178  VCL_DLLPRIVATE void ImplUpdatePageData();
179  VCL_DLLPRIVATE void ImplUpdateFontList();
180  VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
181 
182  VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController> const & );
183 
184  static VCL_DLLPRIVATE ErrCode
185  ImplSalPrinterErrorCodeToVCL( SalPrinterError nError );
186 
187 private:
188  VCL_DLLPRIVATE void EndJob();
189  Printer( const Printer& rPrinter ) = delete;
190  Printer& operator =( const Printer& rPrinter ) = delete;
191 
192 public:
193  VCL_DLLPRIVATE void ImplStartPage();
194  VCL_DLLPRIVATE void ImplEndPage();
195 
196 protected:
197  virtual bool AcquireGraphics() const override;
198  virtual void ReleaseGraphics( bool bRelease = true ) override;
199  virtual void ImplReleaseFonts() override;
200 
201  virtual tools::Long GetGradientStepCount( tools::Long nMinRect ) override;
202  virtual bool UsePolyPolygonForComplexGradient() override;
203  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient,
204  const tools::PolyPolygon &rPolyPoly ) override;
205 
206  void ScaleBitmap ( Bitmap&, SalTwoRect& ) override { };
207  vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const override;
208 
209 public:
210  void DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect,
211  const Gradient& rGradient );
212  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override;
213  virtual Size GetButtonBorderSize() override;
214  virtual Color GetMonochromeButtonColor() override { return COL_LIGHTGRAY; }
215 
216  bool IsScreenComp() const override { return false; }
217 
218  void DrawBorder(tools::Rectangle aBorderRect) override
219  {
221  DrawRect(aBorderRect);
222  }
223 
224 protected:
225  virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
226  const Point& rDestPt, const Size& rDestSize,
227  const Point& rSrcPtPixel, const Size& rSrcSizePixel) override;
228 
229  bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix& aFullTransform,
230  const BitmapEx& rBitmapEx) override;
231 
232  bool TransformAndReduceBitmapExToTargetRange( const basegfx::B2DHomMatrix& aFullTransform,
233  basegfx::B2DRange &aVisibleRange, double &fMaximumArea) override;
234 
235  void DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize,
236  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
237  BitmapEx& rBitmapEx ) override;
238 
239  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly,
240  sal_uInt16 nTransparencePercent ) override;
241 
242  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const override;
243 
244 public:
245  Printer();
246  Printer( const JobSetup& rJobSetup );
247  Printer( const QueueInfo& rQueueInfo );
248  Printer( const OUString& rPrinterName );
249  virtual ~Printer() override;
250  virtual void dispose() override;
251 
252  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool) override { SetMapMode(rNewMapMode); }
253 
254  static const std::vector< OUString >&
255  GetPrinterQueues();
256  static const QueueInfo* GetQueueInfo( const OUString& rPrinterName, bool bStatusUpdate );
257  static OUString GetDefaultPrinterName();
258 
259  const OUString& GetName() const { return maPrinterName; }
260  const OUString& GetDriverName() const { return maDriver; }
261  bool IsDefPrinter() const { return mbDefPrinter; }
262  bool IsDisplayPrinter() const { return mpDisplayDev != nullptr; }
263  bool IsValid() const { return !IsDisplayPrinter(); }
264 
265  sal_uInt32 GetCapabilities( PrinterCapType nType ) const;
266  bool HasSupport( PrinterSupport eFeature ) const;
267 
268  bool SetJobSetup( const JobSetup& rSetup );
269  const JobSetup& GetJobSetup() const { return maJobSetup; }
270 
271  bool Setup(weld::Window* pWindow,
273  bool SetPrinterProps( const Printer* pPrinter );
274 
275  Color GetBackgroundColor() const override { return COL_WHITE; }
276  Color GetReadableFontColor(const Color&, const Color&) const override { return COL_BLACK; }
277 
285  VCL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& rOptions );
286  const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); }
287 
288  bool SetOrientation( Orientation eOrient );
289  Orientation GetOrientation() const;
290  void SetDuplexMode( DuplexMode );
291  DuplexMode GetDuplexMode() const;
292 
293  bool SetPaperBin( sal_uInt16 nPaperBin );
294  sal_uInt16 GetPaperBin() const;
295  void SetPaper( Paper ePaper );
296  bool SetPaperSizeUser( const Size& rSize );
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  void SetSinglePrintJobs(bool bSinglePrintJobs) { mbSinglePrintJobs = bSinglePrintJobs; }
321  bool IsSinglePrintJobs() const { return mbSinglePrintJobs; }
322 
323  bool IsPrinting() const { return mbPrinting; }
324 
325  bool IsJobActive() const { return mbJobActive; }
326 
331  static void updatePrinters();
332 
337  static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
338  const JobSetup& i_rInitSetup );
339 
340  virtual bool HasMirroredGraphics() const override;
341 
342  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
343  const Point& rSrcPt, const Size& rSrcSize ) override;
344 
345  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
346  const Point& rSrcPt, const Size& rSrcSize,
347  const OutputDevice& rOutDev ) override;
348 
349  virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
350  const Size& rSrcSize, bool bWindowInvalidate = false ) override;
351 
352  virtual tools::Rectangle GetBackgroundComponentBounds() const override;
353 
354  // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
355  // by repeated calls to ExecutePrintJob(). Used by mailmerge.
356  static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
357  const JobSetup& i_rInitSetup );
358  static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController);
359  static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
360 
365  static void VCL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
366  const JobSetup& i_rInitSetup );
367 };
368 
369 namespace vcl
370 {
371 class ImplPrinterControllerData;
372 
373 enum class NupOrderType
374 {
375  LRTB, TBLR, TBRL, RLTB
376 };
377 
379 {
380  std::unique_ptr<ImplPrinterControllerData>
382 protected:
384 public:
386  {
387  // all metrics in 100th mm
388  int nRows;
389  int nColumns;
399 
401  : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
402  , nLeftMargin( 0 ), nTopMargin( 0 )
403  , nRightMargin( 0 ), nBottomMargin( 0 )
404  , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
405  , bDrawBorder( false )
406  , nOrder( NupOrderType::LRTB ) {}
407  };
408 
409  struct PageSize
410  {
413 
416 
417  PageSize( const Size& i_rSize = Size( 21000, 29700 ),
418  bool i_bFullPaper = false)
419  : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
420  };
421 
422  virtual ~PrinterController();
423 
424  const VclPtr<Printer>& getPrinter() const;
425  weld::Window* getWindow() const;
426 
434  css::uno::Sequence< css::beans::PropertyValue >
435  getJobProperties(const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
436 
438  css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
439  const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
440 
445  bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
446 
451  sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
452 
454  void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
455  void setValue( const css::beans::PropertyValue& i_rValue );
456 
458  const css::uno::Sequence< css::beans::PropertyValue >&
459  getUIOptions() const;
460 
465  void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
466 
468  bool isUIOptionEnabled( const OUString& rPropName ) const;
469  bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
470 
478  OUString makeEnabled( const OUString& rPropName );
479 
481  virtual int getPageCount() const = 0;
482 
496  virtual css::uno::Sequence< css::beans::PropertyValue >
497  getPageParameters( int i_nPage ) const = 0;
499  virtual void printPage(int i_nPage) const = 0;
500 
502  virtual void jobStarted();
503  virtual void jobFinished( css::view::PrintableState );
504 
505  css::view::PrintableState getJobState() const;
506 
507  void abortJob();
508 
509  bool isShowDialogs() const;
510  bool isDirectPrint() const;
511 
512  // implementation details, not usable outside vcl
513  // don't use outside vcl. Some of these are exported for
514  // the benefit of vcl's plugins.
515  // Still: DO NOT USE OUTSIDE VCL
516  int getFilteredPageCount() const;
517  VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
518  bool i_bMayUseCache = false );
519  PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
520  bool i_bMayUseCache = false );
521  void printFilteredPage( int i_nPage );
522  VCL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
523  void createProgressDialog();
524  bool isProgressCanceled() const;
525  VCL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
526  VCL_DLLPRIVATE const MultiPageSetup&
527  getMultipage() const;
528  void setLastPage( bool i_bLastPage );
529  VCL_DLLPRIVATE void setReversePrint( bool i_bReverse );
530  VCL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
531  VCL_DLLPRIVATE bool getPapersizeFromSetup() const;
532  VCL_DLLPRIVATE Size& getPaperSizeSetup() const;
533  VCL_DLLPRIVATE void setPaperSizeFromUser( Size i_aUserSize );
534  VCL_DLLPRIVATE Size& getPaperSizeFromUser() const;
535  VCL_DLLPRIVATE bool isPaperSizeFromUser() const;
536  void setPrinterModified( bool i_bPapersizeFromSetup );
537  bool getPrinterModified() const;
538  VCL_DLLPRIVATE void pushPropertiesToPrinter();
539  VCL_DLLPRIVATE void resetPaperToLastConfigured();
540  void setJobState( css::view::PrintableState );
541  VCL_DLLPRIVATE void setupPrinter( weld::Window* i_pDlgParent );
542 
543  VCL_DLLPRIVATE int getPageCountProtected() const;
544  VCL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue >
545  getPageParametersProtected( int i_nPage ) const;
546 
547  VCL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile const & i_rIn, GDIMetaFile& o_rOut );
548  VCL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
549 };
550 
552 {
553 protected:
554  std::unordered_map< OUString, css::uno::Any >
556  std::vector< css::beans::PropertyValue >
558 
559 public:
560 
563 
568  bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp );
569 
575  void appendPrintUIOptions( css::uno::Sequence< css::beans::PropertyValue >& io_rProps ) const;
576 
578  css::uno::Any getValue( const OUString& i_rPropertyName ) const;
579 
580  bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const;
581  // convenience for fixed strings
582  bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const
583  { return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); }
584 
585  sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault ) const;
586  // convenience for fixed strings
587  sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault ) const
588  { return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
589 
590  OUString getStringValue( const OUString& i_rPropertyName ) const;
591  // convenience for fixed strings
592  OUString getStringValue( const char* i_pPropName ) const
593  { return getStringValue( OUString::createFromAscii( i_pPropName ) ); }
594 
595  // helper functions for user to create a single control
597  {
598  OUString maDependsOnName;
599  sal_Int32 mnDependsOnEntry;
601  OUString maGroupHint;
603  bool mbEnabled;
604  std::vector< css::beans::PropertyValue >
606 
607  UIControlOptions( const OUString& i_rDependsOnName = OUString(),
608  sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false)
609  : maDependsOnName( i_rDependsOnName )
610  , mnDependsOnEntry( i_nDependsOnEntry )
611  , mbAttachToDependency( i_bAttachToDependency )
612  , mbInternalOnly( false )
613  , mbEnabled( true ) {}
614  };
615 
616  // note: in the following helper functions HelpIds are expected as an OUString
617  // the normal HelpId form is OString (byte string instead of UTF16 string)
618  // this is because the whole interface is base on UNO properties; in fact the structures
619  // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
620  // transported via UTF16 strings.
621 
623  static css::uno::Any setUIControlOpt( const css::uno::Sequence< OUString >& i_rIDs, const OUString& i_rTitle,
624  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rType,
625  const css::beans::PropertyValue* i_pValue = nullptr,
626  const UIControlOptions& i_rControlOptions = UIControlOptions());
627 
629  static css::uno::Any setGroupControlOpt( const OUString& i_rID, const OUString& i_rTitle,
630  const OUString& i_rHelpId);
631 
633  static css::uno::Any setSubgroupControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
634  const UIControlOptions& i_rControlOptions = UIControlOptions());
635 
637  static css::uno::Any setBoolControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
638  const OUString& i_rProperty, bool i_bValue,
639  const UIControlOptions& i_rControlOptions = UIControlOptions());
640 
642  static css::uno::Any setChoiceListControlOpt( const OUString& i_rID, const OUString& i_rTitle,
643  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rProperty,
644  const css::uno::Sequence< OUString >& i_rChoices, sal_Int32 i_nValue,
645  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
646  const UIControlOptions& i_rControlOptions = UIControlOptions());
647 
649  static css::uno::Any setChoiceRadiosControlOpt( const css::uno::Sequence< OUString >& i_rIDs,
650  const OUString& i_rTitle, const css::uno::Sequence< OUString >& i_rHelpId,
651  const OUString& i_rProperty, const css::uno::Sequence< OUString >& i_rChoices,
652  sal_Int32 i_nValue,
653  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
654  const UIControlOptions& i_rControlOptions = UIControlOptions());
655 
660  static css::uno::Any setRangeControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
661  const OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue,
662  sal_Int32 i_nMaxValue, const UIControlOptions& i_rControlOptions);
663 
668  static css::uno::Any setEditControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
669  const OUString& i_rProperty, const OUString& i_rValue,
670  const UIControlOptions& i_rControlOptions);
671 }; // class PrinterOptionsHelper
672 
673 } // namespace vcl
674 
675 
676 #endif // INCLUDED_VCL_PRINT_HXX
677 
678 /* 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:582
bool mbJobActive
Definition: print.hxx:166
const PrinterOptions & GetPrinterOptions() const
Definition: print.hxx:286
const OUString & GetName() const
Definition: print.hxx:259
Size aSize
In 100th mm.
Definition: print.hxx:412
SalGraphics * mpJobGraphics
Definition: print.hxx:150
bool IsDisplayPrinter() const
Definition: print.hxx:262
JobSetup maJobSetup
Definition: print.hxx:158
virtual Color GetMonochromeButtonColor() override
Definition: print.hxx:214
DrawModeFlags
Definition: outdev.hxx:198
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
Definition: print.hxx:555
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:417
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool) override
Definition: print.hxx:252
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
long Long
std::vector< css::beans::PropertyValue > m_aUIProperties
Definition: print.hxx:557
const JobSetup & GetJobSetup() const
Definition: print.hxx:269
void SetSinglePrintJobs(bool bSinglePrintJobs)
Definition: print.hxx:320
sal_Int64 getIntValue(const char *i_pPropName, sal_Int64 i_nDefault) const
Definition: print.hxx:587
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:592
Point GetPageOffset() const
Definition: print.hxx:315
bool IsDefPrinter() const
Definition: print.hxx:261
bool mbCollateCopy
Definition: print.hxx:167
VclPtr< Printer > mpNext
Definition: print.hxx:152
std::vector< css::beans::PropertyValue > maAddProps
Definition: print.hxx:605
DuplexMode
Definition: prntypes.hxx:28
sal_uInt16 mnPageQueueSize
Definition: print.hxx:162
void DrawBorder(tools::Rectangle aBorderRect) override
Definition: print.hxx:218
const Size & GetPaperSizePixel() const
Definition: print.hxx:311
Mode eMode
std::unique_ptr< ImplPrinterControllerData > mpImplData
Definition: print.hxx:381
bool IsJobActive() const
Definition: print.hxx:325
Point maPageOffset
Definition: print.hxx:159
VclPtr< VirtualDevice > mpDisplayDev
Definition: print.hxx:153
const OUString & GetDriverName() const
Definition: print.hxx:260
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:263
bool mbPrinting
Definition: print.hxx:165
UIControlOptions(const OUString &i_rDependsOnName=OUString(), sal_Int32 i_nDependsOnEntry=-1, bool i_bAttachToDependency=false)
Definition: print.hxx:607
bool mbNewJobSetup
Definition: print.hxx:170
Paper
OUString maDriver
Definition: print.hxx:156
sal_uInt16 GetCopyCount() const
Definition: print.hxx:318
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
Color GetReadableFontColor(const Color &, const Color &) const override
Definition: print.hxx:276
bool mbDefPrinter
Definition: print.hxx:164
PrinterOptionsHelper()
Create without ui properties.
Definition: print.hxx:562
void ScaleBitmap(Bitmap &, SalTwoRect &) override
Definition: print.hxx:206
sal_Int32 getPageCount(const uno::Reference< frame::XModel > &xModel)
bool IsPrinting() const
Definition: print.hxx:323
const Point & GetPageOffsetPixel() const
Definition: print.hxx:314
bool mbSinglePrintJobs
Definition: print.hxx:171
VclPtr< Printer > mpPrev
Definition: print.hxx:151
bool mbPrintFile
Definition: print.hxx:168
ErrCode mnError
Definition: print.hxx:161
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
OUString maPrinterName
Definition: print.hxx:155
sal_uInt16 mnCopyCount
Definition: print.hxx:163
Orientation
Definition: prntypes.hxx:31
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
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:373
bool bFullPaper
Full paper, not only imageable area is printed.
Definition: print.hxx:415
bool IsCollateCopy() const
Definition: print.hxx:319
bool IsScreenComp() const override
Definition: print.hxx:216
OUString maPrintFile
Definition: print.hxx:157
std::unique_ptr< PrinterOptions > mpPrinterOptions
Definition: print.hxx:154
Color GetBackgroundColor() const override
Definition: print.hxx:275
SalPrinterError
Definition: salptype.hxx:41
bool IsSinglePrintJobs() const
Definition: print.hxx:321
Size GetPaperSize() const
Definition: print.hxx:312