LibreOffice Module vcl (master) 1
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
vcl::PrinterOptionsHelper Class Reference

#include <print.hxx>

Classes

struct  UIControlOptions
 

Public Member Functions

 PrinterOptionsHelper ()
 Create without ui properties. More...
 
bool processProperties (const css::uno::Sequence< css::beans::PropertyValue > &i_rNewProp)
 Process a new set of properties. More...
 
void appendPrintUIOptions (css::uno::Sequence< css::beans::PropertyValue > &io_rProps) const
 Append to a sequence of property values the ui property sequence passed at creation. More...
 
css::uno::Any getValue (const OUString &i_rPropertyName) const
 
bool getBoolValue (const OUString &i_rPropertyName, bool i_bDefault) const
 
bool getBoolValue (const char *i_pPropName, bool i_bDefault=false) const
 
sal_Int64 getIntValue (const OUString &i_rPropertyName, sal_Int64 i_nDefault) const
 
sal_Int64 getIntValue (const char *i_pPropName, sal_Int64 i_nDefault) const
 
OUString getStringValue (const OUString &i_rPropertyName) const
 
OUString getStringValue (const char *i_pPropName) const
 

Static Public Member Functions

static css::uno::Any setUIControlOpt (const css::uno::Sequence< OUString > &i_rIDs, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rType, const css::beans::PropertyValue *i_pValue=nullptr, const UIControlOptions &i_rControlOptions=UIControlOptions())
 Show general control. More...
 
static css::uno::Any setGroupControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId)
 Show and set the title of a TagPage of id i_rID. More...
 
static css::uno::Any setSubgroupControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const UIControlOptions &i_rControlOptions=UIControlOptions())
 Show and set the label of a VclFrame of id i_rID. More...
 
static css::uno::Any setBoolControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, bool i_bValue, const UIControlOptions &i_rControlOptions=UIControlOptions())
 Show a bool option as a checkbox. More...
 
static css::uno::Any setChoiceListControlOpt (const OUString &i_rID, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rProperty, const css::uno::Sequence< OUString > &i_rChoices, sal_Int32 i_nValue, const css::uno::Sequence< sal_Bool > &i_rDisabledChoices=css::uno::Sequence< sal_Bool >(), const UIControlOptions &i_rControlOptions=UIControlOptions())
 Show a set of choices in a list box. More...
 
static css::uno::Any setChoiceRadiosControlOpt (const css::uno::Sequence< OUString > &i_rIDs, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rProperty, const css::uno::Sequence< OUString > &i_rChoices, sal_Int32 i_nValue, const css::uno::Sequence< sal_Bool > &i_rDisabledChoices=css::uno::Sequence< sal_Bool >(), const UIControlOptions &i_rControlOptions=UIControlOptions())
 Show a set of choices as radio buttons. More...
 
static css::uno::Any setRangeControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue, sal_Int32 i_nMaxValue, const UIControlOptions &i_rControlOptions)
 Show an integer range (e.g. More...
 
static css::uno::Any setEditControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, const OUString &i_rValue, const UIControlOptions &i_rControlOptions)
 Show a string field. More...
 

Protected Attributes

std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
 
std::vector< css::beans::PropertyValue > m_aUIProperties
 

Detailed Description

Definition at line 489 of file print.hxx.

Constructor & Destructor Documentation

◆ PrinterOptionsHelper()

vcl::PrinterOptionsHelper::PrinterOptionsHelper ( )
inline

Create without ui properties.

Definition at line 500 of file print.hxx.

Member Function Documentation

◆ appendPrintUIOptions()

void PrinterOptionsHelper::appendPrintUIOptions ( css::uno::Sequence< css::beans::PropertyValue > &  io_rProps) const

Append to a sequence of property values the ui property sequence passed at creation.

as the "ExtraPrintUIOptions" property. if that sequence was empty, no "ExtraPrintUIOptions" property will be appended.

Definition at line 1902 of file print3.cxx.

References comphelper::containerToSequence(), m_aUIProperties, comphelper::makePropertyValue(), and nIndex.

◆ getBoolValue() [1/2]

bool vcl::PrinterOptionsHelper::getBoolValue ( const char *  i_pPropName,
bool  i_bDefault = false 
) const
inline

Definition at line 520 of file print.hxx.

◆ getBoolValue() [2/2]

bool PrinterOptionsHelper::getBoolValue ( const OUString &  i_rPropertyName,
bool  i_bDefault 
) const

Definition at line 1862 of file print3.cxx.

References getValue().

◆ getIntValue() [1/2]

sal_Int64 vcl::PrinterOptionsHelper::getIntValue ( const char *  i_pPropName,
sal_Int64  i_nDefault 
) const
inline

Definition at line 525 of file print.hxx.

◆ getIntValue() [2/2]

sal_Int64 PrinterOptionsHelper::getIntValue ( const OUString &  i_rPropertyName,
sal_Int64  i_nDefault 
) const

Definition at line 1869 of file print3.cxx.

References getValue().

◆ getStringValue() [1/2]

OUString vcl::PrinterOptionsHelper::getStringValue ( const char *  i_pPropName) const
inline

Definition at line 530 of file print.hxx.

◆ getStringValue() [2/2]

OUString PrinterOptionsHelper::getStringValue ( const OUString &  i_rPropertyName) const

Definition at line 1876 of file print3.cxx.

References getValue().

◆ getValue()

css::uno::Any PrinterOptionsHelper::getValue ( const OUString &  i_rPropertyName) const
Returns
An empty Any for not existing properties

Definition at line 1852 of file print3.cxx.

References m_aPropertyMap.

Referenced by getBoolValue(), getIntValue(), and getStringValue().

◆ processProperties()

bool PrinterOptionsHelper::processProperties ( const css::uno::Sequence< css::beans::PropertyValue > &  i_rNewProp)

Process a new set of properties.

merges changed properties and returns "true" if any occurred

Definition at line 1883 of file print3.cxx.

References m_aPropertyMap.

◆ setBoolControlOpt()

css::uno::Any PrinterOptionsHelper::setBoolControlOpt ( const OUString &  i_rID,
const OUString &  i_rTitle,
const OUString &  i_rHelpId,
const OUString &  i_rProperty,
bool  i_bValue,
const UIControlOptions i_rControlOptions = UIControlOptions() 
)
static

Show a bool option as a checkbox.

Definition at line 2030 of file print3.cxx.

References setUIControlOpt().

◆ setChoiceListControlOpt()

css::uno::Any PrinterOptionsHelper::setChoiceListControlOpt ( const OUString &  i_rID,
const OUString &  i_rTitle,
const css::uno::Sequence< OUString > &  i_rHelpId,
const OUString &  i_rProperty,
const css::uno::Sequence< OUString > &  i_rChoices,
sal_Int32  i_nValue,
const css::uno::Sequence< sal_Bool > &  i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
const UIControlOptions i_rControlOptions = UIControlOptions() 
)
static

Show a set of choices in a list box.

Definition at line 2076 of file print3.cxx.

References vcl::PrinterOptionsHelper::UIControlOptions::maAddProps, and setUIControlOpt().

◆ setChoiceRadiosControlOpt()

css::uno::Any PrinterOptionsHelper::setChoiceRadiosControlOpt ( const css::uno::Sequence< OUString > &  i_rIDs,
const OUString &  i_rTitle,
const css::uno::Sequence< OUString > &  i_rHelpId,
const OUString &  i_rProperty,
const css::uno::Sequence< OUString > &  i_rChoices,
sal_Int32  i_nValue,
const css::uno::Sequence< sal_Bool > &  i_rDisabledChoices = css::uno::Sequence< sal_Bool >(),
const UIControlOptions i_rControlOptions = UIControlOptions() 
)
static

Show a set of choices as radio buttons.

Definition at line 2050 of file print3.cxx.

References vcl::PrinterOptionsHelper::UIControlOptions::maAddProps, and setUIControlOpt().

◆ setEditControlOpt()

css::uno::Any PrinterOptionsHelper::setEditControlOpt ( const OUString &  i_rID,
const OUString &  i_rTitle,
const OUString &  i_rHelpId,
const OUString &  i_rProperty,
const OUString &  i_rValue,
const UIControlOptions i_rControlOptions 
)
static

Show a string field.

note: max value < min value means do not apply min/max values

Definition at line 2136 of file print3.cxx.

References setUIControlOpt().

◆ setGroupControlOpt()

css::uno::Any PrinterOptionsHelper::setGroupControlOpt ( const OUString &  i_rID,
const OUString &  i_rTitle,
const OUString &  i_rHelpId 
)
static

Show and set the title of a TagPage of id i_rID.

Definition at line 2001 of file print3.cxx.

References setUIControlOpt().

◆ setRangeControlOpt()

css::uno::Any PrinterOptionsHelper::setRangeControlOpt ( const OUString &  i_rID,
const OUString &  i_rTitle,
const OUString &  i_rHelpId,
const OUString &  i_rProperty,
sal_Int32  i_nValue,
sal_Int32  i_nMinValue,
sal_Int32  i_nMaxValue,
const UIControlOptions i_rControlOptions 
)
static

Show an integer range (e.g.

a spin field)

note: max value < min value means do not apply min/max values

Definition at line 2103 of file print3.cxx.

References vcl::PrinterOptionsHelper::UIControlOptions::maAddProps, and setUIControlOpt().

◆ setSubgroupControlOpt()

css::uno::Any PrinterOptionsHelper::setSubgroupControlOpt ( const OUString &  i_rID,
const OUString &  i_rTitle,
const OUString &  i_rHelpId,
const UIControlOptions i_rControlOptions = UIControlOptions() 
)
static

Show and set the label of a VclFrame of id i_rID.

Definition at line 2015 of file print3.cxx.

References setUIControlOpt().

◆ setUIControlOpt()

css::uno::Any PrinterOptionsHelper::setUIControlOpt ( const css::uno::Sequence< OUString > &  i_rIDs,
const OUString &  i_rTitle,
const css::uno::Sequence< OUString > &  i_rHelpId,
const OUString &  i_rType,
const css::beans::PropertyValue *  i_pValue = nullptr,
const UIControlOptions i_rControlOptions = UIControlOptions() 
)
static

Member Data Documentation

◆ m_aPropertyMap

std::unordered_map< OUString, css::uno::Any > vcl::PrinterOptionsHelper::m_aPropertyMap
protected

Definition at line 493 of file print.hxx.

Referenced by getValue(), and processProperties().

◆ m_aUIProperties

std::vector< css::beans::PropertyValue > vcl::PrinterOptionsHelper::m_aUIProperties
protected

Definition at line 495 of file print.hxx.

Referenced by appendPrintUIOptions().


The documentation for this class was generated from the following files: