24#include <tools/datetime.hxx>
27#include <com/sun/star/util/DateTime.hpp>
41 return std::make_unique<SwDateTimeFieldType>(
GetDoc());
66 if (getenv(
"STABLE_FIELDS_HACK"))
89 std::unique_ptr<SwDateTimeField> pTmp(
97 return std::unique_ptr<SwField>(pTmp.release());
139 if (getenv(
"STABLE_FIELDS_HACK"))
157 Date aDate = rNullDate + nVal;
181 rVal <<= static_cast<sal_Int32>(
GetFormat());
184 rVal <<= static_cast<sal_Int32>(
m_nOffset);
204 if(*o3tl::doAccess<bool>(rVal))
223 util::DateTime aDateTimeValue;
224 if(!(rVal >>= aDateTimeValue))
void AddTime(double fTimeInDays)
css::util::DateTime GetUNODateTime() const
static double Sub(const DateTime &rDateTime1, const DateTime &rDateTime2)
virtual std::unique_ptr< SwFieldType > Copy() const override
SwDateTimeFieldType(SwDoc *pDoc)
virtual sal_uInt16 GetSubType() const override
virtual std::unique_ptr< SwField > Copy() const override
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nMId) const override
tools::Time GetTime() const
static double GetDateTime(SwDoc &rDoc, const DateTime &rDT)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nMId) override
virtual void SetSubType(sal_uInt16 nSub) override
virtual double GetValue() const override
SwDateTimeField(SwDateTimeFieldType *pType, sal_uInt16 nSubType=DATEFLD, sal_uLong nFormat=0, LanguageType nLng=LANGUAGE_SYSTEM)
void SetDateTime(const DateTime &rDT)
virtual void SetPar2(const OUString &rStr) override
virtual OUString GetPar2() const override
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
void ChangeFormat(sal_uInt32 n)
bool IsAutomaticLanguage() const
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
SwFieldType * GetTyp() const
LanguageType GetLanguage() const
Language at field position.
The root element of a Writer document layout.
Fields containing values that have to be formatted via number formatter.
OUString ExpandValue(const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
virtual double GetValue() const
virtual void SetValue(const double &rVal)
constexpr T & temporary(T &&x)
#define FIELD_PROP_DATE_TIME
#define FIELD_PROP_SUBTYPE
#define FIELD_PROP_FORMAT