22#include <rtl/ustrbuf.hxx>
24#include <com/sun/star/util/Duration.hpp>
25#include <com/sun/star/util/Time.hpp>
29#include <osl/diagnose.h>
35 using ::com::sun::star::uno::Any;
36 using ::com::sun::star::util::Duration;
37 using ::com::sun::star::util::Time;
46 css::util::Time aTime;
47 OSL_VERIFY( i_propertyValue >>= aTime );
50 aDuration.Hours = aTime.Hours;
51 aDuration.Minutes = aTime.Minutes;
52 aDuration.Seconds = aTime.Seconds;
53 aDuration.NanoSeconds = aTime.NanoSeconds;
57 return aBuffer.makeStringAndClear();
63 css::util::Time aTime;
66 aTime =
Time(aDuration.NanoSeconds, aDuration.Seconds,
67 aDuration.Minutes, aDuration.Hours,
73 sal_Int64 nVCLTime(0);
76 OSL_ENSURE(
false,
"VCLTimeHandler::getPropertyValues: unknown time format (no XML-schema time, no legacy integer)!" );
84 const Any aPropertyValue( aTime );
86 OSL_ENSURE( o_propertyValues.size() == 1,
"VCLTimeHandler::getPropertyValues: time strings represent exactly one property - not more, not less!" );
87 for (
auto& prop : o_propertyValues )
89 prop.second = aPropertyValue;
static void convertDuration(OUStringBuffer &rBuffer, const double fTime)
static bool convertNumber64(sal_Int64 &rValue, std::u16string_view aString, sal_Int64 nMin=SAL_MIN_INT64, sal_Int64 nMax=SAL_MAX_INT64)
virtual OUString getAttributeValue(const css::uno::Any &i_propertyValue) const override
is a convenience method for XML attributes whose value comprises of only one UNO API property
virtual bool getPropertyValues(const OUString &i_attributeValue, PropertyValues &o_propertyValues) const override
retrieves the values of the properties controlled by an XML attributed, described by a given attribut...
::std::map< PropertyId, css::uno::Any > PropertyValues
std::unique_ptr< char[]> aBuffer