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 <config_options.h>
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>
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>
41 #include <com/sun/star/beans/PropertyValue.hpp>
42 #include <com/sun/star/uno/Sequence.hxx>
43 #include <com/sun/star/view/PrintableState.hpp>
46 #include <unordered_map>
50 struct SalPrinterQueueInfo
;
54 enum class SalPrinterError
;
57 class PrinterController
;
64 namespace weld
{ class Window
; }
66 class VCL_DLLPUBLIC Printer
: public OutputDevice
68 friend class ::OutputDevice
;
71 SalInfoPrinter
* mpInfoPrinter
;
72 std::unique_ptr
<SalPrinter
> mpPrinter
;
73 SalGraphics
* mpJobGraphics
;
74 VclPtr
<Printer
> mpPrev
;
75 VclPtr
<Printer
> mpNext
;
76 VclPtr
<VirtualDevice
> mpDisplayDev
;
77 std::unique_ptr
<vcl::printer::Options
> mpPrinterOptions
;
78 OUString maPrinterName
;
85 sal_uInt16 mnPageQueueSize
;
86 sal_uInt16 mnCopyCount
;
94 bool mbSinglePrintJobs
;
96 VCL_DLLPRIVATE
void ImplInitData();
97 VCL_DLLPRIVATE
void ImplInit( SalPrinterQueueInfo
* pInfo
);
98 VCL_DLLPRIVATE
void ImplInitDisplay();
99 VCL_DLLPRIVATE
static SalPrinterQueueInfo
*
100 ImplGetQueueInfo( const OUString
& rPrinterName
, const OUString
* pDriver
);
101 VCL_DLLPRIVATE
void ImplUpdatePageData();
102 VCL_DLLPRIVATE
void ImplUpdateFontList();
103 VCL_DLLPRIVATE
void ImplFindPaperFormatForUserSize( JobSetup
& );
105 VCL_DLLPRIVATE
bool StartJob( const OUString
& rJobName
, std::shared_ptr
<vcl::PrinterController
> const & );
107 static VCL_DLLPRIVATE ErrCode
108 ImplSalPrinterErrorCodeToVCL( SalPrinterError nError
);
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
);
116 VCL_DLLPRIVATE
void EndJob();
117 Printer( const Printer
& rPrinter
) = delete;
118 Printer
& operator =( const Printer
& rPrinter
) = delete;
121 VCL_DLLPRIVATE
void ImplStartPage();
122 VCL_DLLPRIVATE
void ImplEndPage();
125 virtual bool AcquireGraphics() const override
;
126 virtual void ReleaseGraphics( bool bRelease
= true ) override
;
127 void ImplReleaseGraphics(bool bRelease
= true);
128 virtual void ImplReleaseFonts() override
;
130 virtual tools::Long
GetGradientStepCount( tools::Long nMinRect
) override
;
131 virtual bool UsePolyPolygonForComplexGradient() override
;
132 virtual void ClipAndDrawGradientMetafile ( const Gradient
&rGradient
,
133 const tools::PolyPolygon
&rPolyPoly
) override
;
135 bool CanSubsampleBitmap() const override
{ return false; }
136 vcl::Region
ClipToDeviceBounds(vcl::Region aRegion
) const override
;
139 void SetSystemTextColor(SystemTextColorFlags
, bool) override
;
140 void DrawGradientEx( OutputDevice
* pOut
, const tools::Rectangle
& rRect
,
141 const Gradient
& rGradient
);
142 virtual Bitmap
GetBitmap( const Point
& rSrcPt
, const Size
& rSize
) const override
;
143 virtual Size
GetButtonBorderSize() override
;
144 virtual Color
GetMonochromeButtonColor() override
{ return COL_LIGHTGRAY
; }
146 bool IsScreenComp() const override
{ return false; }
148 void DrawBorder(tools::Rectangle aBorderRect
) override
150 SetLineColor(COL_BLACK
);
151 DrawRect(aBorderRect
);
154 css::awt::DeviceInfo
GetDeviceInfo() const override
;
157 virtual void DrawDeviceMask( const Bitmap
& rMask
, const Color
& rMaskColor
,
158 const Point
& rDestPt
, const Size
& rDestSize
,
159 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
) override
;
161 bool DrawTransformBitmapExDirect( const basegfx::B2DHomMatrix
& aFullTransform
,
162 const BitmapEx
& rBitmapEx
, double fAlpha
= 1.0) override
;
164 bool TransformAndReduceBitmapExToTargetRange( const basegfx::B2DHomMatrix
& aFullTransform
,
165 basegfx::B2DRange
&aVisibleRange
, double &fMaximumArea
) override
;
167 void DrawDeviceBitmapEx( const Point
& rDestPt
, const Size
& rDestSize
,
168 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
,
169 BitmapEx
& rBitmapEx
) override
;
171 virtual void EmulateDrawTransparent( const tools::PolyPolygon
& rPolyPoly
,
172 sal_uInt16 nTransparencePercent
) override
;
174 virtual void SetFontOrientation( LogicalFontInstance
* const pFontInstance
) const override
;
176 bool shouldDrawWavePixelAsRect(tools::Long
) const override
{ return true; }
177 void SetWaveLineColors(Color
const& rColor
, tools::Long
) override
;
178 Size
GetWaveLineSize(tools::Long nLineWidth
) const override
;
182 Printer( const JobSetup
& rJobSetup
);
183 Printer( const QueueInfo
& rQueueInfo
);
184 Printer( const OUString
& rPrinterName
);
185 virtual ~Printer() override
;
186 virtual void dispose() override
;
188 virtual void SetMetafileMapMode(const MapMode
& rNewMapMode
, bool) override
{ SetMapMode(rNewMapMode
); }
190 static const std::vector
< OUString
>&
192 static const QueueInfo
* GetQueueInfo( const OUString
& rPrinterName
, bool bStatusUpdate
);
193 static OUString
GetDefaultPrinterName();
195 const OUString
& GetName() const { return maPrinterName
; }
196 const OUString
& GetDriverName() const { return maDriver
; }
197 bool IsDefPrinter() const { return mbDefPrinter
; }
198 bool IsDisplayPrinter() const { return mpDisplayDev
!= nullptr; }
199 bool IsValid() const { return !IsDisplayPrinter(); }
201 sal_uInt32
GetCapabilities( PrinterCapType nType
) const;
202 bool HasSupport( PrinterSupport eFeature
) const;
204 bool SetJobSetup( const JobSetup
& rSetup
);
205 const JobSetup
& GetJobSetup() const { return maJobSetup
; }
207 bool Setup(weld::Window
* pWindow
,
208 PrinterSetupMode eMode
= PrinterSetupMode::DocumentGlobal
);
209 bool SetPrinterProps( const Printer
* pPrinter
);
211 Color
GetBackgroundColor() const override
{ return COL_WHITE
; }
212 Color
GetReadableFontColor(const Color
&, const Color
&) const override
{ return COL_BLACK
; }
214 /** SetPrinterOptions is used internally only now
216 in earlier times it was used only to set the options loaded directly from the configuration
217 in SfxPrinter::InitJob, this is now handled internally
218 should the need arise to set the printer options outside vcl, also a method would have to be devised
219 to not override these again internally
221 VCL_DLLPRIVATE
void SetPrinterOptions( const vcl::printer::Options
& rOptions
);
222 const vcl::printer::Options
& GetPrinterOptions() const { return( *mpPrinterOptions
); }
224 bool SetOrientation( Orientation eOrient
);
225 Orientation
GetOrientation() const;
226 void SetDuplexMode( DuplexMode
);
227 DuplexMode
GetDuplexMode() const;
229 bool SetPaperBin( sal_uInt16 nPaperBin
);
230 sal_uInt16
GetPaperBin() const;
231 void SetPaper( Paper ePaper
);
232 bool SetPaperSizeUser( const Size
& rSize
);
233 /** @return The paper format of the printer's current "jobsetup". Note that if PAPER_USER the actual size can be anything. */
234 Paper
GetPaper() const;
235 /** @return Size of the paper of the printer's current "jobsetup". */
236 Size
GetSizeOfPaper() const;
237 static OUString
GetPaperName( Paper ePaper
);
239 /** @return Number of available paper formats */
240 int GetPaperInfoCount() const;
242 /** @return Info about paper format nPaper */
243 const PaperInfo
& GetPaperInfo( int nPaper
) const;
244 sal_uInt16
GetPaperBinCount() const;
245 OUString
GetPaperBinName( sal_uInt16 nPaperBin
) const;
247 bool GetPrinterSettingsPreferred() const;
248 void SetPrinterSettingsPreferred( bool bPaperSizeFromSetup
);
250 const Size
& GetPaperSizePixel() const { return maPaperSize
; }
251 Size
GetPaperSize() const { return PixelToLogic( maPaperSize
); }
252 Size
GetPaperSize( int nPaper
) const;
253 const Point
& GetPageOffsetPixel() const { return maPageOffset
; }
254 Point
GetPageOffset() const { return PixelToLogic( maPageOffset
); }
256 void SetCopyCount( sal_uInt16 nCopy
, bool bCollate
);
257 sal_uInt16
GetCopyCount() const { return mnCopyCount
; }
258 bool IsCollateCopy() const { return mbCollateCopy
; }
259 void SetSinglePrintJobs(bool bSinglePrintJobs
) { mbSinglePrintJobs
= bSinglePrintJobs
; }
260 bool IsSinglePrintJobs() const { return mbSinglePrintJobs
; }
262 bool IsPrinting() const { return mbPrinting
; }
264 bool IsJobActive() const { return mbJobActive
; }
266 /** Checks the printer list and updates it necessary
268 sends a DataChanged event of type DataChangedEventType::PRINTER if the printer list changed
270 static void updatePrinters();
272 /** Execute a print job
274 starts a print job asynchronously that is will return
276 static void PrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
,
277 const JobSetup
& i_rInitSetup
);
279 virtual bool HasMirroredGraphics() const override
;
281 virtual void DrawOutDev( const Point
& rDestPt
, const Size
& rDestSize
,
282 const Point
& rSrcPt
, const Size
& rSrcSize
) override
;
284 virtual void DrawOutDev( const Point
& rDestPt
, const Size
& rDestSize
,
285 const Point
& rSrcPt
, const Size
& rSrcSize
,
286 const OutputDevice
& rOutDev
) override
;
288 virtual void CopyArea( const Point
& rDestPt
, const Point
& rSrcPt
,
289 const Size
& rSrcSize
, bool bWindowInvalidate
= false ) override
;
291 virtual tools::Rectangle
GetBackgroundComponentBounds() const override
;
293 // These 3 together are more modular PrintJob(), allowing printing more documents as one print job
294 // by repeated calls to ExecutePrintJob(). Used by mailmerge.
295 static bool PreparePrintJob( std::shared_ptr
<vcl::PrinterController
> i_pController
,
296 const JobSetup
& i_rInitSetup
);
297 static bool ExecutePrintJob(const std::shared_ptr
<vcl::PrinterController
>& i_pController
);
298 static void FinishPrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
);
300 /** Implementation detail of PrintJob being asynchronous
302 not exported, not usable outside vcl
304 static void VCL_DLLPRIVATE
ImplPrintJob( const std::shared_ptr
<vcl::PrinterController
>& i_pController
,
305 const JobSetup
& i_rInitSetup
);
310 class ImplPrinterControllerData
;
312 enum class NupOrderType
314 LRTB
, TBLR
, TBRL
, RLTB
317 class VCL_DLLPUBLIC PrinterController
319 std::unique_ptr
<ImplPrinterControllerData
>
322 PrinterController(const VclPtr
<Printer
>&, weld::Window
* pDialogParent
);
324 struct MultiPageSetup
326 // all metrics in 100th mm
330 tools::Long nLeftMargin
;
331 tools::Long nTopMargin
;
332 tools::Long nRightMargin
;
333 tools::Long nBottomMargin
;
334 tools::Long nHorizontalSpacing
;
335 tools::Long nVerticalSpacing
;
340 : nRows( 1 ), nColumns( 1 ), aPaperSize( 21000, 29700 )
341 , nLeftMargin( 0 ), nTopMargin( 0 )
342 , nRightMargin( 0 ), nBottomMargin( 0 )
343 , nHorizontalSpacing( 0 ), nVerticalSpacing( 0 )
344 , bDrawBorder( false )
345 , nOrder( NupOrderType::LRTB
) {}
353 /// Full paper, not only imageable area is printed
356 PageSize( const Size
& i_rSize
= Size( 21000, 29700 ),
357 bool i_bFullPaper
= false)
358 : aSize( i_rSize
), bFullPaper( i_bFullPaper
) {}
361 virtual ~PrinterController();
363 const VclPtr
<Printer
>& getPrinter() const;
364 weld::Window
* getWindow() const;
366 /** For implementations: get current job properties as changed by e.g. print dialog
368 this gets the current set of properties initially told to Printer::PrintJob
370 For convenience a second sequence will be merged in to get a combined sequence.
371 In case of duplicate property names, the value of i_MergeList wins.
373 css::uno::Sequence
< css::beans::PropertyValue
>
374 getJobProperties(const css::uno::Sequence
< css::beans::PropertyValue
>& i_rMergeList
) const;
376 /// Get the PropertyValue of a Property
377 css::beans::PropertyValue
* getValue( const OUString
& i_rPropertyName
);
378 const css::beans::PropertyValue
* getValue( const OUString
& i_rPropertyName
) const;
380 /** Get a bool property
382 in case the property is unknown or not convertible to bool, i_bFallback is returned
384 bool getBoolProperty( const OUString
& i_rPropertyName
, bool i_bFallback
) const;
386 /** Get an int property
388 in case the property is unknown or not convertible to bool, i_nFallback is returned
390 sal_Int32
getIntProperty( const OUString
& i_rPropertyName
, sal_Int32 i_nFallback
) const;
392 /// Set a property value - can also be used to add another UI property
393 void setValue( const OUString
& i_rPropertyName
, const css::uno::Any
& i_rValue
);
394 void setValue( const css::beans::PropertyValue
& i_rValue
);
396 /** @return The currently active UI options. These are the same that were passed to setUIOptions. */
397 const css::uno::Sequence
< css::beans::PropertyValue
>&
398 getUIOptions() const;
400 /** Set possible UI options.
402 should only be done once before passing the PrinterListener to Printer::PrintJob
404 void setUIOptions( const css::uno::Sequence
< css::beans::PropertyValue
>& );
406 /// Enable/disable an option; this can be used to implement dialog logic.
407 bool isUIOptionEnabled( const OUString
& rPropName
) const;
408 bool isUIChoiceEnabled( const OUString
& rPropName
, sal_Int32 nChoice
) const;
410 /** MakeEnabled will change the property rPropName depends on to the value
412 that makes rPropName enabled. If the dependency itself is also disabled,
413 no action will be performed.
415 @return The property name rPropName depends on or an empty string if no change was made.
417 OUString
makeEnabled( const OUString
& rPropName
);
419 /// App must override this
420 virtual int getPageCount() const = 0;
422 /** Get the page parameters
424 namely the jobsetup that should be active for the page
425 (describing among others the physical page size) and the "page size". In writer
426 case this would probably be the same as the JobSetup since writer sets the page size
427 draw/impress for example print their page on the paper set on the printer,
428 possibly adjusting the page size to fit. That means the page size can be different from
431 App must override this
433 @return Page size in 1/100th mm
435 virtual css::uno::Sequence
< css::beans::PropertyValue
>
436 getPageParameters( int i_nPage
) const = 0;
437 /// App must override this
438 virtual void printPage(int i_nPage
) const = 0;
440 /// Will be called after a possible dialog has been shown and the real printjob starts
441 virtual void jobStarted();
442 virtual void jobFinished( css::view::PrintableState
);
444 css::view::PrintableState
getJobState() const;
448 bool isShowDialogs() const;
449 bool isDirectPrint() const;
451 void dialogsParentClosing();
453 // implementation details, not usable outside vcl
454 // don't use outside vcl. Some of these are exported for
455 // the benefit of vcl's plugins.
456 // Still: DO NOT USE OUTSIDE VCL
457 int getFilteredPageCount() const;
458 VCL_DLLPRIVATE PageSize
getPageFile( int i_inUnfilteredPage
, GDIMetaFile
& rMtf
,
459 bool i_bMayUseCache
= false );
460 PageSize
getFilteredPageFile( int i_nFilteredPage
, GDIMetaFile
& o_rMtf
,
461 bool i_bMayUseCache
= false );
462 void printFilteredPage( int i_nPage
);
463 VCL_DLLPRIVATE
void setPrinter( const VclPtr
<Printer
>& );
464 void createProgressDialog();
465 bool isProgressCanceled() const;
466 VCL_DLLPRIVATE
void setMultipage( const MultiPageSetup
& );
467 VCL_DLLPRIVATE
const MultiPageSetup
&
468 getMultipage() const;
469 void setLastPage( bool i_bLastPage
);
470 VCL_DLLPRIVATE
void setReversePrint( bool i_bReverse
);
471 VCL_DLLPRIVATE
void setPapersizeFromSetup( bool i_bPapersizeFromSetup
);
472 VCL_DLLPRIVATE
bool getPapersizeFromSetup() const;
473 VCL_DLLPRIVATE
void setPaperSizeFromUser( Size i_aUserSize
);
474 VCL_DLLPRIVATE
void setOrientationFromUser( Orientation eOrientation
, bool set
);
475 void setPrinterModified( bool i_bPapersizeFromSetup
);
476 bool getPrinterModified() const;
477 VCL_DLLPRIVATE
void pushPropertiesToPrinter();
478 VCL_DLLPRIVATE
void resetPaperToLastConfigured();
479 void setJobState( css::view::PrintableState
);
480 VCL_DLLPRIVATE
void setupPrinter( weld::Window
* i_pDlgParent
);
482 VCL_DLLPRIVATE
int getPageCountProtected() const;
483 VCL_DLLPRIVATE
css::uno::Sequence
< css::beans::PropertyValue
>
484 getPageParametersProtected( int i_nPage
) const;
486 VCL_DLLPRIVATE DrawModeFlags
removeTransparencies( GDIMetaFile
const & i_rIn
, GDIMetaFile
& o_rOut
);
487 VCL_DLLPRIVATE
void resetPrinterOptions( bool i_bFileOutput
);
490 class VCL_DLLPUBLIC PrinterOptionsHelper
493 std::unordered_map
< OUString
, css::uno::Any
>
495 std::vector
< css::beans::PropertyValue
>
500 /// Create without ui properties
501 PrinterOptionsHelper() {}
503 /** Process a new set of properties
505 merges changed properties and returns "true" if any occurred
507 bool processProperties( const css::uno::Sequence
< css::beans::PropertyValue
>& i_rNewProp
);
509 /** Append to a sequence of property values the ui property sequence passed at creation
511 as the "ExtraPrintUIOptions" property. if that sequence was empty, no "ExtraPrintUIOptions" property
514 void appendPrintUIOptions( css::uno::Sequence
< css::beans::PropertyValue
>& io_rProps
) const;
516 /** @return An empty Any for not existing properties */
517 css::uno::Any
getValue( const OUString
& i_rPropertyName
) const;
519 bool getBoolValue( const OUString
& i_rPropertyName
, bool i_bDefault
) const;
520 // convenience for fixed strings
521 bool getBoolValue( const char* i_pPropName
, bool i_bDefault
= false ) const
522 { return getBoolValue( OUString::createFromAscii( i_pPropName
), i_bDefault
); }
524 sal_Int64
getIntValue( const OUString
& i_rPropertyName
, sal_Int64 i_nDefault
) const;
525 // convenience for fixed strings
526 sal_Int64
getIntValue( const char* i_pPropName
, sal_Int64 i_nDefault
) const
527 { return getIntValue( OUString::createFromAscii( i_pPropName
), i_nDefault
); }
529 OUString
getStringValue( const OUString
& i_rPropertyName
) const;
530 // convenience for fixed strings
531 OUString
getStringValue( const char* i_pPropName
) const
532 { return getStringValue( OUString::createFromAscii( i_pPropName
) ); }
534 // helper functions for user to create a single control
535 struct UIControlOptions
537 OUString maDependsOnName
;
538 OUString maGroupHint
;
539 std::vector
< css::beans::PropertyValue
>
541 sal_Int32 mnDependsOnEntry
;
542 bool mbAttachToDependency
;
546 UIControlOptions( const OUString
& i_rDependsOnName
= OUString(),
547 sal_Int32 i_nDependsOnEntry
= -1, bool i_bAttachToDependency
= false)
548 : maDependsOnName( i_rDependsOnName
)
549 , mnDependsOnEntry( i_nDependsOnEntry
)
550 , mbAttachToDependency( i_bAttachToDependency
)
551 , mbInternalOnly( false )
552 , mbEnabled( true ) {}
555 // note: in the following helper functions HelpIds are expected as an OUString
556 // the normal HelpId form is OString (byte string instead of UTF16 string)
557 // this is because the whole interface is base on UNO properties; in fact the structures
558 // are passed over UNO interfaces. UNO does not know a byte string, hence the string is
559 // transported via UTF16 strings.
561 /// Show general control
562 static css::uno::Any
setUIControlOpt( const css::uno::Sequence
< OUString
>& i_rIDs
, const OUString
& i_rTitle
,
563 const css::uno::Sequence
< OUString
>& i_rHelpId
, const OUString
& i_rType
,
564 const css::beans::PropertyValue
* i_pValue
= nullptr,
565 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
567 /// Show and set the title of a TagPage of id i_rID
568 static css::uno::Any
setGroupControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
,
569 const OUString
& i_rHelpId
);
571 /// Show and set the label of a VclFrame of id i_rID
572 static css::uno::Any
setSubgroupControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
573 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
575 /// Show a bool option as a checkbox
576 static css::uno::Any
setBoolControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
577 const OUString
& i_rProperty
, bool i_bValue
,
578 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
580 /// Show a set of choices in a list box
581 static css::uno::Any
setChoiceListControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
,
582 const css::uno::Sequence
< OUString
>& i_rHelpId
, const OUString
& i_rProperty
,
583 const css::uno::Sequence
< OUString
>& i_rChoices
, sal_Int32 i_nValue
,
584 const css::uno::Sequence
< sal_Bool
>& i_rDisabledChoices
= css::uno::Sequence
< sal_Bool
>(),
585 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
587 /// Show a set of choices as radio buttons
588 static css::uno::Any
setChoiceRadiosControlOpt( const css::uno::Sequence
< OUString
>& i_rIDs
,
589 const OUString
& i_rTitle
, const css::uno::Sequence
< OUString
>& i_rHelpId
,
590 const OUString
& i_rProperty
, const css::uno::Sequence
< OUString
>& i_rChoices
,
592 const css::uno::Sequence
< sal_Bool
>& i_rDisabledChoices
= css::uno::Sequence
< sal_Bool
>(),
593 const UIControlOptions
& i_rControlOptions
= UIControlOptions());
595 /** Show an integer range (e.g. a spin field)
597 note: max value < min value means do not apply min/max values
599 static css::uno::Any
setRangeControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
600 const OUString
& i_rProperty
, sal_Int32 i_nValue
, sal_Int32 i_nMinValue
,
601 sal_Int32 i_nMaxValue
, const UIControlOptions
& i_rControlOptions
);
603 /** Show a string field
605 note: max value < min value means do not apply min/max values
607 static css::uno::Any
setEditControlOpt( const OUString
& i_rID
, const OUString
& i_rTitle
, const OUString
& i_rHelpId
,
608 const OUString
& i_rProperty
, const OUString
& i_rValue
,
609 const UIControlOptions
& i_rControlOptions
);
610 }; // class PrinterOptionsHelper
615 #endif // INCLUDED_VCL_PRINT_HXX
617 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */