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
;
84 sal_uInt16 mnPageQueueSize
;
85 sal_uInt16 mnCopyCount
;
93 bool mbSinglePrintJobs
;
95 VCL_DLLPRIVATE
void ImplInitData();
96 VCL_DLLPRIVATE
void ImplInit( SalPrinterQueueInfo
* pInfo
);
97 VCL_DLLPRIVATE
void ImplInitDisplay();
98 VCL_DLLPRIVATE
static SalPrinterQueueInfo
*
99 ImplGetQueueInfo( const OUString
& rPrinterName
, const OUString
* pDriver
);
100 VCL_DLLPRIVATE
void ImplUpdatePageData();
101 VCL_DLLPRIVATE
void ImplUpdateFontList();
102 VCL_DLLPRIVATE
void ImplFindPaperFormatForUserSize( JobSetup
& );
104 VCL_DLLPRIVATE
bool StartJob( const OUString
& rJobName
, std::shared_ptr
<vcl::PrinterController
> const & );
106 static VCL_DLLPRIVATE ErrCode
107 ImplSalPrinterErrorCodeToVCL( SalPrinterError nError
);
109 SAL_DLLPRIVATE
void ImplPrintTransparent (
111 const Point
& rDestPt
, const Size
& rDestSize
,
112 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
);
115 VCL_DLLPRIVATE
void EndJob();
116 Printer( const Printer
& rPrinter
) = delete;
117 Printer
& operator =( const Printer
& rPrinter
) = delete;
120 VCL_DLLPRIVATE
void ImplStartPage();
121 VCL_DLLPRIVATE
void ImplEndPage();
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
;
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
;
134 bool CanSubsampleBitmap() const override
{ return false; }
135 vcl::Region
ClipToDeviceBounds(vcl::Region aRegion
) const override
;
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
; }
145 bool IsScreenComp() const override
{ return false; }
147 void DrawBorder(tools::Rectangle aBorderRect
) override
149 SetLineColor(COL_BLACK
);
150 DrawRect(aBorderRect
);
153 css::awt::DeviceInfo
GetDeviceInfo() const override
;
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
;
160 bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix
& aFullTransform
,
161 const BitmapEx
& rBitmapEx
, double fAlpha
= 1.0) override
;
163 bool TransformAndReduceBitmapExToTargetRange( const basegfx::B2DHomMatrix
& aFullTransform
,
164 basegfx::B2DRange
&aVisibleRange
, double &fMaximumArea
) override
;
166 void DrawDeviceBitmapEx( const Point
& rDestPt
, const Size
& rDestSize
,
167 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
,
168 BitmapEx
& rBitmapEx
) override
;
170 virtual void EmulateDrawTransparent( const tools::PolyPolygon
& rPolyPoly
,
171 sal_uInt16 nTransparencePercent
) override
;
173 virtual void SetFontOrientation( LogicalFontInstance
* const pFontInstance
) const override
;
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
;
181 Printer( const JobSetup
& rJobSetup
);
182 Printer( const QueueInfo
& rQueueInfo
);
183 Printer( const OUString
& rPrinterName
);
184 virtual ~Printer() override
;
185 virtual void dispose() override
;
187 virtual void SetMetafileMapMode(const MapMode
& rNewMapMode
, bool) override
{ SetMapMode(rNewMapMode
); }
189 static const std::vector
< OUString
>&
191 static const QueueInfo
* GetQueueInfo( const OUString
& rPrinterName
, bool bStatusUpdate
);
192 static OUString
GetDefaultPrinterName();
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(); }
200 sal_uInt32
GetCapabilities( PrinterCapType nType
) const;
201 bool HasSupport( PrinterSupport eFeature
) const;
203 bool SetJobSetup( const JobSetup
& rSetup
);
204 const JobSetup
& GetJobSetup() const { return maJobSetup
; }
206 bool Setup(weld::Window
* pWindow
,
207 PrinterSetupMode eMode
= PrinterSetupMode::DocumentGlobal
);
208 bool SetPrinterProps( const Printer
* pPrinter
);
210 Color
GetBackgroundColor() const override
{ return COL_WHITE
; }
211 Color
GetReadableFontColor(const Color
&, const Color
&) const override
{ return COL_BLACK
; }
213 /** SetPrinterOptions is used internally only now
215 in earlier times it was used only to set the options loaded directly from the configuration
216 in SfxPrinter::InitJob, this is now handled internally
217 should the need arise to set the printer options outside vcl, also a method would have to be devised
218 to not override these again internally
220 VCL_DLLPRIVATE
void SetPrinterOptions( const vcl::printer::Options
& rOptions
);
221 const vcl::printer::Options
& GetPrinterOptions() const { return( *mpPrinterOptions
); }
223 bool SetOrientation( Orientation eOrient
);
224 Orientation
GetOrientation() const;
225 void SetDuplexMode( DuplexMode
);
226 DuplexMode
GetDuplexMode() const;
228 bool SetPaperBin( sal_uInt16 nPaperBin
);
229 sal_uInt16
GetPaperBin() const;
230 sal_uInt16
GetPaperBinBySourceIndex(sal_uInt16 nPaperSource
) const;
231 sal_uInt16
GetSourceIndexByPaperBin(sal_uInt16 nPaperBin
) const;
232 void SetPaper( Paper ePaper
);
233 bool SetPaperSizeUser( const Size
& rSize
);
234 /** @return The paper format of the printer's current "jobsetup". Note that if PAPER_USER the actual size can be anything. */
235 Paper
GetPaper() const;
236 /** @return Size of the paper of the printer's current "jobsetup". */
237 Size
GetSizeOfPaper() const;
238 static OUString
GetPaperName( Paper ePaper
);
240 /** @return Number of available paper formats */
241 int GetPaperInfoCount() const;
243 /** @return Info about paper format nPaper */
244 const PaperInfo
& GetPaperInfo( int nPaper
) const;
245 sal_uInt16
GetPaperBinCount() const;
246 OUString
GetPaperBinName( sal_uInt16 nPaperBin
) const;
248 bool GetPrinterSettingsPreferred() const;
249 void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup
);
251 const Size
& GetPaperSizePixel() const { return maPaperSize
; }
252 Size
GetPaperSize() const { return PixelToLogic( maPaperSize
); }
253 Size
GetPaperSize( int nPaper
) const;
254 const Point
& GetPageOffsetPixel() const { return maPageOffset
; }
255 Point
GetPageOffset() const { return PixelToLogic( maPageOffset
); }
257 void SetCopyCount( sal_uInt16 nCopy
, bool bCollate
);
258 sal_uInt16
GetCopyCount() const { return mnCopyCount
; }
259 bool IsCollateCopy() const { return mbCollateCopy
; }
260 void SetSinglePrintJobs(bool bSinglePrintJobs
) { mbSinglePrintJobs
= bSinglePrintJobs
; }
261 bool IsSinglePrintJobs() const { return mbSinglePrintJobs
; }
263 bool IsPrinting() const { return mbPrinting
; }
265 bool IsJobActive() const { return mbJobActive
; }
267 /** Checks the printer list and updates it necessary
269 sends a DataChanged event of type DataChangedEventType::PRINTER if the printer list changed
271 static void updatePrinters();
273 /** Execute a print job
275 starts a print job asynchronously that is will return
277 static void PrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
,
278 const JobSetup
& i_rInitSetup
);
280 virtual bool HasMirroredGraphics() const override
;
282 virtual void DrawOutDev( const Point
& rDestPt
, const Size
& rDestSize
,
283 const Point
& rSrcPt
, const Size
& rSrcSize
) override
;
285 virtual void DrawOutDev( const Point
& rDestPt
, const Size
& rDestSize
,
286 const Point
& rSrcPt
, const Size
& rSrcSize
,
287 const OutputDevice
& rOutDev
) override
;
289 virtual void CopyArea( const Point
& rDestPt
, const Point
& rSrcPt
,
290 const Size
& rSrcSize
, bool bWindowInvalidate
= false ) override
;
292 virtual tools::Rectangle
GetBackgroundComponentBounds() const override
;
294 // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
295 // by repeated calls to ExecutePrintJob(). Used by mailmerge.
296 static bool PreparePrintJob( std::shared_ptr
<vcl::PrinterController
> i_pController
,
297 const JobSetup
& i_rInitSetup
);
298 static bool ExecutePrintJob(const std::shared_ptr
<vcl::PrinterController
>& i_pController
);
299 static void FinishPrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
);
301 /** Implementation detail of PrintJob being asynchronous
303 not exported, not usable outside vcl
305 static void VCL_DLLPRIVATE
ImplPrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
,
306 const JobSetup
& i_rInitSetup
);
311 class ImplPrinterControllerData
;
313 enum class NupOrderType
315 LRTB
, TBLR
, TBRL
, RLTB
318 class VCL_DLLPUBLIC PrinterController
320 std::unique_ptr
<ImplPrinterControllerData
>
323 PrinterController(const VclPtr
<Printer
>&, weld::Window
* pDialogParent
);
325 struct MultiPageSetup
327 // all metrics in 100th mm
331 tools::Long nLeftMargin
;
332 tools::Long nTopMargin
;
333 tools::Long nRightMargin
;
334 tools::Long nBottomMargin
;
335 tools::Long nHorizontalSpacing
;
336 tools::Long nVerticalSpacing
;
341 : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
342 , nLeftMargin( 0 ), nTopMargin( 0 )
343 , nRightMargin( 0 ), nBottomMargin( 0 )
344 , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
345 , bDrawBorder( false )
346 , nOrder( NupOrderType::LRTB
) {}
354 /// Full paper, not only imageable area is printed
357 PageSize( const Size
& i_rSize
= Size( 21000, 29700 ),
358 bool i_bFullPaper
= false)
359 : aSize( i_rSize
), bFullPaper( i_bFullPaper
) {}
362 virtual ~PrinterController();
364 const VclPtr
<Printer
>& getPrinter() const;
365 weld::Window
* getWindow() const;
367 /** For implementations: get current job properties as changed by e.g. print dialog
369 this gets the current set of properties initially told to Printer::PrintJob
371 For convenience a second sequence will be merged in to get a combined sequence.
372 In case of duplicate property names, the value of i_MergeList wins.
374 css::uno::Sequence
< css::beans::PropertyValue
>
375 getJobProperties(const css::uno::Sequence
< css::beans::PropertyValue
>& i_rMergeList
) const;
377 /// Get the PropertyValue of a Property
378 css::beans::PropertyValue
* getValue( const OUString
& i_rPropertyName
);
379 const css::beans::PropertyValue
* getValue( const OUString
& i_rPropertyName
) const;
381 /** Get a bool property
383 in case the property is unknown or not convertible to bool, i_bFallback is returned
385 bool getBoolProperty( const OUString
& i_rPropertyName
, bool i_bFallback
) const;
387 /** Get an int property
389 in case the property is unknown or not convertible to bool, i_nFallback is returned
391 sal_Int32
getIntProperty( const OUString
& i_rPropertyName
, sal_Int32 i_nFallback
) const;
393 /// Set a property value - can also be used to add another UI property
394 void setValue( const OUString
& i_rPropertyName
, const css::uno::Any
& i_rValue
);
395 void setValue( const css::beans::PropertyValue
& i_rValue
);
397 /** @return The currently active UI options. These are the same that were passed to setUIOptions. */
398 const css::uno::Sequence
< css::beans::PropertyValue
>&
399 getUIOptions() const;
401 /** Set possible UI options.
403 should only be done once before passing the PrinterListener to Printer::PrintJob
405 void setUIOptions( const css::uno::Sequence
< css::beans::PropertyValue
>& );
407 /// Enable/disable an option; this can be used to implement dialog logic.
408 bool isUIOptionEnabled( const OUString
& rPropName
) const;
409 bool isUIChoiceEnabled( const OUString
& rPropName
, sal_Int32 nChoice
) const;
411 /** MakeEnabled will change the property rPropName depends on to the value
413 that makes rPropName enabled. If the dependency itself is also disabled,
414 no action will be performed.
416 @return The property name rPropName depends on or an empty string if no change was made.
418 OUString
makeEnabled( const OUString
& rPropName
);
420 /// App must override this
421 virtual int getPageCount() const = 0;
423 /** Get the page parameters
425 namely the jobsetup that should be active for the page
426 (describing among others the physical page size) and the "page size". In writer
427 case this would probably be the same as the JobSetup since writer sets the page size
428 draw/impress for example print their page on the paper set on the printer,
429 possibly adjusting the page size to fit. That means the page size can be different from
432 App must override this
434 @return Page size in 1/100th mm
436 virtual css::uno::Sequence
< css::beans::PropertyValue
>
437 getPageParameters( int i_nPage
) const = 0;
438 /// App must override this
439 virtual void printPage(int i_nPage
) const = 0;
441 /// Will be called after a possible dialog has been shown and the real printjob starts
442 virtual void jobStarted();
443 virtual void jobFinished( css::view::PrintableState
);
445 css::view::PrintableState
getJobState() const;
449 bool isShowDialogs() const;
450 bool isDirectPrint() const;
452 void dialogsParentClosing();
454 // implementation details, not usable outside vcl
455 // don't use outside vcl. Some of these are exported for
456 // the benefit of vcl's plugins.
457 // Still: DO NOT USE OUTSIDE VCL
458 int getFilteredPageCount() const;
459 VCL_DLLPRIVATE PageSize
getPageFile( int i_inUnfilteredPage
, GDIMetaFile
& rMtf
,
460 bool i_bMayUseCache
= false );
461 PageSize
getFilteredPageFile( int i_nFilteredPage
, GDIMetaFile
& o_rMtf
,
462 bool i_bMayUseCache
= false );
463 void printFilteredPage( int i_nPage
);
464 VCL_DLLPRIVATE
void setPrinter( const VclPtr
<Printer
>& );
465 void createProgressDialog();
466 bool isProgressCanceled() const;
467 VCL_DLLPRIVATE
void setMultipage( const MultiPageSetup
& );
468 VCL_DLLPRIVATE
const MultiPageSetup
&
469 getMultipage() const;
470 void setLastPage( bool i_bLastPage
);
471 VCL_DLLPRIVATE
void setReversePrint( bool i_bReverse
);
472 VCL_DLLPRIVATE
void setPapersizeFromSetup( bool i_bPapersizeFromSetup
);
473 VCL_DLLPRIVATE
bool getPapersizeFromSetup() const;
474 VCL_DLLPRIVATE
void setPaperSizeFromUser( Size i_aUserSize
);
475 VCL_DLLPRIVATE
void setOrientationFromUser( Orientation eOrientation
, bool set
);
476 void setPrinterModified( bool i_bPapersizeFromSetup
);
477 bool getPrinterModified() const;
478 VCL_DLLPRIVATE
void pushPropertiesToPrinter();
479 VCL_DLLPRIVATE
void resetPaperToLastConfigured();
480 void setJobState( css::view::PrintableState
);
481 VCL_DLLPRIVATE
void setupPrinter( weld::Window
* i_pDlgParent
);
483 VCL_DLLPRIVATE
int getPageCountProtected() const;
484 VCL_DLLPRIVATE
css::uno::Sequence
< css::beans::PropertyValue
>
485 getPageParametersProtected( int i_nPage
) const;
487 VCL_DLLPRIVATE DrawModeFlags
removeTransparencies( GDIMetaFile
const & i_rIn
, GDIMetaFile
& o_rOut
);
488 VCL_DLLPRIVATE
void resetPrinterOptions( bool i_bFileOutput
);
491 class VCL_DLLPUBLIC PrinterOptionsHelper
494 std::unordered_map
< OUString
, css::uno::Any
>
496 std::vector
< css::beans::PropertyValue
>
501 /// Create without ui properties
502 PrinterOptionsHelper() {}
504 /** Process a new set of properties
506 merges changed properties and returns "true" if any occurred
508 bool processProperties( const css::uno::Sequence
< css::beans::PropertyValue
>& i_rNewProp
);
510 /** Append to a sequence of property values the ui property sequence passed at creation
512 as the "ExtraPrintUIOptions" property. if that sequence was empty, no "ExtraPrintUIOptions" property
515 void appendPrintUIOptions( css::uno::Sequence
< css::beans::PropertyValue
>& io_rProps
) const;
517 /** @return An empty Any for not existing properties */
518 css::uno::Any
getValue( const OUString
& i_rPropertyName
) const;
520 bool getBoolValue( const OUString
& i_rPropertyName
, bool i_bDefault
) const;
521 // convenience for fixed strings
522 bool getBoolValue( const char* i_pPropName
, bool i_bDefault
= false ) const
523 { return getBoolValue( OUString::createFromAscii( i_pPropName
), i_bDefault
); }
525 sal_Int64
getIntValue( const OUString
& i_rPropertyName
, sal_Int64 i_nDefault
) const;
526 // convenience for fixed strings
527 sal_Int64
getIntValue( const char* i_pPropName
, sal_Int64 i_nDefault
) const
528 { return getIntValue( OUString::createFromAscii( i_pPropName
), i_nDefault
); }
530 OUString
getStringValue( const OUString
& i_rPropertyName
) const;
531 // convenience for fixed strings
532 OUString
getStringValue( const char* i_pPropName
) const
533 { return getStringValue( OUString::createFromAscii( i_pPropName
) ); }
535 // helper functions for user to create a single control
536 struct UIControlOptions
538 OUString maDependsOnName
;
539 OUString maGroupHint
;
540 std::vector
< css::beans::PropertyValue
>
542 sal_Int32 mnDependsOnEntry
;
543 bool mbAttachToDependency
;
547 UIControlOptions( OUString i_DependsOnName
= OUString(),
548 sal_Int32 i_nDependsOnEntry
= -1, bool i_bAttachToDependency
= false)
549 : maDependsOnName(std::move( i_DependsOnName
))
550 , mnDependsOnEntry( i_nDependsOnEntry
)
551 , mbAttachToDependency( i_bAttachToDependency
)
552 , mbInternalOnly( false )
553 , mbEnabled( true ) {}
556 // note: in the following helper functions HelpIds are expected as an OUString
557 // the normal HelpId form is OString (byte string instead of UTF16 string)
558 // this is because the whole interface is base on UNO properties; in fact the structures
559 // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
560 // transported via UTF16 strings.
562 /// Show general control
563 static css::uno::Any
setUIControlOpt( const css::uno::Sequence
< OUString
>& i_rIDs
, const OUString
& i_rTitle
,
564 const css::uno::Sequence
< OUString
>& i_rHelpId
, const OUString
& i_rType
,
565 const css::beans::PropertyValue
* i_pValue
= nullptr,
566 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
568 /// Show and set the title of a TagPage of id i_rID
569 static css::uno::Any
setGroupControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
,
570 const OUString
& i_rHelpId
);
572 /// Show and set the label of a VclFrame of id i_rID
573 static css::uno::Any
setSubgroupControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
574 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
576 /// Show a bool option as a checkbox
577 static css::uno::Any
setBoolControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
578 const OUString
& i_rProperty
, bool i_bValue
,
579 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
581 /// Show a set of choices in a list box
582 static css::uno::Any
setChoiceListControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
,
583 const css::uno::Sequence
< OUString
>& i_rHelpId
, const OUString
& i_rProperty
,
584 const css::uno::Sequence
< OUString
>& i_rChoices
, sal_Int32 i_nValue
,
585 const css::uno::Sequence
< sal_Bool
>& i_rDisabledChoices
= css::uno::Sequence
< sal_Bool
>(),
586 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
588 /// Show a set of choices as radio buttons
589 static css::uno::Any
setChoiceRadiosControlOpt( const css::uno::Sequence
< OUString
>& i_rIDs
,
590 const OUString
& i_rTitle
, const css::uno::Sequence
< OUString
>& i_rHelpId
,
591 const OUString
& i_rProperty
, const css::uno::Sequence
< OUString
>& i_rChoices
,
593 const css::uno::Sequence
< sal_Bool
>& i_rDisabledChoices
= css::uno::Sequence
< sal_Bool
>(),
594 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
596 /** Show an integer range (e.g. a spin field)
598 note: max value < min value means do not apply min/max values
600 static css::uno::Any
setRangeControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
601 const OUString
& i_rProperty
, sal_Int32 i_nValue
, sal_Int32 i_nMinValue
,
602 sal_Int32 i_nMaxValue
, const UIControlOptions
& i_rControlOptions
);
604 /** Show a string field
606 note: max value < min value means do not apply min/max values
608 static css::uno::Any
setEditControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
609 const OUString
& i_rProperty
, const OUString
& i_rValue
,
610 const UIControlOptions
& i_rControlOptions
);
611 }; // class PrinterOptionsHelper
616 #endif // INCLUDED_VCL_PRINT_HXX
618 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */