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 564 of file print.hxx.

Constructor & Destructor Documentation

vcl::PrinterOptionsHelper::PrinterOptionsHelper ( )
inline

Create without ui properties.

Definition at line 575 of file print.hxx.

Member Function Documentation

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 1839 of file print3.cxx.

References comphelper::containerToSequence(), and m_aUIProperties.

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

Definition at line 1799 of file print3.cxx.

References getValue().

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

Definition at line 595 of file print.hxx.

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

Definition at line 1806 of file print3.cxx.

References getValue().

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

Definition at line 600 of file print.hxx.

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

Definition at line 1813 of file print3.cxx.

References getValue().

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

Definition at line 605 of file print.hxx.

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

Definition at line 1789 of file print3.cxx.

References m_aPropertyMap.

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

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 1820 of file print3.cxx.

References m_aPropertyMap.

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 1968 of file print3.cxx.

References setUIControlOpt().

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 2014 of file print3.cxx.

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

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 1988 of file print3.cxx.

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

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 2074 of file print3.cxx.

References setUIControlOpt().

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 1939 of file print3.cxx.

References setUIControlOpt().

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 2041 of file print3.cxx.

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

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 1953 of file print3.cxx.

References 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

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

Definition at line 568 of file print.hxx.

Referenced by getValue(), and processProperties().

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

Definition at line 570 of file print.hxx.

Referenced by appendPrintUIOptions().


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