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 <sal/config.h>
24 
25 #include <sal/types.h>
26 #include <rtl/ustring.hxx>
27 #include <tools/gen.hxx>
28 #include <tools/long.hxx>
29 #include <i18nutil/paper.hxx>
30 
31 #include <vcl/dllapi.h>
32 #include <vcl/PrinterSupport.hxx>
33 #include <vcl/errcode.hxx>
34 #include <vcl/outdev.hxx>
35 #include <vcl/prntypes.hxx>
36 #include <vcl/region.hxx>
37 #include <vcl/jobset.hxx>
38 
39 #include <com/sun/star/beans/PropertyValue.hpp>
40 #include <com/sun/star/uno/Sequence.hxx>
41 #include <com/sun/star/view/PrintableState.hpp>
42 
43 #include <memory>
44 #include <unordered_map>
45 
46 class GDIMetaFile;
47 class SalInfoPrinter;
48 struct SalPrinterQueueInfo;
49 class QueueInfo;
50 class SalPrinter;
51 class VirtualDevice;
52 enum class SalPrinterError;
53 
54 namespace vcl {
55  class PrinterController;
56 
57  namespace printer {
58  class Options;
59  }
60 }
61 
62 namespace weld { class Window; }
63 
65 {
66  friend class ::OutputDevice;
67 
68 private:
70  std::unique_ptr<SalPrinter> mpPrinter;
75  std::unique_ptr<vcl::printer::Options> mpPrinterOptions;
76  OUString maPrinterName;
77  OUString maDriver;
78  OUString maPrintFile;
83  sal_uInt16 mnPageQueueSize;
84  sal_uInt16 mnCopyCount;
86  bool mbPrinting;
93 
94  VCL_DLLPRIVATE void ImplInitData();
95  VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
96  VCL_DLLPRIVATE void ImplInitDisplay();
98  ImplGetQueueInfo( const OUString& rPrinterName, const OUString* pDriver );
99  VCL_DLLPRIVATE void ImplUpdatePageData();
100  VCL_DLLPRIVATE void ImplUpdateFontList();
101  VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
102 
103  VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController> const & );
104 
105  static VCL_DLLPRIVATE ErrCode
106  ImplSalPrinterErrorCodeToVCL( SalPrinterError nError );
107 
108  SAL_DLLPRIVATE void ImplPrintTransparent (
109  const Bitmap& rBmp, const Bitmap& rMask,
110  const Point& rDestPt, const Size& rDestSize,
111  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
112 
113 private:
114  VCL_DLLPRIVATE void EndJob();
115  Printer( const Printer& rPrinter ) = delete;
116  Printer& operator =( const Printer& rPrinter ) = delete;
117 
118 public:
119  VCL_DLLPRIVATE void ImplStartPage();
120  VCL_DLLPRIVATE void ImplEndPage();
121 
122 protected:
123  virtual bool AcquireGraphics() const override;
124  virtual void ReleaseGraphics( bool bRelease = true ) override;
125  void ImplReleaseGraphics(bool bRelease = true);
126  virtual void ImplReleaseFonts() override;
127 
128  virtual tools::Long GetGradientStepCount( tools::Long nMinRect ) override;
129  virtual bool UsePolyPolygonForComplexGradient() override;
130  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient,
131  const tools::PolyPolygon &rPolyPoly ) override;
132 
133  bool CanSubsampleBitmap() const override { return false; }
134  vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const override;
135 
136 public:
137  void SetSystemTextColor(SystemTextColorFlags, bool) override;
138  void DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect,
139  const Gradient& rGradient );
140  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override;
141  virtual Size GetButtonBorderSize() override;
142  virtual Color GetMonochromeButtonColor() override { return COL_LIGHTGRAY; }
143 
144  bool IsScreenComp() const override { return false; }
145 
146  void DrawBorder(tools::Rectangle aBorderRect) override
147  {
149  DrawRect(aBorderRect);
150  }
151 
152  css::awt::DeviceInfo GetDeviceInfo() const override;
153 
154 protected:
155  virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
156  const Point& rDestPt, const Size& rDestSize,
157  const Point& rSrcPtPixel, const Size& rSrcSizePixel) override;
158 
159  bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix& aFullTransform,
160  const BitmapEx& rBitmapEx, double fAlpha = 1.0) override;
161 
163  basegfx::B2DRange &aVisibleRange, double &fMaximumArea) override;
164 
165  void DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize,
166  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
167  BitmapEx& rBitmapEx ) override;
168 
169  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly,
170  sal_uInt16 nTransparencePercent ) override;
171 
172  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const override;
173 
174  bool shouldDrawWavePixelAsRect(tools::Long) const override { return true; }
175  void SetWaveLineColors(Color const& rColor, tools::Long) override;
176  Size GetWaveLineSize(tools::Long nLineWidth) const override;
177 
178 public:
179  Printer();
180  Printer( const JobSetup& rJobSetup );
181  Printer( const QueueInfo& rQueueInfo );
182  Printer( const OUString& rPrinterName );
183  virtual ~Printer() override;
184  virtual void dispose() override;
185 
186  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool) override { SetMapMode(rNewMapMode); }
187 
188  static const std::vector< OUString >&
189  GetPrinterQueues();
190  static const QueueInfo* GetQueueInfo( const OUString& rPrinterName, bool bStatusUpdate );
191  static OUString GetDefaultPrinterName();
192 
193  const OUString& GetName() const { return maPrinterName; }
194  const OUString& GetDriverName() const { return maDriver; }
195  bool IsDefPrinter() const { return mbDefPrinter; }
196  bool IsDisplayPrinter() const { return mpDisplayDev != nullptr; }
197  bool IsValid() const { return !IsDisplayPrinter(); }
198 
199  sal_uInt32 GetCapabilities( PrinterCapType nType ) const;
200  bool HasSupport( PrinterSupport eFeature ) const;
201 
202  bool SetJobSetup( const JobSetup& rSetup );
203  const JobSetup& GetJobSetup() const { return maJobSetup; }
204 
205  bool Setup(weld::Window* pWindow,
207  bool SetPrinterProps( const Printer* pPrinter );
208 
209  Color GetBackgroundColor() const override { return COL_WHITE; }
210  Color GetReadableFontColor(const Color&, const Color&) const override { return COL_BLACK; }
211 
219  VCL_DLLPRIVATE void SetPrinterOptions( const vcl::printer::Options& rOptions );
220  const vcl::printer::Options& GetPrinterOptions() const { return( *mpPrinterOptions ); }
221 
222  bool SetOrientation( Orientation eOrient );
223  Orientation GetOrientation() const;
224  void SetDuplexMode( DuplexMode );
225  DuplexMode GetDuplexMode() const;
226 
227  bool SetPaperBin( sal_uInt16 nPaperBin );
228  sal_uInt16 GetPaperBin() const;
229  void SetPaper( Paper ePaper );
230  bool SetPaperSizeUser( const Size& rSize );
232  Paper GetPaper() const;
234  Size GetSizeOfPaper() const;
235  static OUString GetPaperName( Paper ePaper );
236 
238  int GetPaperInfoCount() const;
239 
241  const PaperInfo& GetPaperInfo( int nPaper ) const;
242  sal_uInt16 GetPaperBinCount() const;
243  OUString GetPaperBinName( sal_uInt16 nPaperBin ) const;
244 
245  bool GetPrinterSettingsPreferred() const;
246  void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup );
247 
248  const Size& GetPaperSizePixel() const { return maPaperSize; }
249  Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
250  Size GetPaperSize( int nPaper ) const;
251  const Point& GetPageOffsetPixel() const { return maPageOffset; }
252  Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
253 
254  void SetCopyCount( sal_uInt16 nCopy, bool bCollate );
255  sal_uInt16 GetCopyCount() const { return mnCopyCount; }
256  bool IsCollateCopy() const { return mbCollateCopy; }
257  void SetSinglePrintJobs(bool bSinglePrintJobs) { mbSinglePrintJobs = bSinglePrintJobs; }
258  bool IsSinglePrintJobs() const { return mbSinglePrintJobs; }
259 
260  bool IsPrinting() const { return mbPrinting; }
261 
262  bool IsJobActive() const { return mbJobActive; }
263 
268  static void updatePrinters();
269 
274  static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
275  const JobSetup& i_rInitSetup );
276 
277  virtual bool HasMirroredGraphics() const override;
278 
279  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
280  const Point& rSrcPt, const Size& rSrcSize ) override;
281 
282  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
283  const Point& rSrcPt, const Size& rSrcSize,
284  const OutputDevice& rOutDev ) override;
285 
286  virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
287  const Size& rSrcSize, bool bWindowInvalidate = false ) override;
288 
289  virtual tools::Rectangle GetBackgroundComponentBounds() const override;
290 
291  // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
292  // by repeated calls to ExecutePrintJob(). Used by mailmerge.
293  static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
294  const JobSetup& i_rInitSetup );
295  static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController);
296  static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
297 
302  static void VCL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
303  const JobSetup& i_rInitSetup );
304 };
305 
306 namespace vcl
307 {
308 class ImplPrinterControllerData;
309 
310 enum class NupOrderType
311 {
312  LRTB, TBLR, TBRL, RLTB
313 };
314 
316 {
317  std::unique_ptr<ImplPrinterControllerData>
319 protected:
320  PrinterController(const VclPtr<Printer>&, weld::Window* pDialogParent);
321 public:
323  {
324  // all metrics in 100th mm
325  int nRows;
326  int nColumns;
336 
338  : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
339  , nLeftMargin( 0 ), nTopMargin( 0 )
340  , nRightMargin( 0 ), nBottomMargin( 0 )
341  , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
342  , bDrawBorder( false )
343  , nOrder( NupOrderType::LRTB ) {}
344  };
345 
346  struct PageSize
347  {
350 
353 
354  PageSize( const Size& i_rSize = Size( 21000, 29700 ),
355  bool i_bFullPaper = false)
356  : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
357  };
358 
359  virtual ~PrinterController();
360 
361  const VclPtr<Printer>& getPrinter() const;
362  weld::Window* getWindow() const;
363 
371  css::uno::Sequence< css::beans::PropertyValue >
372  getJobProperties(const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
373 
375  css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
376  const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
377 
382  bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
383 
388  sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
389 
391  void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
392  void setValue( const css::beans::PropertyValue& i_rValue );
393 
395  const css::uno::Sequence< css::beans::PropertyValue >&
396  getUIOptions() const;
397 
402  void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
403 
405  bool isUIOptionEnabled( const OUString& rPropName ) const;
406  bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
407 
415  OUString makeEnabled( const OUString& rPropName );
416 
418  virtual int getPageCount() const = 0;
419 
433  virtual css::uno::Sequence< css::beans::PropertyValue >
434  getPageParameters( int i_nPage ) const = 0;
436  virtual void printPage(int i_nPage) const = 0;
437 
439  virtual void jobStarted();
440  virtual void jobFinished( css::view::PrintableState );
441 
442  css::view::PrintableState getJobState() const;
443 
444  void abortJob();
445 
446  bool isShowDialogs() const;
447  bool isDirectPrint() const;
448 
449  void dialogsParentClosing();
450 
451  // implementation details, not usable outside vcl
452  // don't use outside vcl. Some of these are exported for
453  // the benefit of vcl's plugins.
454  // Still: DO NOT USE OUTSIDE VCL
455  int getFilteredPageCount() const;
456  VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
457  bool i_bMayUseCache = false );
458  PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
459  bool i_bMayUseCache = false );
460  void printFilteredPage( int i_nPage );
461  VCL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
462  void createProgressDialog();
463  bool isProgressCanceled() const;
464  VCL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
465  VCL_DLLPRIVATE const MultiPageSetup&
466  getMultipage() const;
467  void setLastPage( bool i_bLastPage );
468  VCL_DLLPRIVATE void setReversePrint( bool i_bReverse );
469  VCL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
470  VCL_DLLPRIVATE bool getPapersizeFromSetup() const;
471  VCL_DLLPRIVATE void setPaperSizeFromUser( Size i_aUserSize );
472  VCL_DLLPRIVATE void setOrientationFromUser( Orientation eOrientation, bool set );
473  void setPrinterModified( bool i_bPapersizeFromSetup );
474  bool getPrinterModified() const;
475  VCL_DLLPRIVATE void pushPropertiesToPrinter();
476  VCL_DLLPRIVATE void resetPaperToLastConfigured();
477  void setJobState( css::view::PrintableState );
478  VCL_DLLPRIVATE void setupPrinter( weld::Window* i_pDlgParent );
479 
480  VCL_DLLPRIVATE int getPageCountProtected() const;
481  VCL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue >
482  getPageParametersProtected( int i_nPage ) const;
483 
484  VCL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile const & i_rIn, GDIMetaFile& o_rOut );
485  VCL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
486 };
487 
489 {
490 protected:
491  std::unordered_map< OUString, css::uno::Any >
493  std::vector< css::beans::PropertyValue >
495 
496 public:
497 
500 
505  bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp );
506 
512  void appendPrintUIOptions( css::uno::Sequence< css::beans::PropertyValue >& io_rProps ) const;
513 
515  css::uno::Any getValue( const OUString& i_rPropertyName ) const;
516 
517  bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const;
518  // convenience for fixed strings
519  bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const
520  { return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); }
521 
522  sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault ) const;
523  // convenience for fixed strings
524  sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault ) const
525  { return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
526 
527  OUString getStringValue( const OUString& i_rPropertyName ) const;
528  // convenience for fixed strings
529  OUString getStringValue( const char* i_pPropName ) const
530  { return getStringValue( OUString::createFromAscii( i_pPropName ) ); }
531 
532  // helper functions for user to create a single control
534  {
535  OUString maDependsOnName;
536  OUString maGroupHint;
537  std::vector< css::beans::PropertyValue >
539  sal_Int32 mnDependsOnEntry;
542  bool mbEnabled;
543 
544  UIControlOptions( const OUString& i_rDependsOnName = OUString(),
545  sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false)
546  : maDependsOnName( i_rDependsOnName )
547  , mnDependsOnEntry( i_nDependsOnEntry )
548  , mbAttachToDependency( i_bAttachToDependency )
549  , mbInternalOnly( false )
550  , mbEnabled( true ) {}
551  };
552 
553  // note: in the following helper functions HelpIds are expected as an OUString
554  // the normal HelpId form is OString (byte string instead of UTF16 string)
555  // this is because the whole interface is base on UNO properties; in fact the structures
556  // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
557  // transported via UTF16 strings.
558 
560  static css::uno::Any setUIControlOpt( const css::uno::Sequence< OUString >& i_rIDs, const OUString& i_rTitle,
561  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rType,
562  const css::beans::PropertyValue* i_pValue = nullptr,
563  const UIControlOptions& i_rControlOptions = UIControlOptions());
564 
566  static css::uno::Any setGroupControlOpt( const OUString& i_rID, const OUString& i_rTitle,
567  const OUString& i_rHelpId);
568 
570  static css::uno::Any setSubgroupControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
571  const UIControlOptions& i_rControlOptions = UIControlOptions());
572 
574  static css::uno::Any setBoolControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
575  const OUString& i_rProperty, bool i_bValue,
576  const UIControlOptions& i_rControlOptions = UIControlOptions());
577 
579  static css::uno::Any setChoiceListControlOpt( const OUString& i_rID, const OUString& i_rTitle,
580  const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rProperty,
581  const css::uno::Sequence< OUString >& i_rChoices, sal_Int32 i_nValue,
582  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
583  const UIControlOptions& i_rControlOptions = UIControlOptions());
584 
586  static css::uno::Any setChoiceRadiosControlOpt( const css::uno::Sequence< OUString >& i_rIDs,
587  const OUString& i_rTitle, const css::uno::Sequence< OUString >& i_rHelpId,
588  const OUString& i_rProperty, const css::uno::Sequence< OUString >& i_rChoices,
589  sal_Int32 i_nValue,
590  const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
591  const UIControlOptions& i_rControlOptions = UIControlOptions());
592 
597  static css::uno::Any setRangeControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
598  const OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue,
599  sal_Int32 i_nMaxValue, const UIControlOptions& i_rControlOptions);
600 
605  static css::uno::Any setEditControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
606  const OUString& i_rProperty, const OUString& i_rValue,
607  const UIControlOptions& i_rControlOptions);
608 }; // class PrinterOptionsHelper
609 
610 } // namespace vcl
611 
612 
613 #endif // INCLUDED_VCL_PRINT_HXX
614 
615 /* 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:519
bool mbJobActive
Definition: print.hxx:87
virtual void SetWaveLineColors(Color const &rColor, tools::Long nLineWidth)
Definition: textline.cxx:146
bool CanSubsampleBitmap() const override
Definition: print.hxx:133
virtual tools::Long GetGradientStepCount(tools::Long nMinRect)
const OUString & GetName() const
Definition: print.hxx:193
Size aSize
In 100th mm.
Definition: print.hxx:349
SalGraphics * mpJobGraphics
Definition: print.hxx:71
virtual bool DrawTransformBitmapExDirect(const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx, double fAlpha=1.0)
Transform and draw a bitmap directly.
Definition: bitmapex.cxx:294
virtual bool UsePolyPolygonForComplexGradient()=0
bool IsDisplayPrinter() const
Definition: print.hxx:196
JobSetup maJobSetup
Definition: print.hxx:79
virtual Color GetMonochromeButtonColor() override
Definition: print.hxx:142
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
Definition: print.hxx:492
Size maPaperSize
Definition: print.hxx:81
PrinterCapType
Definition: prntypes.hxx:71
PageSize(const Size &i_rSize=Size(21000, 29700), bool i_bFullPaper=false)
Definition: print.hxx:354
friend class Printer
Definition: outdev.hxx:177
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool) override
Definition: print.hxx:186
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
long Long
std::vector< css::beans::PropertyValue > m_aUIProperties
Definition: print.hxx:494
const JobSetup & GetJobSetup() const
Definition: print.hxx:203
void SetSinglePrintJobs(bool bSinglePrintJobs)
Definition: print.hxx:257
sal_Int64 getIntValue(const char *i_pPropName, sal_Int64 i_nDefault) const
Definition: print.hxx:524
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
const vcl::printer::Options & GetPrinterOptions() const
Definition: print.hxx:220
std::unique_ptr< SalPrinter > mpPrinter
Definition: print.hxx:70
PrinterSetupMode
Definition: prntypes.hxx:85
virtual void DrawDeviceMask(const Bitmap &rMask, const Color &rMaskColor, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
Definition: mask.cxx:112
void SetMapMode()
Definition: map.cxx:649
OUString getStringValue(const char *i_pPropName) const
Definition: print.hxx:529
Point GetPageOffset() const
Definition: print.hxx:252
bool IsDefPrinter() const
Definition: print.hxx:195
bool mbCollateCopy
Definition: print.hxx:88
VclPtr< Printer > mpNext
Definition: print.hxx:73
std::vector< css::beans::PropertyValue > maAddProps
Definition: print.hxx:538
DuplexMode
Definition: prntypes.hxx:28
sal_uInt16 mnPageQueueSize
Definition: print.hxx:83
void DrawBorder(tools::Rectangle aBorderRect) override
Definition: print.hxx:146
virtual void SetSystemTextColor(SystemTextColorFlags nFlags, bool bEnabled)
Definition: text.cxx:2568
bool shouldDrawWavePixelAsRect(tools::Long) const override
Definition: print.hxx:174
virtual Size GetWaveLineSize(tools::Long nLineWidth) const
Definition: textline.cxx:167
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
SystemTextColorFlags
const Size & GetPaperSizePixel() const
Definition: print.hxx:248
std::unique_ptr< ImplPrinterControllerData > mpImplData
Definition: print.hxx:318
bool IsJobActive() const
Definition: print.hxx:262
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:51
Point maPageOffset
Definition: print.hxx:80
VclPtr< VirtualDevice > mpDisplayDev
Definition: print.hxx:74
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
Definition: outdev.cxx:550
virtual void EmulateDrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
void SetLineColor()
Definition: line.cxx:36
void SetPrinterOptions(const vcl::printer::Options &rOptions, bool bFile)
virtual tools::Rectangle GetBackgroundComponentBounds() const
Definition: outdev.cxx:656
virtual void dispose() override
Definition: outdev.cxx:146
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
const OUString & GetDriverName() const
Definition: print.hxx:194
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
virtual bool HasMirroredGraphics() const
Definition: outdev.cxx:719
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:175
bool IsValid() const
Definition: print.hxx:197
bool mbPrinting
Definition: print.hxx:86
virtual void DrawDeviceBitmapEx(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
Definition: bitmapex.cxx:167
UIControlOptions(const OUString &i_rDependsOnName=OUString(), sal_Int32 i_nDependsOnEntry=-1, bool i_bAttachToDependency=false)
Definition: print.hxx:544
bool mbNewJobSetup
Definition: print.hxx:91
Paper
OUString maDriver
Definition: print.hxx:77
sal_uInt16 GetCopyCount() const
Definition: print.hxx:255
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
Color GetReadableFontColor(const Color &, const Color &) const override
Definition: print.hxx:210
bool mbDefPrinter
Definition: print.hxx:85
PrinterOptionsHelper()
Create without ui properties.
Definition: print.hxx:499
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1164
sal_Int32 getPageCount(const uno::Reference< frame::XModel > &xModel)
bool IsPrinting() const
Definition: print.hxx:260
const Point & GetPageOffsetPixel() const
Definition: print.hxx:251
bool mbSinglePrintJobs
Definition: print.hxx:92
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
VclPtr< Printer > mpPrev
Definition: print.hxx:72
bool mbPrintFile
Definition: print.hxx:89
ErrCode mnError
Definition: print.hxx:82
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
OUString maPrinterName
Definition: print.hxx:76
sal_uInt16 mnCopyCount
Definition: print.hxx:84
std::unique_ptr< vcl::printer::Options > mpPrinterOptions
Definition: print.hxx:75
Orientation
Definition: prntypes.hxx:31
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:428
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
Definition: outdev.cxx:433
virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const
Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the value...
SalInfoPrinter * mpInfoPrinter
Definition: print.hxx:69
PrinterSupport
#define VCL_DLLPRIVATE
Definition: dllapi.h:31
virtual bool TransformAndReduceBitmapExToTargetRange(const basegfx::B2DHomMatrix &aFullTransform, basegfx::B2DRange &aVisibleRange, double &fMaximumArea)
Transform and reduce the area that needs to be drawn of the bitmap and return the new visible range a...
Definition: bitmapex.cxx:342
OutputDevice & operator=(const OutputDevice &)=delete
bool mbInPrintPage
Definition: print.hxx:90
NupOrderType
Definition: print.hxx:310
bool bFullPaper
Full paper, not only imageable area is printed.
Definition: print.hxx:352
bool IsCollateCopy() const
Definition: print.hxx:256
virtual void ImplReleaseFonts()
bool IsScreenComp() const override
Definition: print.hxx:144
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
DrawModeFlags
virtual css::awt::DeviceInfo GetDeviceInfo() const
Definition: outdev.cxx:750
OUString maPrintFile
Definition: print.hxx:78
Color GetBackgroundColor() const override
Definition: print.hxx:209
SalPrinterError
Definition: salptype.hxx:41
bool IsSinglePrintJobs() const
Definition: print.hxx:258
bool m_bDetectedRangeSegmentation false
Size GetPaperSize() const
Definition: print.hxx:249