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  SAL_DLLPRIVATE void ImplPrintTransparent (
188  const Bitmap& rBmp, const Bitmap& rMask,
189  const Point& rDestPt, const Size& rDestSize,
190  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
191 
192 private:
193  VCL_DLLPRIVATE void EndJob();
194  Printer( const Printer& rPrinter ) = delete;
195  Printer& operator =( const Printer& rPrinter ) = delete;
196 
197 public:
198  VCL_DLLPRIVATE void ImplStartPage();
199  VCL_DLLPRIVATE void ImplEndPage();
200 
201 protected:
202  virtual bool AcquireGraphics() const override;
203  virtual void ReleaseGraphics( bool bRelease = true ) override;
204  virtual void ImplReleaseFonts() override;
205 
206  virtual tools::Long GetGradientStepCount( tools::Long nMinRect ) override;
207  virtual bool UsePolyPolygonForComplexGradient() override;
208  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient,
209  const tools::PolyPolygon &rPolyPoly ) override;
210 
211  bool CanSubsampleBitmap() const override { return false; }
212  vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const override;
213 
214 public:
215  void DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect,
216  const Gradient& rGradient );
217  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override;
218  virtual Size GetButtonBorderSize() override;
219  virtual Color GetMonochromeButtonColor() override { return COL_LIGHTGRAY; }
220 
221  bool IsScreenComp() const override { return false; }
222 
223  void DrawBorder(tools::Rectangle aBorderRect) override
224  {
226  DrawRect(aBorderRect);
227  }
228 
229  css::awt::DeviceInfo GetDeviceInfo() const override;
230 
231 protected:
232  virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
233  const Point& rDestPt, const Size& rDestSize,
234  const Point& rSrcPtPixel, const Size& rSrcSizePixel) override;
235 
236  bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix& aFullTransform,
237  const BitmapEx& rBitmapEx, double fAlpha = 1.0) override;
238 
239  bool TransformAndReduceBitmapExToTargetRange( const basegfx::B2DHomMatrix& aFullTransform,
240  basegfx::B2DRange &aVisibleRange, double &fMaximumArea) override;
241 
242  void DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize,
243  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
244  BitmapEx& rBitmapEx ) override;
245 
246  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly,
247  sal_uInt16 nTransparencePercent ) override;
248 
249  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const override;
250 
251 public:
252  Printer();
253  Printer( const JobSetup& rJobSetup );
254  Printer( const QueueInfo& rQueueInfo );
255  Printer( const OUString& rPrinterName );
256  virtual ~Printer() override;
257  virtual void dispose() override;
258 
259  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool) override { SetMapMode(rNewMapMode); }
260 
261  static const std::vector< OUString >&
262  GetPrinterQueues();
263  static const QueueInfo* GetQueueInfo( const OUString& rPrinterName, bool bStatusUpdate );
264  static OUString GetDefaultPrinterName();
265 
266  const OUString& GetName() const { return maPrinterName; }
267  const OUString& GetDriverName() const { return maDriver; }
268  bool IsDefPrinter() const { return mbDefPrinter; }
269  bool IsDisplayPrinter() const { return mpDisplayDev != nullptr; }
270  bool IsValid() const { return !IsDisplayPrinter(); }
271 
272  sal_uInt32 GetCapabilities( PrinterCapType nType ) const;
273  bool HasSupport( PrinterSupport eFeature ) const;
274 
275  bool SetJobSetup( const JobSetup& rSetup );
276  const JobSetup& GetJobSetup() const { return maJobSetup; }
277 
278  bool Setup(weld::Window* pWindow,
280  bool SetPrinterProps( const Printer* pPrinter );
281 
282  Color GetBackgroundColor() const override { return COL_WHITE; }
283  Color GetReadableFontColor(const Color&, const Color&) const override { return COL_BLACK; }
284 
292  VCL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& rOptions );
293  const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); }
294 
295  bool SetOrientation( Orientation eOrient );
296  Orientation GetOrientation() const;
297  void SetDuplexMode( DuplexMode );
298  DuplexMode GetDuplexMode() const;
299 
300  bool SetPaperBin( sal_uInt16 nPaperBin );
301  sal_uInt16 GetPaperBin() const;
302  void SetPaper( Paper ePaper );
303  bool SetPaperSizeUser( const Size& rSize );
304  Paper GetPaper() const;
305  static OUString GetPaperName( Paper ePaper );
306 
308  int GetPaperInfoCount() const;
309 
311  const PaperInfo& GetPaperInfo( int nPaper ) const;
312  sal_uInt16 GetPaperBinCount() const;
313  OUString GetPaperBinName( sal_uInt16 nPaperBin ) const;
314 
315  bool GetPrinterSettingsPreferred() const;
316  void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup );
317 
318  const Size& GetPaperSizePixel() const { return maPaperSize; }
319  Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
320  Size GetPaperSize( int nPaper );
321  const Point& GetPageOffsetPixel() const { return maPageOffset; }
322  Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
323 
324  void SetCopyCount( sal_uInt16 nCopy, bool bCollate );
325  sal_uInt16 GetCopyCount() const { return mnCopyCount; }
326  bool IsCollateCopy() const { return mbCollateCopy; }
327  void SetSinglePrintJobs(bool bSinglePrintJobs) { mbSinglePrintJobs = bSinglePrintJobs; }
328  bool IsSinglePrintJobs() const { return mbSinglePrintJobs; }
329 
330  bool IsPrinting() const { return mbPrinting; }
331 
332  bool IsJobActive() const { return mbJobActive; }
333 
338  static void updatePrinters();
339 
344  static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
345  const JobSetup& i_rInitSetup );
346 
347  virtual bool HasMirroredGraphics() const override;
348 
349  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
350  const Point& rSrcPt, const Size& rSrcSize ) override;
351 
352  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
353  const Point& rSrcPt, const Size& rSrcSize,
354  const OutputDevice& rOutDev ) override;
355 
356  virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
357  const Size& rSrcSize, bool bWindowInvalidate = false ) override;
358 
359  virtual tools::Rectangle GetBackgroundComponentBounds() const override;
360 
361  // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
362  // by repeated calls to ExecutePrintJob(). Used by mailmerge.
363  static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
364  const JobSetup& i_rInitSetup );
365  static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController);
366  static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
367 
372  static void VCL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
373  const JobSetup& i_rInitSetup );
374 };
375 
376 namespace vcl
377 {
378 class ImplPrinterControllerData;
379 
380 enum class NupOrderType
381 {
382  LRTB, TBLR, TBRL, RLTB
383 };
384 
386 {
387  std::unique_ptr<ImplPrinterControllerData>
389 protected:
391 public:
393  {
394  // all metrics in 100th mm
395  int nRows;
396  int nColumns;
406 
408  : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
409  , nLeftMargin( 0 ), nTopMargin( 0 )
410  , nRightMargin( 0 ), nBottomMargin( 0 )
411  , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
412  , bDrawBorder( false )
413  , nOrder( NupOrderType::LRTB ) {}
414  };
415 
416  struct PageSize
417  {
420 
423 
424  PageSize( const Size& i_rSize = Size( 21000, 29700 ),
425  bool i_bFullPaper = false)
426  : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
427  };
428 
429  virtual ~PrinterController();
430 
431  const VclPtr<Printer>& getPrinter() const;
432  weld::Window* getWindow() const;
433 
441  css::uno::Sequence< css::beans::PropertyValue >
442  getJobProperties(const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
443 
445  css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
446  const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
447 
452  bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
453 
458  sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
459 
461  void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
462  void setValue( const css::beans::PropertyValue& i_rValue );
463 
465  const css::uno::Sequence< css::beans::PropertyValue >&
466  getUIOptions() const;
467 
472  void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
473 
475  bool isUIOptionEnabled( const OUString& rPropName ) const;
476  bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
477 
485  OUString makeEnabled( const OUString& rPropName );
486 
488  virtual int getPageCount() const = 0;
489 
503  virtual css::uno::Sequence< css::beans::PropertyValue >
504  getPageParameters( int i_nPage ) const = 0;
506  virtual void printPage(int i_nPage) const = 0;
507 
509  virtual void jobStarted();
510  virtual void jobFinished( css::view::PrintableState );
511 
512  css::view::PrintableState getJobState() const;
513 
514  void abortJob();
515 
516  bool isShowDialogs() const;
517  bool isDirectPrint() const;
518 
519  // implementation details, not usable outside vcl
520  // don't use outside vcl. Some of these are exported for
521  // the benefit of vcl's plugins.
522  // Still: DO NOT USE OUTSIDE VCL
523  int getFilteredPageCount() const;
524  VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
525  bool i_bMayUseCache = false );
526  PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
527  bool i_bMayUseCache = false );
528  void printFilteredPage( int i_nPage );
529  VCL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
530  void createProgressDialog();
531  bool isProgressCanceled() const;
532  VCL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
533  VCL_DLLPRIVATE const MultiPageSetup&
534  getMultipage() const;
535  void setLastPage( bool i_bLastPage );
536  VCL_DLLPRIVATE void setReversePrint( bool i_bReverse );
537  VCL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
538  VCL_DLLPRIVATE bool getPapersizeFromSetup() const;
539  VCL_DLLPRIVATE Size& getPaperSizeSetup() const;
540  VCL_DLLPRIVATE void setPaperSizeFromUser( Size i_aUserSize );
541  VCL_DLLPRIVATE Size& getPaperSizeFromUser() const;
542  VCL_DLLPRIVATE bool isPaperSizeFromUser() const;
543  void setPrinterModified( bool i_bPapersizeFromSetup );
544  bool getPrinterModified() const;
545  VCL_DLLPRIVATE void pushPropertiesToPrinter();
546  VCL_DLLPRIVATE void resetPaperToLastConfigured();
547  void setJobState( css::view::PrintableState );
548  VCL_DLLPRIVATE void setupPrinter( weld::Window* i_pDlgParent );
549 
550  VCL_DLLPRIVATE int getPageCountProtected() const;
551  VCL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue >
552  getPageParametersProtected( int i_nPage ) const;
553 
554  VCL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile const & i_rIn, GDIMetaFile& o_rOut );
555  VCL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
556 };
557 
559 {
560 protected:
561  std::unordered_map< OUString, css::uno::Any >
563  std::vector< css::beans::PropertyValue >
565 
566 public:
567 
570 
575  bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp );
576 
582  void appendPrintUIOptions( css::uno::Sequence< css::beans::PropertyValue >& io_rProps ) const;
583 
585  css::uno::Any getValue( const OUString& i_rPropertyName ) const;
586 
587  bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const;
588  // convenience for fixed strings
589  bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const
590  { return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); }
591 
592  sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault ) const;
593  // convenience for fixed strings
594  sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault ) const
595  { return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
596 
597  OUString getStringValue( const OUString& i_rPropertyName ) const;
598  // convenience for fixed strings
599  OUString getStringValue( const char* i_pPropName ) const
600  { return getStringValue( OUString::createFromAscii( i_pPropName ) ); }
601 
602  // helper functions for user to create a single control
604  {
605  OUString maDependsOnName;
606  sal_Int32 mnDependsOnEntry;
608  OUString maGroupHint;
610  bool mbEnabled;
611  std::vector< css::beans::PropertyValue >
613 
614  UIControlOptions( const OUString& i_rDependsOnName = OUString(),
615  sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false)
616  : maDependsOnName( i_rDependsOnName )
617  , mnDependsOnEntry( i_nDependsOnEntry )
618  , mbAttachToDependency( i_bAttachToDependency )
619  , mbInternalOnly( false )
620  , mbEnabled( true ) {}
621  };
622 
623  // note: in the following helper functions HelpIds are expected as an OUString
624  // the normal HelpId form is OString (byte string instead of UTF16 string)
625  // this is because the whole interface is base on UNO properties; in fact the structures
626  // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
627  // transported via UTF16 strings.
628 
630  static css::uno::Any setUIControlOpt( const css::uno::Sequence< OUString >& i_rIDs, const OUString& i_rTitle,
631  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rType,
632  const css::beans::PropertyValue* i_pValue = nullptr,
633  const UIControlOptions& i_rControlOptions = UIControlOptions());
634 
636  static css::uno::Any setGroupControlOpt( const OUString& i_rID, const OUString& i_rTitle,
637  const OUString& i_rHelpId);
638 
640  static css::uno::Any setSubgroupControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
641  const UIControlOptions& i_rControlOptions = UIControlOptions());
642 
644  static css::uno::Any setBoolControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
645  const OUString& i_rProperty, bool i_bValue,
646  const UIControlOptions& i_rControlOptions = UIControlOptions());
647 
649  static css::uno::Any setChoiceListControlOpt( const OUString& i_rID, const OUString& i_rTitle,
650  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rProperty,
651  const css::uno::Sequence< OUString >& i_rChoices, sal_Int32 i_nValue,
652  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
653  const UIControlOptions& i_rControlOptions = UIControlOptions());
654 
656  static css::uno::Any setChoiceRadiosControlOpt( const css::uno::Sequence< OUString >& i_rIDs,
657  const OUString& i_rTitle, const css::uno::Sequence< OUString >& i_rHelpId,
658  const OUString& i_rProperty, const css::uno::Sequence< OUString >& i_rChoices,
659  sal_Int32 i_nValue,
660  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
661  const UIControlOptions& i_rControlOptions = UIControlOptions());
662 
667  static css::uno::Any setRangeControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
668  const OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue,
669  sal_Int32 i_nMaxValue, const UIControlOptions& i_rControlOptions);
670 
675  static css::uno::Any setEditControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
676  const OUString& i_rProperty, const OUString& i_rValue,
677  const UIControlOptions& i_rControlOptions);
678 }; // class PrinterOptionsHelper
679 
680 } // namespace vcl
681 
682 
683 #endif // INCLUDED_VCL_PRINT_HXX
684 
685 /* 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:589
bool mbJobActive
Definition: print.hxx:166
const PrinterOptions & GetPrinterOptions() const
Definition: print.hxx:293
bool CanSubsampleBitmap() const override
Definition: print.hxx:211
const OUString & GetName() const
Definition: print.hxx:266
Size aSize
In 100th mm.
Definition: print.hxx:419
SalGraphics * mpJobGraphics
Definition: print.hxx:150
bool IsDisplayPrinter() const
Definition: print.hxx:269
JobSetup maJobSetup
Definition: print.hxx:158
virtual Color GetMonochromeButtonColor() override
Definition: print.hxx:219
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
Definition: print.hxx:562
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:424
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool) override
Definition: print.hxx:259
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
long Long
std::vector< css::beans::PropertyValue > m_aUIProperties
Definition: print.hxx:564
const JobSetup & GetJobSetup() const
Definition: print.hxx:276
void SetSinglePrintJobs(bool bSinglePrintJobs)
Definition: print.hxx:327
sal_Int64 getIntValue(const char *i_pPropName, sal_Int64 i_nDefault) const
Definition: print.hxx:594
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:599
Point GetPageOffset() const
Definition: print.hxx:322
bool IsDefPrinter() const
Definition: print.hxx:268
bool mbCollateCopy
Definition: print.hxx:167
VclPtr< Printer > mpNext
Definition: print.hxx:152
std::vector< css::beans::PropertyValue > maAddProps
Definition: print.hxx:612
DuplexMode
Definition: prntypes.hxx:28
sal_uInt16 mnPageQueueSize
Definition: print.hxx:162
void DrawBorder(tools::Rectangle aBorderRect) override
Definition: print.hxx:223
const Size & GetPaperSizePixel() const
Definition: print.hxx:318
Mode eMode
std::unique_ptr< ImplPrinterControllerData > mpImplData
Definition: print.hxx:388
bool IsJobActive() const
Definition: print.hxx:332
Point maPageOffset
Definition: print.hxx:159
VclPtr< VirtualDevice > mpDisplayDev
Definition: print.hxx:153
const OUString & GetDriverName() const
Definition: print.hxx:267
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:162
bool IsValid() const
Definition: print.hxx:270
bool mbPrinting
Definition: print.hxx:165
UIControlOptions(const OUString &i_rDependsOnName=OUString(), sal_Int32 i_nDependsOnEntry=-1, bool i_bAttachToDependency=false)
Definition: print.hxx:614
bool mbNewJobSetup
Definition: print.hxx:170
Paper
OUString maDriver
Definition: print.hxx:156
sal_uInt16 GetCopyCount() const
Definition: print.hxx:325
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
Color GetReadableFontColor(const Color &, const Color &) const override
Definition: print.hxx:283
bool mbDefPrinter
Definition: print.hxx:164
PrinterOptionsHelper()
Create without ui properties.
Definition: print.hxx:569
sal_Int32 getPageCount(const uno::Reference< frame::XModel > &xModel)
bool IsPrinting() const
Definition: print.hxx:330
const Point & GetPageOffsetPixel() const
Definition: print.hxx:321
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:380
bool bFullPaper
Full paper, not only imageable area is printed.
Definition: print.hxx:422
bool IsCollateCopy() const
Definition: print.hxx:326
bool IsScreenComp() const override
Definition: print.hxx:221
DrawModeFlags
OUString maPrintFile
Definition: print.hxx:157
std::unique_ptr< PrinterOptions > mpPrinterOptions
Definition: print.hxx:154
Color GetBackgroundColor() const override
Definition: print.hxx:282
SalPrinterError
Definition: salptype.hxx:41
bool IsSinglePrintJobs() const
Definition: print.hxx:328
Size GetPaperSize() const
Definition: print.hxx:319