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 <config_options.h>
26 
27 #include <sal/types.h>
28 #include <rtl/ustring.hxx>
29 #include <tools/gen.hxx>
30 #include <tools/long.hxx>
31 #include <i18nutil/paper.hxx>
32 
33 #include <vcl/dllapi.h>
34 #include <vcl/PrinterSupport.hxx>
35 #include <vcl/errcode.hxx>
36 #include <vcl/outdev.hxx>
37 #include <vcl/prntypes.hxx>
38 #include <vcl/region.hxx>
39 #include <vcl/jobset.hxx>
40 
41 #include <com/sun/star/beans/PropertyValue.hpp>
42 #include <com/sun/star/uno/Sequence.hxx>
43 #include <com/sun/star/view/PrintableState.hpp>
44 
45 #include <memory>
46 #include <unordered_map>
47 
48 class GDIMetaFile;
49 class SalInfoPrinter;
50 struct SalPrinterQueueInfo;
51 class QueueInfo;
52 class SalPrinter;
53 class VirtualDevice;
54 enum class SalPrinterError;
55 
56 namespace vcl {
57  class PrinterController;
58 
59  namespace printer {
60  class Options;
61  }
62 }
63 
64 namespace weld { class Window; }
65 
67 {
68  friend class ::OutputDevice;
69 
70 private:
72  std::unique_ptr<SalPrinter> mpPrinter;
77  std::unique_ptr<vcl::printer::Options> mpPrinterOptions;
78  OUString maPrinterName;
79  OUString maDriver;
80  OUString maPrintFile;
85  sal_uInt16 mnPageQueueSize;
86  sal_uInt16 mnCopyCount;
88  bool mbPrinting;
95 
96  VCL_DLLPRIVATE void ImplInitData();
97  VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
98  VCL_DLLPRIVATE void ImplInitDisplay();
100  ImplGetQueueInfo( const OUString& rPrinterName, const OUString* pDriver );
101  VCL_DLLPRIVATE void ImplUpdatePageData();
102  VCL_DLLPRIVATE void ImplUpdateFontList();
103  VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
104 
105  VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController> const & );
106 
107  static VCL_DLLPRIVATE ErrCode
108  ImplSalPrinterErrorCodeToVCL( SalPrinterError nError );
109 
110  SAL_DLLPRIVATE void ImplPrintTransparent (
111  const Bitmap& rBmp, const Bitmap& rMask,
112  const Point& rDestPt, const Size& rDestSize,
113  const Point& rSrcPtPixel, const Size& rSrcSizePixel );
114 
115 private:
116  VCL_DLLPRIVATE void EndJob();
117  Printer( const Printer& rPrinter ) = delete;
118  Printer& operator =( const Printer& rPrinter ) = delete;
119 
120 public:
121  VCL_DLLPRIVATE void ImplStartPage();
122  VCL_DLLPRIVATE void ImplEndPage();
123 
124 protected:
125  virtual bool AcquireGraphics() const override;
126  virtual void ReleaseGraphics( bool bRelease = true ) override;
127  virtual void ImplReleaseFonts() override;
128 
129  virtual tools::Long GetGradientStepCount( tools::Long nMinRect ) override;
130  virtual bool UsePolyPolygonForComplexGradient() override;
131  virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient,
132  const tools::PolyPolygon &rPolyPoly ) override;
133 
134  bool CanSubsampleBitmap() const override { return false; }
135  vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const override;
136 
137 public:
138  void SetSystemTextColor(SystemTextColorFlags, bool) override;
139  void DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect,
140  const Gradient& rGradient );
141  virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override;
142  virtual Size GetButtonBorderSize() override;
143  virtual Color GetMonochromeButtonColor() override { return COL_LIGHTGRAY; }
144 
145  bool IsScreenComp() const override { return false; }
146 
147  void DrawBorder(tools::Rectangle aBorderRect) override
148  {
150  DrawRect(aBorderRect);
151  }
152 
153  css::awt::DeviceInfo GetDeviceInfo() const override;
154 
155 protected:
156  virtual void DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
157  const Point& rDestPt, const Size& rDestSize,
158  const Point& rSrcPtPixel, const Size& rSrcSizePixel) override;
159 
160  bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix& aFullTransform,
161  const BitmapEx& rBitmapEx, double fAlpha = 1.0) override;
162 
164  basegfx::B2DRange &aVisibleRange, double &fMaximumArea) override;
165 
166  void DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize,
167  const Point& rSrcPtPixel, const Size& rSrcSizePixel,
168  BitmapEx& rBitmapEx ) override;
169 
170  virtual void EmulateDrawTransparent( const tools::PolyPolygon& rPolyPoly,
171  sal_uInt16 nTransparencePercent ) override;
172 
173  virtual void SetFontOrientation( LogicalFontInstance* const pFontInstance ) const override;
174 
175  bool shouldDrawWavePixelAsRect(tools::Long) const override { return true; }
176  void SetWaveLineColors(Color const& rColor, tools::Long) override;
177  Size GetWaveLineSize(tools::Long nLineWidth) const override;
178 
179 public:
180  Printer();
181  Printer( const JobSetup& rJobSetup );
182  Printer( const QueueInfo& rQueueInfo );
183  Printer( const OUString& rPrinterName );
184  virtual ~Printer() override;
185  virtual void dispose() override;
186 
187  virtual void SetMetafileMapMode(const MapMode& rNewMapMode, bool) override { SetMapMode(rNewMapMode); }
188 
189  static const std::vector< OUString >&
190  GetPrinterQueues();
191  static const QueueInfo* GetQueueInfo( const OUString& rPrinterName, bool bStatusUpdate );
192  static OUString GetDefaultPrinterName();
193 
194  const OUString& GetName() const { return maPrinterName; }
195  const OUString& GetDriverName() const { return maDriver; }
196  bool IsDefPrinter() const { return mbDefPrinter; }
197  bool IsDisplayPrinter() const { return mpDisplayDev != nullptr; }
198  bool IsValid() const { return !IsDisplayPrinter(); }
199 
200  sal_uInt32 GetCapabilities( PrinterCapType nType ) const;
201  bool HasSupport( PrinterSupport eFeature ) const;
202 
203  bool SetJobSetup( const JobSetup& rSetup );
204  const JobSetup& GetJobSetup() const { return maJobSetup; }
205 
206  bool Setup(weld::Window* pWindow,
208  bool SetPrinterProps( const Printer* pPrinter );
209 
210  Color GetBackgroundColor() const override { return COL_WHITE; }
211  Color GetReadableFontColor(const Color&, const Color&) const override { return COL_BLACK; }
212 
220  VCL_DLLPRIVATE void SetPrinterOptions( const vcl::printer::Options& rOptions );
221  const vcl::printer::Options& GetPrinterOptions() const { return( *mpPrinterOptions ); }
222 
223  bool SetOrientation( Orientation eOrient );
224  Orientation GetOrientation() const;
225  void SetDuplexMode( DuplexMode );
226  DuplexMode GetDuplexMode() const;
227 
228  bool SetPaperBin( sal_uInt16 nPaperBin );
229  sal_uInt16 GetPaperBin() const;
230  void SetPaper( Paper ePaper );
231  bool SetPaperSizeUser( const Size& rSize );
232  Paper GetPaper() const;
233  static OUString GetPaperName( Paper ePaper );
234 
236  int GetPaperInfoCount() const;
237 
239  const PaperInfo& GetPaperInfo( int nPaper ) const;
240  sal_uInt16 GetPaperBinCount() const;
241  OUString GetPaperBinName( sal_uInt16 nPaperBin ) const;
242 
243  bool GetPrinterSettingsPreferred() const;
244  void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup );
245 
246  const Size& GetPaperSizePixel() const { return maPaperSize; }
247  Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
248  Size GetPaperSize( int nPaper );
249  const Point& GetPageOffsetPixel() const { return maPageOffset; }
250  Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
251 
252  void SetCopyCount( sal_uInt16 nCopy, bool bCollate );
253  sal_uInt16 GetCopyCount() const { return mnCopyCount; }
254  bool IsCollateCopy() const { return mbCollateCopy; }
255  void SetSinglePrintJobs(bool bSinglePrintJobs) { mbSinglePrintJobs = bSinglePrintJobs; }
256  bool IsSinglePrintJobs() const { return mbSinglePrintJobs; }
257 
258  bool IsPrinting() const { return mbPrinting; }
259 
260  bool IsJobActive() const { return mbJobActive; }
261 
266  static void updatePrinters();
267 
272  static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
273  const JobSetup& i_rInitSetup );
274 
275  virtual bool HasMirroredGraphics() const override;
276 
277  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
278  const Point& rSrcPt, const Size& rSrcSize ) override;
279 
280  virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
281  const Point& rSrcPt, const Size& rSrcSize,
282  const OutputDevice& rOutDev ) override;
283 
284  virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
285  const Size& rSrcSize, bool bWindowInvalidate = false ) override;
286 
287  virtual tools::Rectangle GetBackgroundComponentBounds() const override;
288 
289  // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
290  // by repeated calls to ExecutePrintJob(). Used by mailmerge.
291  static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
292  const JobSetup& i_rInitSetup );
293  static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController);
294  static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
295 
300  static void VCL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
301  const JobSetup& i_rInitSetup );
302 };
303 
304 namespace vcl
305 {
306 class ImplPrinterControllerData;
307 
308 enum class NupOrderType
309 {
310  LRTB, TBLR, TBRL, RLTB
311 };
312 
314 {
315  std::unique_ptr<ImplPrinterControllerData>
317 protected:
318  PrinterController(const VclPtr<Printer>&, weld::Window* pDialogParent);
319 public:
321  {
322  // all metrics in 100th mm
323  int nRows;
324  int nColumns;
334 
336  : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
337  , nLeftMargin( 0 ), nTopMargin( 0 )
338  , nRightMargin( 0 ), nBottomMargin( 0 )
339  , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
340  , bDrawBorder( false )
341  , nOrder( NupOrderType::LRTB ) {}
342  };
343 
344  struct PageSize
345  {
348 
351 
352  PageSize( const Size& i_rSize = Size( 21000, 29700 ),
353  bool i_bFullPaper = false)
354  : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
355  };
356 
357  virtual ~PrinterController();
358 
359  const VclPtr<Printer>& getPrinter() const;
360  weld::Window* getWindow() const;
361 
369  css::uno::Sequence< css::beans::PropertyValue >
370  getJobProperties(const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
371 
373  css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
374  const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
375 
380  bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
381 
386  sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
387 
389  void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
390  void setValue( const css::beans::PropertyValue& i_rValue );
391 
393  const css::uno::Sequence< css::beans::PropertyValue >&
394  getUIOptions() const;
395 
400  void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
401 
403  bool isUIOptionEnabled( const OUString& rPropName ) const;
404  bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
405 
413  OUString makeEnabled( const OUString& rPropName );
414 
416  virtual int getPageCount() const = 0;
417 
431  virtual css::uno::Sequence< css::beans::PropertyValue >
432  getPageParameters( int i_nPage ) const = 0;
434  virtual void printPage(int i_nPage) const = 0;
435 
437  virtual void jobStarted();
438  virtual void jobFinished( css::view::PrintableState );
439 
440  css::view::PrintableState getJobState() const;
441 
442  void abortJob();
443 
444  bool isShowDialogs() const;
445  bool isDirectPrint() const;
446 
447  void dialogsParentClosing();
448 
449  // implementation details, not usable outside vcl
450  // don't use outside vcl. Some of these are exported for
451  // the benefit of vcl's plugins.
452  // Still: DO NOT USE OUTSIDE VCL
453  int getFilteredPageCount() const;
454  VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
455  bool i_bMayUseCache = false );
456  PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
457  bool i_bMayUseCache = false );
458  void printFilteredPage( int i_nPage );
459  VCL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
460  void createProgressDialog();
461  bool isProgressCanceled() const;
462  VCL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
463  VCL_DLLPRIVATE const MultiPageSetup&
464  getMultipage() const;
465  void setLastPage( bool i_bLastPage );
466  VCL_DLLPRIVATE void setReversePrint( bool i_bReverse );
467  VCL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
468  VCL_DLLPRIVATE bool getPapersizeFromSetup() const;
469  VCL_DLLPRIVATE Size& getPaperSizeSetup() const;
470  VCL_DLLPRIVATE void setPaperSizeFromUser( Size i_aUserSize );
471  VCL_DLLPRIVATE Size& getPaperSizeFromUser() const;
472  VCL_DLLPRIVATE bool isPaperSizeFromUser() const;
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:89
virtual void SetWaveLineColors(Color const &rColor, tools::Long nLineWidth)
Definition: textline.cxx:146
bool CanSubsampleBitmap() const override
Definition: print.hxx:134
virtual tools::Long GetGradientStepCount(tools::Long nMinRect)
const OUString & GetName() const
Definition: print.hxx:194
Size aSize
In 100th mm.
Definition: print.hxx:347
SalGraphics * mpJobGraphics
Definition: print.hxx:73
virtual bool DrawTransformBitmapExDirect(const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx, double fAlpha=1.0)
Transform and draw a bitmap directly.
Definition: bitmapex.cxx:276
virtual bool UsePolyPolygonForComplexGradient()=0
bool IsDisplayPrinter() const
Definition: print.hxx:197
JobSetup maJobSetup
Definition: print.hxx:81
virtual Color GetMonochromeButtonColor() override
Definition: print.hxx:143
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
Definition: print.hxx:492
Size maPaperSize
Definition: print.hxx:83
PrinterCapType
Definition: prntypes.hxx:71
PageSize(const Size &i_rSize=Size(21000, 29700), bool i_bFullPaper=false)
Definition: print.hxx:352
friend class Printer
Definition: outdev.hxx:170
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool) override
Definition: print.hxx:187
#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:204
void SetSinglePrintJobs(bool bSinglePrintJobs)
Definition: print.hxx:255
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:221
std::unique_ptr< SalPrinter > mpPrinter
Definition: print.hxx:72
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:102
void SetMapMode()
Definition: map.cxx:592
OUString getStringValue(const char *i_pPropName) const
Definition: print.hxx:529
Point GetPageOffset() const
Definition: print.hxx:250
bool IsDefPrinter() const
Definition: print.hxx:196
bool mbCollateCopy
Definition: print.hxx:90
VclPtr< Printer > mpNext
Definition: print.hxx:75
std::vector< css::beans::PropertyValue > maAddProps
Definition: print.hxx:538
DuplexMode
Definition: prntypes.hxx:28
sal_uInt16 mnPageQueueSize
Definition: print.hxx:85
void DrawBorder(tools::Rectangle aBorderRect) override
Definition: print.hxx:147
virtual void SetSystemTextColor(SystemTextColorFlags nFlags, bool bEnabled)
Definition: text.cxx:2423
bool shouldDrawWavePixelAsRect(tools::Long) const override
Definition: print.hxx:175
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:246
std::unique_ptr< ImplPrinterControllerData > mpImplData
Definition: print.hxx:316
bool IsJobActive() const
Definition: print.hxx:260
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:51
Point maPageOffset
Definition: print.hxx:82
VclPtr< VirtualDevice > mpDisplayDev
Definition: print.hxx:76
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
Definition: outdev.cxx:530
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:636
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:195
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
virtual bool HasMirroredGraphics() const
Definition: outdev.cxx:699
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:168
bool IsValid() const
Definition: print.hxx:198
bool mbPrinting
Definition: print.hxx:88
virtual void DrawDeviceBitmapEx(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
Definition: bitmapex.cxx:149
UIControlOptions(const OUString &i_rDependsOnName=OUString(), sal_Int32 i_nDependsOnEntry=-1, bool i_bAttachToDependency=false)
Definition: print.hxx:544
bool mbNewJobSetup
Definition: print.hxx:93
Paper
OUString maDriver
Definition: print.hxx:79
sal_uInt16 GetCopyCount() const
Definition: print.hxx:253
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
Color GetReadableFontColor(const Color &, const Color &) const override
Definition: print.hxx:211
bool mbDefPrinter
Definition: print.hxx:87
PrinterOptionsHelper()
Create without ui properties.
Definition: print.hxx:499
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1107
sal_Int32 getPageCount(const uno::Reference< frame::XModel > &xModel)
bool IsPrinting() const
Definition: print.hxx:258
const Point & GetPageOffsetPixel() const
Definition: print.hxx:249
bool mbSinglePrintJobs
Definition: print.hxx:94
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:74
bool mbPrintFile
Definition: print.hxx:91
ErrCode mnError
Definition: print.hxx:84
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
OUString maPrinterName
Definition: print.hxx:78
sal_uInt16 mnCopyCount
Definition: print.hxx:86
std::unique_ptr< vcl::printer::Options > mpPrinterOptions
Definition: print.hxx:77
Orientation
Definition: prntypes.hxx:31
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:418
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
Definition: outdev.cxx:413
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:71
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:324
OutputDevice & operator=(const OutputDevice &)=delete
bool mbInPrintPage
Definition: print.hxx:92
NupOrderType
Definition: print.hxx:308
bool bFullPaper
Full paper, not only imageable area is printed.
Definition: print.hxx:350
bool IsCollateCopy() const
Definition: print.hxx:254
virtual void ImplReleaseFonts()
bool IsScreenComp() const override
Definition: print.hxx:145
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
DrawModeFlags
virtual css::awt::DeviceInfo GetDeviceInfo() const
Definition: outdev.cxx:789
OUString maPrintFile
Definition: print.hxx:80
Color GetBackgroundColor() const override
Definition: print.hxx:210
SalPrinterError
Definition: salptype.hxx:41
bool IsSinglePrintJobs() const
Definition: print.hxx:256
Size GetPaperSize() const
Definition: print.hxx:247