LibreOffice Module xmloff (master) 1
Public Member Functions | Private Attributes | List of all members
XMLNumberWithoutZeroPropHdl Class Reference

PropertyHandler for the XML-data-type: XML_TYPE_NUMBER_NO_ZERO Reads/writes numeric properties, but fails for the value zero (i.e., a value 0 property will not be written) More...

#include <xmlbahdl.hxx>

Inheritance diagram for XMLNumberWithoutZeroPropHdl:
[legend]
Collaboration diagram for XMLNumberWithoutZeroPropHdl:
[legend]

Public Member Functions

 XMLNumberWithoutZeroPropHdl (sal_Int8 nB)
 
virtual ~XMLNumberWithoutZeroPropHdl () override
 
virtual bool importXML (const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
 Imports the given value according to the XML-data-type corresponding to the derived class. More...
 
virtual bool exportXML (OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
 Exports the given value according to the XML-data-type corresponding to the derived class. More...
 
- Public Member Functions inherited from XMLPropertyHandler
virtual ~XMLPropertyHandler ()
 
virtual bool equals (const css::uno::Any &r1, const css::uno::Any &r2) const
 Compares two Any's in case of the given XML-data-type. More...
 
virtual bool importXML (const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const =0
 Imports the given value according to the XML-data-type corresponding to the derived class. More...
 
virtual bool exportXML (OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const =0
 Exports the given value according to the XML-data-type corresponding to the derived class. More...
 

Private Attributes

sal_Int8 nBytes
 

Detailed Description

PropertyHandler for the XML-data-type: XML_TYPE_NUMBER_NO_ZERO Reads/writes numeric properties, but fails for the value zero (i.e., a value 0 property will not be written)

Definition at line 303 of file xmlbahdl.hxx.

Constructor & Destructor Documentation

◆ XMLNumberWithoutZeroPropHdl()

XMLNumberWithoutZeroPropHdl::XMLNumberWithoutZeroPropHdl ( sal_Int8  nB)
explicit

Definition at line 827 of file xmlbahdl.cxx.

◆ ~XMLNumberWithoutZeroPropHdl()

XMLNumberWithoutZeroPropHdl::~XMLNumberWithoutZeroPropHdl ( )
overridevirtual

Definition at line 832 of file xmlbahdl.cxx.

Member Function Documentation

◆ exportXML()

bool XMLNumberWithoutZeroPropHdl::exportXML ( OUString &  rStrExpValue,
const css::uno::Any &  rValue,
const SvXMLUnitConverter rUnitConverter 
) const
overridevirtual

Exports the given value according to the XML-data-type corresponding to the derived class.

Implements XMLPropertyHandler.

Definition at line 848 of file xmlbahdl.cxx.

References lcl_xmloff_getAny(), nBytes, and nValue.

◆ importXML()

bool XMLNumberWithoutZeroPropHdl::importXML ( const OUString &  rStrImpValue,
css::uno::Any &  rValue,
const SvXMLUnitConverter rUnitConverter 
) const
overridevirtual

Imports the given value according to the XML-data-type corresponding to the derived class.

Return values
trueif the value was successfully converted to Any
falseif the value was not recognised (warning will be printed)

Implements XMLPropertyHandler.

Definition at line 836 of file xmlbahdl.cxx.

References sax::Converter::convertNumber(), lcl_xmloff_setAny(), nBytes, and nValue.

Member Data Documentation

◆ nBytes

sal_Int8 XMLNumberWithoutZeroPropHdl::nBytes
private

Definition at line 305 of file xmlbahdl.hxx.

Referenced by exportXML(), and importXML().


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