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 <utility>
35#include <vcl/outdev.hxx>
36#include <vcl/prntypes.hxx>
37#include <vcl/region.hxx>
38#include <vcl/jobset.hxx>
39
40#include <com/sun/star/beans/PropertyValue.hpp>
41#include <com/sun/star/uno/Sequence.hxx>
42#include <com/sun/star/view/PrintableState.hpp>
43
44#include <memory>
45#include <unordered_map>
46
47class GDIMetaFile;
48class SalInfoPrinter;
50class QueueInfo;
51class SalPrinter;
52class VirtualDevice;
53enum class SalPrinterError;
54
55namespace vcl {
56 class PrinterController;
57
58 namespace printer {
59 class Options;
60 }
61}
62
63namespace weld { class Window; }
64
66{
67 friend class ::OutputDevice;
68
69private:
71 std::unique_ptr<SalPrinter> mpPrinter;
76 std::unique_ptr<vcl::printer::Options> mpPrinterOptions;
77 OUString maPrinterName;
78 OUString maDriver;
79 OUString maPrintFile;
84 sal_uInt16 mnPageQueueSize;
85 sal_uInt16 mnCopyCount;
94
95 VCL_DLLPRIVATE void ImplInitData();
96 VCL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
97 VCL_DLLPRIVATE void ImplInitDisplay();
99 ImplGetQueueInfo( const OUString& rPrinterName, const OUString* pDriver );
100 VCL_DLLPRIVATE void ImplUpdatePageData();
101 VCL_DLLPRIVATE void ImplUpdateFontList();
102 VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup& );
103
104 VCL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController> const & );
105
107 ImplSalPrinterErrorCodeToVCL( SalPrinterError nError );
108
109 SAL_DLLPRIVATE void ImplPrintTransparent (
110 const Bitmap& rBmp, const Bitmap& rMask,
111 const Point& rDestPt, const Size& rDestSize,
112 const Point& rSrcPtPixel, const Size& rSrcSizePixel );
113
114private:
115 VCL_DLLPRIVATE void EndJob();
116 Printer( const Printer& rPrinter ) = delete;
117 Printer& operator =( const Printer& rPrinter ) = delete;
118
119public:
120 VCL_DLLPRIVATE void ImplStartPage();
121 VCL_DLLPRIVATE void ImplEndPage();
122
123protected:
124 virtual bool AcquireGraphics() const override;
125 virtual void ReleaseGraphics( bool bRelease = true ) override;
126 void ImplReleaseGraphics(bool bRelease = true);
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
137public:
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
155protected:
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
179public:
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 );
233 Paper GetPaper() const;
235 Size GetSizeOfPaper() const;
236 static OUString GetPaperName( Paper ePaper );
237
239 int GetPaperInfoCount() const;
240
242 const PaperInfo& GetPaperInfo( int nPaper ) const;
243 sal_uInt16 GetPaperBinCount() const;
244 OUString GetPaperBinName( sal_uInt16 nPaperBin ) const;
245
246 bool GetPrinterSettingsPreferred() const;
247 void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup );
248
249 const Size& GetPaperSizePixel() const { return maPaperSize; }
250 Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
251 Size GetPaperSize( int nPaper ) const;
252 const Point& GetPageOffsetPixel() const { return maPageOffset; }
253 Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
254
255 void SetCopyCount( sal_uInt16 nCopy, bool bCollate );
256 sal_uInt16 GetCopyCount() const { return mnCopyCount; }
257 bool IsCollateCopy() const { return mbCollateCopy; }
258 void SetSinglePrintJobs(bool bSinglePrintJobs) { mbSinglePrintJobs = bSinglePrintJobs; }
259 bool IsSinglePrintJobs() const { return mbSinglePrintJobs; }
260
261 bool IsPrinting() const { return mbPrinting; }
262
263 bool IsJobActive() const { return mbJobActive; }
264
269 static void updatePrinters();
270
275 static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
276 const JobSetup& i_rInitSetup );
277
278 virtual bool HasMirroredGraphics() const override;
279
280 virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
281 const Point& rSrcPt, const Size& rSrcSize ) override;
282
283 virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
284 const Point& rSrcPt, const Size& rSrcSize,
285 const OutputDevice& rOutDev ) override;
286
287 virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt,
288 const Size& rSrcSize, bool bWindowInvalidate = false ) override;
289
290 virtual tools::Rectangle GetBackgroundComponentBounds() const override;
291
292 // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
293 // by repeated calls to ExecutePrintJob(). Used by mailmerge.
294 static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController,
295 const JobSetup& i_rInitSetup );
296 static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController);
297 static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController );
298
303 static void VCL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController,
304 const JobSetup& i_rInitSetup );
305};
306
307namespace vcl
308{
309class ImplPrinterControllerData;
310
311enum class NupOrderType
312{
313 LRTB, TBLR, TBRL, RLTB
314};
315
317{
318 std::unique_ptr<ImplPrinterControllerData>
320protected:
321 PrinterController(const VclPtr<Printer>&, weld::Window* pDialogParent);
322public:
324 {
325 // all metrics in 100th mm
326 int nRows;
337
339 : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
340 , nLeftMargin( 0 ), nTopMargin( 0 )
341 , nRightMargin( 0 ), nBottomMargin( 0 )
342 , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
343 , bDrawBorder( false )
344 , nOrder( NupOrderType::LRTB ) {}
345 };
346
347 struct PageSize
348 {
351
354
355 PageSize( const Size& i_rSize = Size( 21000, 29700 ),
356 bool i_bFullPaper = false)
357 : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {}
358 };
359
360 virtual ~PrinterController();
361
362 const VclPtr<Printer>& getPrinter() const;
363 weld::Window* getWindow() const;
364
372 css::uno::Sequence< css::beans::PropertyValue >
373 getJobProperties(const css::uno::Sequence< css::beans::PropertyValue >& i_rMergeList ) const;
374
376 css::beans::PropertyValue* getValue( const OUString& i_rPropertyName );
377 const css::beans::PropertyValue* getValue( const OUString& i_rPropertyName ) const;
378
383 bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const;
384
389 sal_Int32 getIntProperty( const OUString& i_rPropertyName, sal_Int32 i_nFallback ) const;
390
392 void setValue( const OUString& i_rPropertyName, const css::uno::Any& i_rValue );
393 void setValue( const css::beans::PropertyValue& i_rValue );
394
396 const css::uno::Sequence< css::beans::PropertyValue >&
397 getUIOptions() const;
398
403 void setUIOptions( const css::uno::Sequence< css::beans::PropertyValue >& );
404
406 bool isUIOptionEnabled( const OUString& rPropName ) const;
407 bool isUIChoiceEnabled( const OUString& rPropName, sal_Int32 nChoice ) const;
408
416 OUString makeEnabled( const OUString& rPropName );
417
419 virtual int getPageCount() const = 0;
420
434 virtual css::uno::Sequence< css::beans::PropertyValue >
435 getPageParameters( int i_nPage ) const = 0;
437 virtual void printPage(int i_nPage) const = 0;
438
440 virtual void jobStarted();
441 virtual void jobFinished( css::view::PrintableState );
442
443 css::view::PrintableState getJobState() const;
444
445 void abortJob();
446
447 bool isShowDialogs() const;
448 bool isDirectPrint() const;
449
450 void dialogsParentClosing();
451
452 // implementation details, not usable outside vcl
453 // don't use outside vcl. Some of these are exported for
454 // the benefit of vcl's plugins.
455 // Still: DO NOT USE OUTSIDE VCL
456 int getFilteredPageCount() const;
457 VCL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf,
458 bool i_bMayUseCache = false );
459 PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf,
460 bool i_bMayUseCache = false );
461 void printFilteredPage( int i_nPage );
462 VCL_DLLPRIVATE void setPrinter( const VclPtr<Printer>& );
463 void createProgressDialog();
464 bool isProgressCanceled() const;
465 VCL_DLLPRIVATE void setMultipage( const MultiPageSetup& );
467 getMultipage() const;
468 void setLastPage( bool i_bLastPage );
469 VCL_DLLPRIVATE void setReversePrint( bool i_bReverse );
470 VCL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup );
471 VCL_DLLPRIVATE bool getPapersizeFromSetup() const;
472 VCL_DLLPRIVATE void setPaperSizeFromUser( Size i_aUserSize );
473 VCL_DLLPRIVATE void setOrientationFromUser( Orientation eOrientation, bool set );
474 void setPrinterModified( bool i_bPapersizeFromSetup );
475 bool getPrinterModified() const;
476 VCL_DLLPRIVATE void pushPropertiesToPrinter();
477 VCL_DLLPRIVATE void resetPaperToLastConfigured();
478 void setJobState( css::view::PrintableState );
479 VCL_DLLPRIVATE void setupPrinter( weld::Window* i_pDlgParent );
480
481 VCL_DLLPRIVATE int getPageCountProtected() const;
482 VCL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue >
483 getPageParametersProtected( int i_nPage ) const;
484
485 VCL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile const & i_rIn, GDIMetaFile& o_rOut );
486 VCL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
487};
488
490{
491protected:
492 std::unordered_map< OUString, css::uno::Any >
494 std::vector< css::beans::PropertyValue >
496
497public:
498
501
506 bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp );
507
513 void appendPrintUIOptions( css::uno::Sequence< css::beans::PropertyValue >& io_rProps ) const;
514
516 css::uno::Any getValue( const OUString& i_rPropertyName ) const;
517
518 bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const;
519 // convenience for fixed strings
520 bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const
521 { return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); }
522
523 sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault ) const;
524 // convenience for fixed strings
525 sal_Int64 getIntValue( const char* i_pPropName, sal_Int64 i_nDefault ) const
526 { return getIntValue( OUString::createFromAscii( i_pPropName ), i_nDefault ); }
527
528 OUString getStringValue( const OUString& i_rPropertyName ) const;
529 // convenience for fixed strings
530 OUString getStringValue( const char* i_pPropName ) const
531 { return getStringValue( OUString::createFromAscii( i_pPropName ) ); }
532
533 // helper functions for user to create a single control
535 {
537 OUString maGroupHint;
538 std::vector< css::beans::PropertyValue >
544
545 UIControlOptions( OUString i_DependsOnName = OUString(),
546 sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false)
547 : maDependsOnName(std::move( i_DependsOnName ))
548 , mnDependsOnEntry( i_nDependsOnEntry )
549 , mbAttachToDependency( i_bAttachToDependency )
550 , mbInternalOnly( false )
551 , mbEnabled( true ) {}
552 };
553
554 // note: in the following helper functions HelpIds are expected as an OUString
555 // the normal HelpId form is OString (byte string instead of UTF16 string)
556 // this is because the whole interface is base on UNO properties; in fact the structures
557 // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
558 // transported via UTF16 strings.
559
561 static css::uno::Any setUIControlOpt( const css::uno::Sequence< OUString >& i_rIDs, const OUString& i_rTitle,
562 const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rType,
563 const css::beans::PropertyValue* i_pValue = nullptr,
564 const UIControlOptions& i_rControlOptions = UIControlOptions());
565
567 static css::uno::Any setGroupControlOpt( const OUString& i_rID, const OUString& i_rTitle,
568 const OUString& i_rHelpId);
569
571 static css::uno::Any setSubgroupControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
572 const UIControlOptions& i_rControlOptions = UIControlOptions());
573
575 static css::uno::Any setBoolControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
576 const OUString& i_rProperty, bool i_bValue,
577 const UIControlOptions& i_rControlOptions = UIControlOptions());
578
580 static css::uno::Any setChoiceListControlOpt( const OUString& i_rID, const OUString& i_rTitle,
581 const css::uno::Sequence< OUString >& i_rHelpId, const OUString& i_rProperty,
582 const css::uno::Sequence< OUString >& i_rChoices, sal_Int32 i_nValue,
583 const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
584 const UIControlOptions& i_rControlOptions = UIControlOptions());
585
587 static css::uno::Any setChoiceRadiosControlOpt( const css::uno::Sequence< OUString >& i_rIDs,
588 const OUString& i_rTitle, const css::uno::Sequence< OUString >& i_rHelpId,
589 const OUString& i_rProperty, const css::uno::Sequence< OUString >& i_rChoices,
590 sal_Int32 i_nValue,
591 const css::uno::Sequence< sal_Bool >& i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
592 const UIControlOptions& i_rControlOptions = UIControlOptions());
593
598 static css::uno::Any setRangeControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
599 const OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue,
600 sal_Int32 i_nMaxValue, const UIControlOptions& i_rControlOptions);
601
606 static css::uno::Any setEditControlOpt( const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId,
607 const OUString& i_rProperty, const OUString& i_rValue,
608 const UIControlOptions& i_rControlOptions);
609}; // class PrinterOptionsHelper
610
611} // namespace vcl
612
613
614#endif // INCLUDED_VCL_PRINT_HXX
615
616/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DrawModeFlags
PrinterSupport
SystemTextColorFlags
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:171
virtual css::awt::DeviceInfo GetDeviceInfo() const
Definition: outdev.cxx:735
virtual void DrawDeviceBitmapEx(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx)
Definition: bitmapex.cxx:167
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
OutputDevice & operator=(const OutputDevice &)=delete
virtual void dispose() override
Definition: outdev.cxx:145
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1169
void DrawRect(const tools::Rectangle &rRect)
Definition: rect.cxx:51
virtual void SetSystemTextColor(SystemTextColorFlags nFlags, bool bEnabled)
Definition: text.cxx:2537
void SetLineColor()
Definition: line.cxx:37
void SetMapMode()
Definition: map.cxx:654
virtual void ImplReleaseFonts()
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
Definition: outdev.cxx:418
virtual Size GetWaveLineSize(tools::Long nLineWidth) const
Definition: textline.cxx:167
virtual vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const
Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the value...
virtual bool UsePolyPolygonForComplexGradient()=0
virtual void SetWaveLineColors(Color const &rColor, tools::Long nLineWidth)
Definition: textline.cxx:146
virtual Size GetButtonBorderSize()
Definition: outdev.hxx:422
virtual void ClipAndDrawGradientMetafile(const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly)
virtual bool HasMirroredGraphics() const
Definition: outdev.cxx:704
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
virtual void CopyArea(const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false)
Definition: outdev.cxx:535
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
virtual tools::Long GetGradientStepCount(tools::Long nMinRect)
virtual bool DrawTransformBitmapExDirect(const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx, double fAlpha=1.0)
Transform and draw a bitmap directly.
Definition: bitmapex.cxx:294
friend class Printer
Definition: outdev.hxx:172
virtual void EmulateDrawTransparent(const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
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
virtual void SetFontOrientation(LogicalFontInstance *const pFontInstance) const
virtual tools::Rectangle GetBackgroundComponentBounds() const
Definition: outdev.cxx:641
Size maPaperSize
Definition: print.hxx:82
bool mbCollateCopy
Definition: print.hxx:89
OUString maPrintFile
Definition: print.hxx:79
virtual void SetMetafileMapMode(const MapMode &rNewMapMode, bool) override
Definition: print.hxx:187
void SetSinglePrintJobs(bool bSinglePrintJobs)
Definition: print.hxx:258
std::unique_ptr< vcl::printer::Options > mpPrinterOptions
Definition: print.hxx:76
bool IsSinglePrintJobs() const
Definition: print.hxx:259
sal_uInt16 mnCopyCount
Definition: print.hxx:85
bool mbJobActive
Definition: print.hxx:88
VclPtr< Printer > mpPrev
Definition: print.hxx:73
bool CanSubsampleBitmap() const override
Definition: print.hxx:134
Color GetReadableFontColor(const Color &, const Color &) const override
Definition: print.hxx:211
bool mbNewJobSetup
Definition: print.hxx:92
SalInfoPrinter * mpInfoPrinter
Definition: print.hxx:70
bool IsValid() const
Definition: print.hxx:198
bool IsJobActive() const
Definition: print.hxx:263
const Point & GetPageOffsetPixel() const
Definition: print.hxx:252
OUString maDriver
Definition: print.hxx:78
bool mbSinglePrintJobs
Definition: print.hxx:93
sal_uInt16 GetCopyCount() const
Definition: print.hxx:256
bool IsDefPrinter() const
Definition: print.hxx:196
bool mbDefPrinter
Definition: print.hxx:86
const OUString & GetDriverName() const
Definition: print.hxx:195
Point GetPageOffset() const
Definition: print.hxx:253
Size GetPaperSize() const
Definition: print.hxx:250
bool mbPrintFile
Definition: print.hxx:90
OUString maPrinterName
Definition: print.hxx:77
std::unique_ptr< SalPrinter > mpPrinter
Definition: print.hxx:71
bool mbPrinting
Definition: print.hxx:87
bool IsCollateCopy() const
Definition: print.hxx:257
sal_uInt16 mnPageQueueSize
Definition: print.hxx:84
bool IsPrinting() const
Definition: print.hxx:261
VclPtr< Printer > mpNext
Definition: print.hxx:74
Color GetBackgroundColor() const override
Definition: print.hxx:210
bool shouldDrawWavePixelAsRect(tools::Long) const override
Definition: print.hxx:175
const OUString & GetName() const
Definition: print.hxx:194
bool IsScreenComp() const override
Definition: print.hxx:145
Point maPageOffset
Definition: print.hxx:81
const Size & GetPaperSizePixel() const
Definition: print.hxx:249
const JobSetup & GetJobSetup() const
Definition: print.hxx:204
VclPtr< VirtualDevice > mpDisplayDev
Definition: print.hxx:75
const vcl::printer::Options & GetPrinterOptions() const
Definition: print.hxx:221
SalGraphics * mpJobGraphics
Definition: print.hxx:72
bool IsDisplayPrinter() const
Definition: print.hxx:197
Printer(const Printer &rPrinter)=delete
ErrCode mnError
Definition: print.hxx:83
void DrawBorder(tools::Rectangle aBorderRect) override
Definition: print.hxx:147
JobSetup maJobSetup
Definition: print.hxx:80
bool mbInPrintPage
Definition: print.hxx:91
virtual Color GetMonochromeButtonColor() override
Definition: print.hxx:143
virtual css::uno::Sequence< css::beans::PropertyValue > getPageParameters(int i_nPage) const =0
Get the page parameters.
std::unique_ptr< ImplPrinterControllerData > mpImplData
Definition: print.hxx:319
virtual int getPageCount() const =0
App must override this.
virtual void printPage(int i_nPage) const =0
App must override this.
OUString getStringValue(const char *i_pPropName) const
Definition: print.hxx:530
std::vector< css::beans::PropertyValue > m_aUIProperties
Definition: print.hxx:495
bool getBoolValue(const char *i_pPropName, bool i_bDefault=false) const
Definition: print.hxx:520
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
Definition: print.hxx:493
PrinterOptionsHelper()
Create without ui properties.
Definition: print.hxx:500
sal_Int64 getIntValue(const char *i_pPropName, sal_Int64 i_nDefault) const
Definition: print.hxx:525
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define VCL_DLLPRIVATE
Definition: dllapi.h:31
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
tools::Long const nRightMargin
tools::Long const nBottomMargin
tools::Long const nTopMargin
tools::Long const nLeftMargin
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
void SetPrinterOptions(const vcl::printer::Options &rOptions, bool bFile)
long Long
NupOrderType
Definition: print.hxx:312
Paper
DuplexMode
Definition: prntypes.hxx:28
PrinterSetupMode
Definition: prntypes.hxx:86
Orientation
Definition: prntypes.hxx:31
PrinterCapType
Definition: prntypes.hxx:72
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
SalPrinterError
Definition: salptype.hxx:41
bool bFullPaper
Full paper, not only imageable area is printed.
Definition: print.hxx:353
PageSize(const Size &i_rSize=Size(21000, 29700), bool i_bFullPaper=false)
Definition: print.hxx:355
UIControlOptions(OUString i_DependsOnName=OUString(), sal_Int32 i_nDependsOnEntry=-1, bool i_bAttachToDependency=false)
Definition: print.hxx:545
std::vector< css::beans::PropertyValue > maAddProps
Definition: print.hxx:539