1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_PRINT_HXX
21 #define INCLUDED_VCL_PRINT_HXX
23 #include <sal/config.h>
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>
31 #include <vcl/dllapi.h>
33 #include <vcl/PrinterSupport.hxx>
34 #include <comphelper/errcode.hxx>
35 #include <vcl/outdev.hxx>
36 #include <vcl/prntypes.hxx>
37 #include <vcl/region.hxx>
38 #include <vcl/jobset.hxx>
40 #include <com/sun/star/beans/PropertyValue.hpp>
41 #include <com/sun/star/uno/Sequence.hxx>
42 #include <com/sun/star/view/PrintableState.hpp>
45 #include <unordered_map>
49 struct SalPrinterQueueInfo
;
53 enum class SalPrinterError
;
56 class PrinterController
;
63 namespace weld
{ class Window
; }
65 class VCL_DLLPUBLIC Printer
: public OutputDevice
67 friend class ::OutputDevice
;
70 SalInfoPrinter
* mpInfoPrinter
;
71 std::unique_ptr
<SalPrinter
> mpPrinter
;
72 SalGraphics
* mpJobGraphics
;
73 VclPtr
<Printer
> mpPrev
;
74 VclPtr
<Printer
> mpNext
;
75 VclPtr
<VirtualDevice
> mpDisplayDev
;
76 std::unique_ptr
<vcl::printer::Options
> mpPrinterOptions
;
77 OUString maPrinterName
;
85 sal_uInt16 mnPageQueueSize
;
86 sal_uInt16 mnCopyCount
;
94 bool mbSinglePrintJobs
;
95 bool mbUsePrintSetting
;
97 VCL_DLLPRIVATE
void ImplInitData();
98 VCL_DLLPRIVATE
void ImplInit( SalPrinterQueueInfo
* pInfo
);
99 VCL_DLLPRIVATE
void ImplInitDisplay();
100 VCL_DLLPRIVATE
static SalPrinterQueueInfo
*
101 ImplGetQueueInfo( const OUString
& rPrinterName
, const OUString
* pDriver
);
102 VCL_DLLPRIVATE
void ImplUpdatePageData();
103 VCL_DLLPRIVATE
void ImplUpdateFontList();
104 VCL_DLLPRIVATE
void ImplFindPaperFormatForUserSize( JobSetup
& );
106 VCL_DLLPRIVATE
bool StartJob( const OUString
& rJobName
, std::shared_ptr
<vcl::PrinterController
> const & );
108 static VCL_DLLPRIVATE ErrCode
109 ImplSalPrinterErrorCodeToVCL( SalPrinterError nError
);
111 SAL_DLLPRIVATE
void ImplPrintTransparent (
113 const Point
& rDestPt
, const Size
& rDestSize
,
114 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
);
117 VCL_DLLPRIVATE
void EndJob();
118 Printer( const Printer
& rPrinter
) = delete;
119 Printer
& operator =( const Printer
& rPrinter
) = delete;
122 VCL_DLLPRIVATE
void ImplStartPage();
123 VCL_DLLPRIVATE
void ImplEndPage();
126 virtual bool AcquireGraphics() const override
;
127 virtual void ReleaseGraphics( bool bRelease
= true ) override
;
128 void ImplReleaseGraphics(bool bRelease
= true);
129 virtual void ImplReleaseFonts() override
;
131 virtual tools::Long
GetGradientStepCount( tools::Long nMinRect
) override
;
132 virtual bool UsePolyPolygonForComplexGradient() override
;
133 virtual void ClipAndDrawGradientMetafile ( const Gradient
&rGradient
,
134 const tools::PolyPolygon
&rPolyPoly
) override
;
136 bool CanSubsampleBitmap() const override
{ return false; }
137 vcl::Region
ClipToDeviceBounds(vcl::Region aRegion
) const override
;
140 void SetSystemTextColor(SystemTextColorFlags
, bool) override
;
141 void DrawGradientEx( OutputDevice
* pOut
, const tools::Rectangle
& rRect
,
142 const Gradient
& rGradient
);
143 virtual Bitmap
GetBitmap( const Point
& rSrcPt
, const Size
& rSize
) const override
;
144 virtual Size
GetButtonBorderSize() override
;
145 virtual Color
GetMonochromeButtonColor() override
{ return COL_LIGHTGRAY
; }
147 bool IsScreenComp() const override
{ return false; }
149 void DrawBorder(tools::Rectangle aBorderRect
) override
151 SetLineColor(COL_BLACK
);
152 DrawRect(aBorderRect
);
155 css::awt::DeviceInfo
GetDeviceInfo() const override
;
158 virtual void DrawDeviceMask( const Bitmap
& rMask
, const Color
& rMaskColor
,
159 const Point
& rDestPt
, const Size
& rDestSize
,
160 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
) override
;
162 bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix
& aFullTransform
,
163 const BitmapEx
& rBitmapEx
, double fAlpha
= 1.0) override
;
165 bool TransformAndReduceBitmapExToTargetRange( const basegfx::B2DHomMatrix
& aFullTransform
,
166 basegfx::B2DRange
&aVisibleRange
, double &fMaximumArea
) override
;
168 void DrawDeviceBitmapEx( const Point
& rDestPt
, const Size
& rDestSize
,
169 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
,
170 BitmapEx
& rBitmapEx
) override
;
172 virtual void EmulateDrawTransparent( const tools::PolyPolygon
& rPolyPoly
,
173 sal_uInt16 nTransparencePercent
) override
;
175 virtual void SetFontOrientation( LogicalFontInstance
* const pFontInstance
) const override
;
177 bool shouldDrawWavePixelAsRect(tools::Long
) const override
{ return true; }
178 void SetWaveLineColors(Color
const& rColor
, tools::Long
) override
;
179 Size
GetWaveLineSize(tools::Long nLineWidth
) const override
;
183 Printer( const JobSetup
& rJobSetup
);
184 Printer( const QueueInfo
& rQueueInfo
);
185 Printer( const OUString
& rPrinterName
);
186 virtual ~Printer() override
;
187 virtual void dispose() override
;
189 virtual void SetMetafileMapMode(const MapMode
& rNewMapMode
, bool) override
{ SetMapMode(rNewMapMode
); }
191 static const std::vector
< OUString
>&
193 static const QueueInfo
* GetQueueInfo( const OUString
& rPrinterName
, bool bStatusUpdate
);
194 static OUString
GetDefaultPrinterName();
196 const OUString
& GetName() const { return maPrinterName
; }
197 const OUString
& GetDriverName() const { return maDriver
; }
198 bool IsDefPrinter() const { return mbDefPrinter
; }
199 bool IsDisplayPrinter() const { return mpDisplayDev
!= nullptr; }
200 bool IsValid() const { return !IsDisplayPrinter(); }
202 sal_uInt32
GetCapabilities( PrinterCapType nType
) const;
203 bool HasSupport( PrinterSupport eFeature
) const;
205 bool SetJobSetup( const JobSetup
& rSetup
);
206 const JobSetup
& GetJobSetup() const { return maJobSetup
; }
208 bool Setup(weld::Window
* pWindow
,
209 PrinterSetupMode eMode
= PrinterSetupMode::DocumentGlobal
);
210 bool SetPrinterProps( const Printer
* pPrinter
);
212 Color
GetBackgroundColor() const override
{ return COL_WHITE
; }
213 Color
GetReadableFontColor(const Color
&, const Color
&) const override
{ return COL_BLACK
; }
215 /** SetPrinterOptions is used internally only now
217 in earlier times it was used only to set the options loaded directly from the configuration
218 in SfxPrinter::InitJob, this is now handled internally
219 should the need arise to set the printer options outside vcl, also a method would have to be devised
220 to not override these again internally
222 VCL_DLLPRIVATE
void SetPrinterOptions( const vcl::printer::Options
& rOptions
);
223 const vcl::printer::Options
& GetPrinterOptions() const { return( *mpPrinterOptions
); }
225 void SetUsePrintDialogSetting(bool bUsed
) { mbUsePrintSetting
= bUsed
; }
226 bool IsUsePrintDialogSetting() { return mbUsePrintSetting
; }
227 void SetPrintPageSize(Size aPrintPageSize
) { maPrintPageSize
= aPrintPageSize
; }
228 Size
GetPrintPageSize() { return maPrintPageSize
; }
229 bool SetOrientation( Orientation eOrient
);
230 Orientation
GetOrientation() const;
231 void SetDuplexMode( DuplexMode
);
232 DuplexMode
GetDuplexMode() const;
234 bool SetPaperBin( sal_uInt16 nPaperBin
);
235 sal_uInt16
GetPaperBin() const;
236 sal_uInt16
GetPaperBinBySourceIndex(sal_uInt16 nPaperSource
) const;
237 void SetPaper( Paper ePaper
);
238 bool SetPaperSizeUser( const Size
& rSize
);
239 /** @return The paper format of the printer's current "jobsetup". Note that if PAPER_USER the actual size can be anything. */
240 Paper
GetPaper() const;
241 /** @return Size of the paper of the printer's current "jobsetup". */
242 Size
GetSizeOfPaper() const;
243 static OUString
GetPaperName( Paper ePaper
);
245 /** @return Number of available paper formats */
246 int GetPaperInfoCount() const;
248 /** @return Info about paper format nPaper */
249 const PaperInfo
& GetPaperInfo( int nPaper
) const;
250 sal_uInt16
GetPaperBinCount() const;
251 OUString
GetPaperBinName( sal_uInt16 nPaperBin
) const;
253 bool GetPrinterSettingsPreferred() const;
254 void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup
);
256 const Size
& GetPaperSizePixel() const { return maPaperSize
; }
257 Size
GetPaperSize() const { return PixelToLogic( maPaperSize
); }
258 Size
GetPaperSize( int nPaper
) const;
259 const Point
& GetPageOffsetPixel() const { return maPageOffset
; }
260 Point
GetPageOffset() const { return PixelToLogic( maPageOffset
); }
262 void SetCopyCount( sal_uInt16 nCopy
, bool bCollate
);
263 sal_uInt16
GetCopyCount() const { return mnCopyCount
; }
264 bool IsCollateCopy() const { return mbCollateCopy
; }
265 void SetSinglePrintJobs(bool bSinglePrintJobs
) { mbSinglePrintJobs
= bSinglePrintJobs
; }
266 bool IsSinglePrintJobs() const { return mbSinglePrintJobs
; }
268 bool IsPrinting() const { return mbPrinting
; }
270 bool IsJobActive() const { return mbJobActive
; }
272 /** Checks the printer list and updates it necessary
274 sends a DataChanged event of type DataChangedEventType::PRINTER if the printer list changed
276 static void updatePrinters();
278 /** Execute a print job
280 starts a print job asynchronously that is will return
282 static void PrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
,
283 const JobSetup
& i_rInitSetup
);
285 virtual bool HasMirroredGraphics() const override
;
287 virtual void DrawOutDev( const Point
& rDestPt
, const Size
& rDestSize
,
288 const Point
& rSrcPt
, const Size
& rSrcSize
) override
;
290 virtual void DrawOutDev( const Point
& rDestPt
, const Size
& rDestSize
,
291 const Point
& rSrcPt
, const Size
& rSrcSize
,
292 const OutputDevice
& rOutDev
) override
;
294 virtual void CopyArea( const Point
& rDestPt
, const Point
& rSrcPt
,
295 const Size
& rSrcSize
, bool bWindowInvalidate
= false ) override
;
297 virtual tools::Rectangle
GetBackgroundComponentBounds() const override
;
299 // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
300 // by repeated calls to ExecutePrintJob(). Used by mailmerge.
301 static bool PreparePrintJob( std::shared_ptr
<vcl::PrinterController
> i_pController
,
302 const JobSetup
& i_rInitSetup
);
303 static bool ExecutePrintJob(const std::shared_ptr
<vcl::PrinterController
>& i_pController
);
304 static void FinishPrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
);
306 /** Implementation detail of PrintJob being asynchronous
308 not exported, not usable outside vcl
310 static void VCL_DLLPRIVATE
ImplPrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
,
311 const JobSetup
& i_rInitSetup
);
316 class ImplPrinterControllerData
;
318 enum class NupOrderType
320 LRTB
, TBLR
, TBRL
, RLTB
323 class VCL_DLLPUBLIC PrinterController
325 std::unique_ptr
<ImplPrinterControllerData
>
328 PrinterController(const VclPtr
<Printer
>&, weld::Window
* pDialogParent
);
330 struct MultiPageSetup
332 // all metrics in 100th mm
336 tools::Long nLeftMargin
;
337 tools::Long nTopMargin
;
338 tools::Long nRightMargin
;
339 tools::Long nBottomMargin
;
340 tools::Long nHorizontalSpacing
;
341 tools::Long nVerticalSpacing
;
346 : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
347 , nLeftMargin( 0 ), nTopMargin( 0 )
348 , nRightMargin( 0 ), nBottomMargin( 0 )
349 , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
350 , bDrawBorder( false )
351 , nOrder( NupOrderType::LRTB
) {}
359 /// Full paper, not only imageable area is printed
362 PageSize( const Size
& i_rSize
= Size( 21000, 29700 ),
363 bool i_bFullPaper
= false)
364 : aSize( i_rSize
), bFullPaper( i_bFullPaper
) {}
367 virtual ~PrinterController();
369 const VclPtr
<Printer
>& getPrinter() const;
370 weld::Window
* getWindow() const;
372 /** For implementations: get current job properties as changed by e.g. print dialog
374 this gets the current set of properties initially told to Printer::PrintJob
376 For convenience a second sequence will be merged in to get a combined sequence.
377 In case of duplicate property names, the value of i_MergeList wins.
379 css::uno::Sequence
< css::beans::PropertyValue
>
380 getJobProperties(const css::uno::Sequence
< css::beans::PropertyValue
>& i_rMergeList
) const;
382 /// Get the PropertyValue of a Property
383 css::beans::PropertyValue
* getValue( const OUString
& i_rPropertyName
);
384 const css::beans::PropertyValue
* getValue( const OUString
& i_rPropertyName
) const;
386 /** Get a bool property
388 in case the property is unknown or not convertible to bool, i_bFallback is returned
390 bool getBoolProperty( const OUString
& i_rPropertyName
, bool i_bFallback
) const;
392 /** Get an int property
394 in case the property is unknown or not convertible to bool, i_nFallback is returned
396 sal_Int32
getIntProperty( const OUString
& i_rPropertyName
, sal_Int32 i_nFallback
) const;
398 /// Set a property value - can also be used to add another UI property
399 void setValue( const OUString
& i_rPropertyName
, const css::uno::Any
& i_rValue
);
400 void setValue( const css::beans::PropertyValue
& i_rValue
);
402 /** @return The currently active UI options. These are the same that were passed to setUIOptions. */
403 const css::uno::Sequence
< css::beans::PropertyValue
>&
404 getUIOptions() const;
406 /** Set possible UI options.
408 should only be done once before passing the PrinterListener to Printer::PrintJob
410 void setUIOptions( const css::uno::Sequence
< css::beans::PropertyValue
>& );
412 /// Enable/disable an option; this can be used to implement dialog logic.
413 bool isUIOptionEnabled( const OUString
& rPropName
) const;
414 bool isUIChoiceEnabled( const OUString
& rPropName
, sal_Int32 nChoice
) const;
416 /** MakeEnabled will change the property rPropName depends on to the value
418 that makes rPropName enabled. If the dependency itself is also disabled,
419 no action will be performed.
421 @return The property name rPropName depends on or an empty string if no change was made.
423 OUString
makeEnabled( const OUString
& rPropName
);
425 /// App must override this
426 virtual int getPageCount() const = 0;
428 /** Get the page parameters
430 namely the jobsetup that should be active for the page
431 (describing among others the physical page size) and the "page size". In writer
432 case this would probably be the same as the JobSetup since writer sets the page size
433 draw/impress for example print their page on the paper set on the printer,
434 possibly adjusting the page size to fit. That means the page size can be different from
437 App must override this
439 @return Page size in 1/100th mm
441 virtual css::uno::Sequence
< css::beans::PropertyValue
>
442 getPageParameters( int i_nPage
) const = 0;
443 /// App must override this
444 virtual void printPage(int i_nPage
) const = 0;
446 /// Will be called after a possible dialog has been shown and the real printjob starts
447 virtual void jobStarted();
448 virtual void jobFinished( css::view::PrintableState
);
450 css::view::PrintableState
getJobState() const;
454 bool isShowDialogs() const;
455 bool isDirectPrint() const;
457 void dialogsParentClosing();
459 // implementation details, not usable outside vcl
460 // don't use outside vcl. Some of these are exported for
461 // the benefit of vcl's plugins.
462 // Still: DO NOT USE OUTSIDE VCL
463 int getFilteredPageCount() const;
464 VCL_DLLPRIVATE PageSize
getPageFile( int i_inUnfilteredPage
, GDIMetaFile
& rMtf
,
465 bool i_bMayUseCache
= false );
466 PageSize
getFilteredPageFile( int i_nFilteredPage
, GDIMetaFile
& o_rMtf
,
467 bool i_bMayUseCache
= false );
468 void printFilteredPage( int i_nPage
);
469 VCL_DLLPRIVATE
void setPrinter( const VclPtr
<Printer
>& );
470 void createProgressDialog();
471 bool isProgressCanceled() const;
472 VCL_DLLPRIVATE
void setMultipage( const MultiPageSetup
& );
473 VCL_DLLPRIVATE
const MultiPageSetup
&
474 getMultipage() const;
475 void setLastPage( bool i_bLastPage
);
476 VCL_DLLPRIVATE
void setReversePrint( bool i_bReverse
);
477 VCL_DLLPRIVATE
void setPapersizeFromSetup( bool i_bPapersizeFromSetup
);
478 VCL_DLLPRIVATE
bool getPapersizeFromSetup() const;
479 VCL_DLLPRIVATE
void setPaperSizeFromUser( Size i_aUserSize
);
480 VCL_DLLPRIVATE
void setOrientationFromUser( Orientation eOrientation
, bool set
);
481 void setPrinterModified( bool i_bPapersizeFromSetup
);
482 bool getPrinterModified() const;
483 VCL_DLLPRIVATE
void pushPropertiesToPrinter();
484 VCL_DLLPRIVATE
void resetPaperToLastConfigured();
485 void setJobState( css::view::PrintableState
);
486 VCL_DLLPRIVATE
void setupPrinter( weld::Window
* i_pDlgParent
);
488 VCL_DLLPRIVATE
int getPageCountProtected() const;
489 VCL_DLLPRIVATE
css::uno::Sequence
< css::beans::PropertyValue
>
490 getPageParametersProtected( int i_nPage
) const;
492 VCL_DLLPRIVATE DrawModeFlags
removeTransparencies( GDIMetaFile
const & i_rIn
, GDIMetaFile
& o_rOut
);
493 VCL_DLLPRIVATE
void resetPrinterOptions( bool i_bFileOutput
);
496 class VCL_DLLPUBLIC PrinterOptionsHelper
499 std::unordered_map
< OUString
, css::uno::Any
>
501 std::vector
< css::beans::PropertyValue
>
506 /// Create without ui properties
507 PrinterOptionsHelper() {}
509 /** Process a new set of properties
511 merges changed properties and returns "true" if any occurred
513 bool processProperties( const css::uno::Sequence
< css::beans::PropertyValue
>& i_rNewProp
);
515 /** Append to a sequence of property values the ui property sequence passed at creation
517 as the "ExtraPrintUIOptions" property. if that sequence was empty, no "ExtraPrintUIOptions" property
520 void appendPrintUIOptions( css::uno::Sequence
< css::beans::PropertyValue
>& io_rProps
) const;
522 /** @return An empty Any for not existing properties */
523 css::uno::Any
getValue( const OUString
& i_rPropertyName
) const;
525 bool getBoolValue( const OUString
& i_rPropertyName
, bool i_bDefault
) const;
526 // convenience for fixed strings
527 bool getBoolValue( const char* i_pPropName
, bool i_bDefault
= false ) const
528 { return getBoolValue( OUString::createFromAscii( i_pPropName
), i_bDefault
); }
530 sal_Int64
getIntValue( const OUString
& i_rPropertyName
, sal_Int64 i_nDefault
) const;
531 // convenience for fixed strings
532 sal_Int64
getIntValue( const char* i_pPropName
, sal_Int64 i_nDefault
) const
533 { return getIntValue( OUString::createFromAscii( i_pPropName
), i_nDefault
); }
535 OUString
getStringValue( const OUString
& i_rPropertyName
) const;
536 // convenience for fixed strings
537 OUString
getStringValue( const char* i_pPropName
) const
538 { return getStringValue( OUString::createFromAscii( i_pPropName
) ); }
540 // helper functions for user to create a single control
541 struct UIControlOptions
543 OUString maDependsOnName
;
544 OUString maGroupHint
;
545 std::vector
< css::beans::PropertyValue
>
547 sal_Int32 mnDependsOnEntry
;
548 bool mbAttachToDependency
;
552 UIControlOptions( OUString i_DependsOnName
= OUString(),
553 sal_Int32 i_nDependsOnEntry
= -1, bool i_bAttachToDependency
= false)
554 : maDependsOnName(std::move( i_DependsOnName
))
555 , mnDependsOnEntry( i_nDependsOnEntry
)
556 , mbAttachToDependency( i_bAttachToDependency
)
557 , mbInternalOnly( false )
558 , mbEnabled( true ) {}
561 // note: in the following helper functions HelpIds are expected as an OUString
562 // the normal HelpId form is OString (byte string instead of UTF16 string)
563 // this is because the whole interface is base on UNO properties; in fact the structures
564 // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
565 // transported via UTF16 strings.
567 /// Show general control
568 static css::uno::Any
setUIControlOpt( const css::uno::Sequence
< OUString
>& i_rIDs
, const OUString
& i_rTitle
,
569 const css::uno::Sequence
< OUString
>& i_rHelpId
, const OUString
& i_rType
,
570 const css::beans::PropertyValue
* i_pValue
= nullptr,
571 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
573 /// Show and set the title of a TagPage of id i_rID
574 static css::uno::Any
setGroupControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
,
575 const OUString
& i_rHelpId
);
577 /// Show and set the label of a VclFrame of id i_rID
578 static css::uno::Any
setSubgroupControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
579 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
581 /// Show a bool option as a checkbox
582 static css::uno::Any
setBoolControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
583 const OUString
& i_rProperty
, bool i_bValue
,
584 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
586 /// Show a set of choices in a list box
587 static css::uno::Any
setChoiceListControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
,
588 const css::uno::Sequence
< OUString
>& i_rHelpId
, const OUString
& i_rProperty
,
589 const css::uno::Sequence
< OUString
>& i_rChoices
, sal_Int32 i_nValue
,
590 const css::uno::Sequence
< sal_Bool
>& i_rDisabledChoices
= css::uno::Sequence
< sal_Bool
>(),
591 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
593 /// Show a set of choices as radio buttons
594 static css::uno::Any
setChoiceRadiosControlOpt( const css::uno::Sequence
< OUString
>& i_rIDs
,
595 const OUString
& i_rTitle
, const css::uno::Sequence
< OUString
>& i_rHelpId
,
596 const OUString
& i_rProperty
, const css::uno::Sequence
< OUString
>& i_rChoices
,
598 const css::uno::Sequence
< sal_Bool
>& i_rDisabledChoices
= css::uno::Sequence
< sal_Bool
>(),
599 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
601 /** Show an integer range (e.g. a spin field)
603 note: max value < min value means do not apply min/max values
605 static css::uno::Any
setRangeControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
606 const OUString
& i_rProperty
, sal_Int32 i_nValue
, sal_Int32 i_nMinValue
,
607 sal_Int32 i_nMaxValue
, const UIControlOptions
& i_rControlOptions
);
609 /** Show a string field
611 note: max value < min value means do not apply min/max values
613 static css::uno::Any
setEditControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
614 const OUString
& i_rProperty
, const OUString
& i_rValue
,
615 const UIControlOptions
& i_rControlOptions
);
616 }; // class PrinterOptionsHelper
621 #endif // INCLUDED_VCL_PRINT_HXX
623 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */