LibreOffice Module forms (master) 1
|
#include <convert.hxx>
Public Member Functions | |
bool | hasType (const css::uno::Type &) |
can we convert this type? More... | |
css::uno::Sequence< css::uno::Type > | getTypes () const |
get list of convertible types More... | |
OUString | toXSD (const css::uno::Any &rAny) |
convert any to XML representation More... | |
css::uno::Any | toAny (const OUString &, const css::uno::Type &) |
convert XML representation to Any of given type More... | |
Static Public Member Functions | |
static Convert & | get () |
get/create Singleton class More... | |
static OUString | collapseWhitespace (const OUString &_rString) |
replace all sequences of 0x08, 0x0A, 0x0D, 0x20 with a single 0x20. More... | |
Private Types | |
typedef OUString(* | fn_toXSD) (const css::uno::Any &) |
typedef css::uno::Any(* | fn_toAny) (const OUString &) |
typedef std::pair< fn_toXSD, fn_toAny > | Convert_t |
typedef std::map< css::uno::Type, Convert_t, TypeLess > | Map_t |
Private Member Functions | |
Convert () | |
void | init () |
Private Attributes | |
Map_t | maMap |
Definition at line 41 of file convert.hxx.
|
private |
Definition at line 46 of file convert.hxx.
|
private |
Definition at line 45 of file convert.hxx.
|
private |
Definition at line 44 of file convert.hxx.
|
private |
Definition at line 47 of file convert.hxx.
|
private |
Definition at line 40 of file convert.cxx.
References init().
|
static |
replace all sequences of 0x08, 0x0A, 0x0D, 0x20 with a single 0x20.
also strip leading/trailing whitespace.
Definition at line 305 of file convert.cxx.
References aBuffer, i, nLength, and u.
Referenced by xforms::Model::getNodeDisplayName().
|
static |
get/create Singleton class
Definition at line 274 of file convert.cxx.
Referenced by xforms::ODateType::_getValue(), xforms::OTimeType::_getValue(), xforms::ODateTimeType::_getValue(), xforms::Binding::getSupportedValueTypes(), xforms::Binding::getValue(), xforms::Binding::setValue(), xforms::Binding::supportsType(), xforms::ODateType::typedValueAsHumanReadableString(), xforms::OTimeType::typedValueAsHumanReadableString(), and xforms::ODateTimeType::typedValueAsHumanReadableString().
css::uno::Sequence< css::uno::Type > Convert::getTypes | ( | ) | const |
get list of convertible types
Definition at line 286 of file convert.cxx.
References maMap, and comphelper::mapKeysToSequence().
Referenced by xforms::Binding::getSupportedValueTypes().
bool Convert::hasType | ( | const css::uno::Type & | rType | ) |
can we convert this type?
Definition at line 281 of file convert.cxx.
References maMap.
Referenced by xforms::Binding::supportsType().
|
private |
Definition at line 263 of file convert.cxx.
References cppu::UnoType< typename T >::get(), and maMap.
Referenced by Convert().
css::uno::Any Convert::toAny | ( | const OUString & | rValue, |
const css::uno::Type & | rType | ||
) |
convert XML representation to Any of given type
Definition at line 297 of file convert.cxx.
References maMap.
Referenced by xforms::ODateType::_getValue(), xforms::OTimeType::_getValue(), xforms::ODateTimeType::_getValue(), and xforms::Binding::getValue().
OUString Convert::toXSD | ( | const css::uno::Any & | rAny | ) |
convert any to XML representation
Definition at line 291 of file convert.cxx.
References maMap.
Referenced by xforms::Binding::setValue(), xforms::ODateType::typedValueAsHumanReadableString(), xforms::OTimeType::typedValueAsHumanReadableString(), and xforms::ODateTimeType::typedValueAsHumanReadableString().
|
private |
Definition at line 48 of file convert.hxx.
Referenced by getTypes(), hasType(), init(), toAny(), and toXSD().