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