LibreOffice Module vcl (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
weld::DateFormatter Class Referencefinal

#include <weldutils.hxx>

Inheritance diagram for weld::DateFormatter:
[legend]
Collaboration diagram for weld::DateFormatter:
[legend]

Public Member Functions

 DateFormatter (weld::Entry &rEntry)
 
void SetMin (const Date &rNewMin)
 
void SetMax (const Date &rNewMax)
 
void SetDate (const Date &rNewDate)
 
Date GetDate ()
 
void SetExtDateFormat (ExtDateFieldFormat eFormat)
 
void SetShowDateCentury (bool bShowCentury)
 
virtual ~DateFormatter () override
 
- Public Member Functions inherited from weld::EntryFormatter
 EntryFormatter (weld::Entry &rEntry)
 
 EntryFormatter (weld::FormattedSpinButton &rSpinButton)
 
weld::Entryget_widget ()
 
virtual SAL_DLLPRIVATE Selection GetEntrySelection () const override
 
virtual SAL_DLLPRIVATE OUString GetEntryText () const override
 
virtual SAL_DLLPRIVATE void SetEntryText (const OUString &rText, const Selection &rSel) override
 
virtual SAL_DLLPRIVATE void SetEntryTextColor (const Color *pColor) override
 
virtual SAL_DLLPRIVATE SelectionOptions GetEntrySelectionOptions () const override
 
virtual SAL_DLLPRIVATE void FieldModified () override
 
virtual SAL_DLLPRIVATE void ClearMinValue () override
 
virtual SAL_DLLPRIVATE void SetMinValue (double dMin) override
 
virtual SAL_DLLPRIVATE void ClearMaxValue () override
 
virtual SAL_DLLPRIVATE void SetMaxValue (double dMin) override
 
virtual SAL_DLLPRIVATE void SetSpinSize (double dStep) override
 
void SetEntrySelectionOptions (SelectionOptions eOptions)
 
void connect_changed (const Link< weld::Entry &, void > &rLink)
 
void connect_focus_out (const Link< weld::Widget &, void > &rLink)
 
virtual SAL_DLLPRIVATE ~EntryFormatter () override
 
- Public Member Functions inherited from Formatter
 Formatter ()
 
virtual ~Formatter ()
 
void SetFieldText (const OUString &rText, const Selection &rNewSelection)
 
virtual Selection GetEntrySelection () const =0
 
virtual OUString GetEntryText () const =0
 
virtual SelectionOptions GetEntrySelectionOptions () const =0
 
virtual void SetEntryText (const OUString &rText, const Selection &rSel)=0
 
virtual void SetEntryTextColor (const Color *pColor)=0
 
virtual void FieldModified ()=0
 
bool HasMinValue () const
 
virtual void ClearMinValue ()
 
virtual void SetMinValue (double dMin)
 
double GetMinValue () const
 
bool HasMaxValue () const
 
virtual void ClearMaxValue ()
 
virtual void SetMaxValue (double dMax)
 
double GetMaxValue () const
 
void SetValue (double dVal)
 
double GetValue ()
 
void SetTextValue (const OUString &rText)
 
bool IsEmptyFieldEnabled () const
 
void EnableEmptyField (bool bEnable)
 
void SetDefaultValue (double dDefault)
 
double GetDefaultValue () const
 
void SetLastSelection (const Selection &rSelection)
 
sal_uLong GetFormatKey () const
 
void SetFormatKey (sal_uLong nFormatKey)
 
SvNumberFormatterGetOrCreateFormatter () const
 
SvNumberFormatterGetFormatter () const
 
void SetFormatter (SvNumberFormatter *pFormatter, bool bResetFormat=true)
 
bool GetThousandsSep () const
 
void SetThousandsSep (bool _bUseSeparator)
 
void DisableRemainderFactor ()
 
bool GetDisableRemainderFactor () const
 
void SetWrapOnLimits (bool bWrapOnLimits)
 
sal_uInt16 GetDecimalDigits () const
 
void SetDecimalDigits (sal_uInt16 _nPrecision)
 
SvNumberFormatterStandardFormatter ()
 
OUString GetFormat (LanguageType &eLang) const
 
bool SetFormat (const OUString &rFormatString, LanguageType eLang)
 
bool IsStrictFormat () const
 
void SetStrictFormat (bool bEnable)
 
virtual void SetSpinSize (double dStep)
 
double GetSpinSize () const
 
void SetSpinFirst (double dFirst)
 
double GetSpinFirst () const
 
void SetSpinLast (double dLast)
 
double GetSpinLast () const
 
bool TreatingAsNumber () const
 
void TreatAsNumber (bool bDoSo)
 
void SetInputHdl (const Link< sal_Int64 *, TriState > &rLink)
 
void SetOutputHdl (const Link< LinkParamNone *, bool > &rLink)
 
void SetTextFormatted (const OUString &rText)
 
OUString const & GetTextValue () const
 
void SetDefaultText (const OUString &rDefault)
 
const OUString & GetDefaultText () const
 
const ColorGetLastOutputColor () const
 
void Commit ()
 reformats the current text. More...
 
void SetAutoColor (bool _bAutomatic)
 
void EnableNotANumber (bool _bEnable)
 enables handling of not-a-number value. More...
 
void UseInputStringForFormatting ()
 When being set to true, the strings in the field are formatted using the InputLine format. More...
 
bool IsUsingInputStringForFormatting () const
 
void Modify (bool makeValueDirty=true)
 
void EntryLostFocus ()
 
void ReFormat ()
 
virtual void FormatChanged (FORMAT_CHANGE_TYPE nWhat)
 

Private Member Functions

 DECL_DLLPRIVATE_LINK (FormatOutputHdl, LinkParamNone *, bool)
 
 DECL_DLLPRIVATE_LINK (ParseInputHdl, sal_Int64 *, TriState)
 
 DECL_DLLPRIVATE_LINK (CursorChangedHdl, weld::Entry &, void)
 
SAL_DLLPRIVATE void Init ()
 
SAL_DLLPRIVATE CalendarWrapperGetCalendarWrapper () const
 
SAL_DLLPRIVATE OUString FormatNumber (int nValue) const
 

Private Attributes

ExtDateFieldFormat m_eFormat
 
std::unique_ptr< CalendarWrapperm_xCalendarWrapper
 

Additional Inherited Members

- Protected Types inherited from Formatter
enum  valueState {
  valueDirty ,
  valueString ,
  valueDouble
}
 
- Protected Member Functions inherited from Formatter
virtual bool CheckText (const OUString &) const
 
void ImplSetTextImpl (const OUString &rNew, Selection const *pNewSel)
 
void ImplSetValue (double dValue, bool bForce)
 
bool ImplGetValue (double &dNewVal)
 
void ImplSetFormatKey (sal_uLong nFormatKey)
 
SvNumberFormatterCreateFormatter ()
 
virtual void UpdateCurrentValue (double dCurrentValue)
 
- Protected Attributes inherited from Formatter
OUString m_sLastValidText
 
Selection m_aLastSelection
 
double m_dMinValue
 
double m_dMaxValue
 
bool m_bHasMin: 1
 
bool m_bHasMax: 1
 
bool m_bWrapOnLimits: 1
 
bool m_bStrictFormat: 1
 
bool m_bEnableEmptyField: 1
 
bool m_bAutoColor: 1
 
bool m_bEnableNaN: 1
 
bool m_bDisableRemainderFactor: 1
 
bool m_bDefaultValueSet: 1
 
valueState m_ValueState
 
double m_dCurrentValue
 
double m_dDefaultValue
 
sal_uLong m_nFormatKey
 
SvNumberFormatterm_pFormatter
 
StaticFormatter m_aStaticFormatter
 
double m_dSpinSize
 
double m_dSpinFirst
 
double m_dSpinLast
 
bool m_bTreatAsNumber
 
OUString m_sCurrentTextValue
 
OUString m_sDefaultText
 
const Colorm_pLastOutputColor
 
bool m_bUseInputStringForFormatting
 
Link< sal_Int64 *, TriStatem_aInputHdl
 
Link< LinkParamNone *, bool > m_aOutputHdl
 

Detailed Description

Definition at line 331 of file weldutils.hxx.

Constructor & Destructor Documentation

◆ DateFormatter()

DateFormatter::DateFormatter ( weld::Entry rEntry)

Definition at line 435 of file weldutils.cxx.

References Init(), and SystemShort.

◆ ~DateFormatter()

DateFormatter::~DateFormatter ( )
overridevirtualdefault

Definition at line 1731 of file field2.cxx.

Member Function Documentation

◆ DECL_DLLPRIVATE_LINK() [1/3]

weld::DateFormatter::DECL_DLLPRIVATE_LINK ( CursorChangedHdl  ,
weld::Entry ,
void   
)
private

References FormatNumber(), and Init().

◆ DECL_DLLPRIVATE_LINK() [2/3]

weld::DateFormatter::DECL_DLLPRIVATE_LINK ( FormatOutputHdl  ,
LinkParamNone ,
bool   
)
private

◆ DECL_DLLPRIVATE_LINK() [3/3]

weld::DateFormatter::DECL_DLLPRIVATE_LINK ( ParseInputHdl  ,
sal_Int64 *  ,
TriState   
)
private

◆ FormatNumber()

OUString DateFormatter::FormatNumber ( int  nValue) const
private

◆ GetCalendarWrapper()

CalendarWrapper & DateFormatter::GetCalendarWrapper ( ) const
private

Definition at line 1735 of file field2.cxx.

References comphelper::getProcessComponentContext().

◆ GetDate()

Date DateFormatter::GetDate ( )

Definition at line 1905 of file field2.cxx.

References Date::EMPTY, and Date::SYSTEM.

◆ Init()

void DateFormatter::Init ( void  )
private

Definition at line 442 of file weldutils.cxx.

References LINK, Formatter::SetInputHdl(), SetMax(), SetMin(), and Formatter::SetOutputHdl().

Referenced by DateFormatter().

◆ SetDate()

void DateFormatter::SetDate ( const Date rNewDate)

Definition at line 1856 of file field2.cxx.

◆ SetExtDateFormat()

void DateFormatter::SetExtDateFormat ( ExtDateFieldFormat  eFormat)

Definition at line 451 of file weldutils.cxx.

References m_eFormat, and Formatter::ReFormat().

◆ SetMax()

void DateFormatter::SetMax ( const Date rNewMax)

Definition at line 1774 of file field2.cxx.

Referenced by Init().

◆ SetMin()

void DateFormatter::SetMin ( const Date rNewMin)

Definition at line 1767 of file field2.cxx.

Referenced by Init().

◆ SetShowDateCentury()

void DateFormatter::SetShowDateCentury ( bool  bShowCentury)

Definition at line 1847 of file field2.cxx.

Member Data Documentation

◆ m_eFormat

ExtDateFieldFormat weld::DateFormatter::m_eFormat
private

Definition at line 357 of file weldutils.hxx.

Referenced by FormatNumber(), and SetExtDateFormat().

◆ m_xCalendarWrapper

std::unique_ptr<CalendarWrapper> weld::DateFormatter::m_xCalendarWrapper
mutableprivate

Definition at line 358 of file weldutils.hxx.


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