LibreOffice Module vcl (master)  1
Macros | Functions
field2.cxx File Reference
#include <sal/config.h>
#include <algorithm>
#include <string_view>
#include <tools/diagnose_ex.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <vcl/event.hxx>
#include <vcl/field.hxx>
#include <vcl/unohelp.hxx>
#include <vcl/settings.hxx>
#include <svdata.hxx>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
#include <unotools/localedatawrapper.hxx>
#include <unotools/calendarwrapper.hxx>
#include <unotools/charclass.hxx>
#include <unotools/misccfg.hxx>
Include dependency graph for field2.cxx:

Go to the source code of this file.

Macros

#define EDITMASK_LITERAL   'L'
 
#define EDITMASK_ALPHA   'a'
 
#define EDITMASK_UPPERALPHA   'A'
 
#define EDITMASK_ALPHANUM   'c'
 
#define EDITMASK_UPPERALPHANUM   'C'
 
#define EDITMASK_NUM   'N'
 
#define EDITMASK_NUMSPACE   'n'
 
#define EDITMASK_ALLCHAR   'x'
 
#define EDITMASK_UPPERALLCHAR   'X'
 

Functions

uno::Reference< i18n::XCharacterClassification > const & ImplGetCharClass ()
 
static sal_UnicodeImplAddString (sal_Unicode *pBuf, const OUString &rStr)
 
static sal_UnicodeImplAddNum (sal_Unicode *pBuf, sal_uLong nNumber, int nMinLen)
 
static sal_UnicodeImplAddSNum (sal_Unicode *pBuf, sal_Int32 nNumber, int nMinLen)
 
static sal_uInt16 ImplGetNum (const sal_Unicode *&rpBuf, bool &rbError)
 
static void ImplSkipDelimiters (const sal_Unicode *&rpBuf)
 
static bool ImplIsPatternChar (sal_Unicode cChar, sal_Char cEditMask)
 
static sal_Unicode ImplPatternChar (sal_Unicode cChar, sal_Char cEditMask)
 
static bool ImplCommaPointCharEqual (sal_Unicode c1, sal_Unicode c2)
 
static OUString ImplPatternReformat (const OUString &rStr, const OString &rEditMask, const OUString &rLiteralMask, sal_uInt16 nFormatFlags)
 
static void ImplPatternMaxPos (const OUString &rStr, const OString &rEditMask, sal_uInt16 nFormatFlags, bool bSameMask, sal_Int32 nCursorPos, sal_Int32 &rPos)
 
static void ImplPatternProcessStrictModify (Edit *pEdit, const OString &rEditMask, const OUString &rLiteralMask, bool bSameMask)
 
static sal_Int32 ImplPatternLeftPos (const OString &rEditMask, sal_Int32 nCursorPos)
 
static sal_Int32 ImplPatternRightPos (const OUString &rStr, const OString &rEditMask, sal_uInt16 nFormatFlags, bool bSameMask, sal_Int32 nCursorPos)
 
static bool ImplPatternProcessKeyInput (Edit *pEdit, const KeyEvent &rKEvt, const OString &rEditMask, const OUString &rLiteralMask, bool bStrictFormat, bool bSameMask, bool &rbInKeyInput)
 
static ExtDateFieldFormat ImplGetExtFormat (DateOrder eOld)
 
static sal_uInt16 ImplCutNumberFromString (OUString &rStr)
 
static bool ImplCutMonthName (OUString &rStr, const OUString &_rLookupMonthName)
 
static sal_uInt16 ImplCutMonthFromString (OUString &rStr, const CalendarWrapper &rCalendarWrapper)
 
static OUString ImplGetDateSep (const LocaleDataWrapper &rLocaleDataWrapper, ExtDateFieldFormat eFormat)
 
static bool ImplDateProcessKeyInput (const KeyEvent &rKEvt, ExtDateFieldFormat eFormat, const LocaleDataWrapper &rLocaleDataWrapper)
 
static bool ImplDateGetValue (const OUString &rStr, Date &rDate, ExtDateFieldFormat eDateOrder, const LocaleDataWrapper &rLocaleDataWrapper, const CalendarWrapper &rCalendarWrapper)
 
static void ImplDateIncrementDay (Date &rDate, bool bUp)
 
static void ImplDateIncrementMonth (Date &rDate, bool bUp)
 
static void ImplDateIncrementYear (Date &rDate, bool bUp)
 
static bool ImplTimeProcessKeyInput (const KeyEvent &rKEvt, bool bStrictFormat, bool bDuration, TimeFieldFormat eFormat, const LocaleDataWrapper &rLocaleDataWrapper)
 
static bool ImplIsOnlyDigits (const OUStringBuffer &_rStr)
 
static bool ImplIsValidTimePortion (bool _bSkipInvalidCharacters, const OUStringBuffer &_rStr)
 
static bool ImplCutTimePortion (OUStringBuffer &_rStr, sal_Int32 _nSepPos, bool _bSkipInvalidCharacters, short *_pPortion)
 

Macro Definition Documentation

#define EDITMASK_ALLCHAR   'x'

Definition at line 53 of file field2.cxx.

Referenced by ImplIsPatternChar(), and PatternFormatter::ImplSetMask().

#define EDITMASK_ALPHA   'a'

Definition at line 47 of file field2.cxx.

Referenced by ImplIsPatternChar().

#define EDITMASK_ALPHANUM   'c'

Definition at line 49 of file field2.cxx.

Referenced by ImplIsPatternChar().

#define EDITMASK_LITERAL   'L'
#define EDITMASK_NUM   'N'

Definition at line 51 of file field2.cxx.

Referenced by ImplIsPatternChar().

#define EDITMASK_NUMSPACE   'n'

Definition at line 52 of file field2.cxx.

Referenced by ImplIsPatternChar(), and PatternFormatter::ImplSetMask().

#define EDITMASK_UPPERALLCHAR   'X'

Definition at line 54 of file field2.cxx.

Referenced by ImplIsPatternChar(), ImplPatternChar(), and PatternFormatter::ImplSetMask().

#define EDITMASK_UPPERALPHA   'A'

Definition at line 48 of file field2.cxx.

Referenced by ImplIsPatternChar(), and ImplPatternChar().

#define EDITMASK_UPPERALPHANUM   'C'

Definition at line 50 of file field2.cxx.

Referenced by ImplIsPatternChar(), and ImplPatternChar().

Function Documentation

static sal_Unicode* ImplAddNum ( sal_Unicode pBuf,
sal_uLong  nNumber,
int  nMinLen 
)
static

Definition at line 76 of file field2.cxx.

Referenced by ImplAddSNum(), and DateFormatter::ImplGetDateAsText().

static sal_Unicode* ImplAddSNum ( sal_Unicode pBuf,
sal_Int32  nNumber,
int  nMinLen 
)
static

Definition at line 111 of file field2.cxx.

References ImplAddNum().

Referenced by DateFormatter::ImplGetDateAsText().

static sal_Unicode* ImplAddString ( sal_Unicode pBuf,
const OUString &  rStr 
)
static

Definition at line 69 of file field2.cxx.

Referenced by DateFormatter::ImplGetDateAsText().

static bool ImplCommaPointCharEqual ( sal_Unicode  c1,
sal_Unicode  c2 
)
static

Definition at line 213 of file field2.cxx.

Referenced by ImplPatternProcessKeyInput(), and ImplPatternReformat().

static sal_uInt16 ImplCutMonthFromString ( OUString &  rStr,
const CalendarWrapper rCalendarWrapper 
)
static

Definition at line 966 of file field2.cxx.

References CalendarWrapper::getMonths(), i, ImplCutMonthName(), and ImplCutNumberFromString().

Referenced by ImplDateGetValue().

static bool ImplCutMonthName ( OUString &  rStr,
const OUString &  _rLookupMonthName 
)
static

Definition at line 959 of file field2.cxx.

References index.

Referenced by ImplCutMonthFromString().

static sal_uInt16 ImplCutNumberFromString ( OUString &  rStr)
static

Definition at line 944 of file field2.cxx.

Referenced by ImplCutMonthFromString(), and ImplDateGetValue().

static bool ImplCutTimePortion ( OUStringBuffer &  _rStr,
sal_Int32  _nSepPos,
bool  _bSkipInvalidCharacters,
short *  _pPortion 
)
static

Definition at line 1938 of file field2.cxx.

References ImplIsValidTimePortion().

Referenced by TimeFormatter::TextToTime().

static bool ImplDateGetValue ( const OUString &  rStr,
Date rDate,
ExtDateFieldFormat  eDateOrder,
const LocaleDataWrapper rLocaleDataWrapper,
const CalendarWrapper rCalendarWrapper 
)
static
static void ImplDateIncrementDay ( Date rDate,
bool  bUp 
)
static
static void ImplDateIncrementMonth ( Date rDate,
bool  bUp 
)
static
static void ImplDateIncrementYear ( Date rDate,
bool  bUp 
)
static
static bool ImplDateProcessKeyInput ( const KeyEvent rKEvt,
ExtDateFieldFormat  eFormat,
const LocaleDataWrapper rLocaleDataWrapper 
)
static
uno::Reference< i18n::XCharacterClassification > const& ImplGetCharClass ( )
static OUString ImplGetDateSep ( const LocaleDataWrapper rLocaleDataWrapper,
ExtDateFieldFormat  eFormat 
)
static
static ExtDateFieldFormat ImplGetExtFormat ( DateOrder  eOld)
static

Definition at line 934 of file field2.cxx.

References ShortDDMMYY, ShortMMDDYY, and ShortYYMMDD.

Referenced by DateField::ImplDateSpinArea().

static sal_uInt16 ImplGetNum ( const sal_Unicode *&  rpBuf,
bool &  rbError 
)
static

Definition at line 121 of file field2.cxx.

Referenced by ImplDateGetValue().

static bool ImplIsOnlyDigits ( const OUStringBuffer &  _rStr)
static

Definition at line 1917 of file field2.cxx.

References i.

Referenced by ImplIsValidTimePortion().

static bool ImplIsPatternChar ( sal_Unicode  cChar,
sal_Char  cEditMask 
)
static
static bool ImplIsValidTimePortion ( bool  _bSkipInvalidCharacters,
const OUStringBuffer &  _rStr 
)
static

Definition at line 1928 of file field2.cxx.

References ImplIsOnlyDigits().

Referenced by ImplCutTimePortion().

static sal_Unicode ImplPatternChar ( sal_Unicode  cChar,
sal_Char  cEditMask 
)
static
static sal_Int32 ImplPatternLeftPos ( const OString &  rEditMask,
sal_Int32  nCursorPos 
)
static

Definition at line 413 of file field2.cxx.

References EDITMASK_LITERAL.

Referenced by ImplPatternProcessKeyInput().

static void ImplPatternMaxPos ( const OUString &  rStr,
const OString &  rEditMask,
sal_uInt16  nFormatFlags,
bool  bSameMask,
sal_Int32  nCursorPos,
sal_Int32 &  rPos 
)
static
static bool ImplPatternProcessKeyInput ( Edit pEdit,
const KeyEvent rKEvt,
const OString &  rEditMask,
const OUString &  rLiteralMask,
bool  bStrictFormat,
bool  bSameMask,
bool &  rbInKeyInput 
)
static
static void ImplPatternProcessStrictModify ( Edit pEdit,
const OString &  rEditMask,
const OUString &  rLiteralMask,
bool  bSameMask 
)
static
static OUString ImplPatternReformat ( const OUString &  rStr,
const OString &  rEditMask,
const OUString &  rLiteralMask,
sal_uInt16  nFormatFlags 
)
static
static sal_Int32 ImplPatternRightPos ( const OUString &  rStr,
const OString &  rEditMask,
sal_uInt16  nFormatFlags,
bool  bSameMask,
sal_Int32  nCursorPos 
)
static

Definition at line 430 of file field2.cxx.

References EDITMASK_LITERAL, and ImplPatternMaxPos().

Referenced by ImplPatternProcessKeyInput().

static void ImplSkipDelimiters ( const sal_Unicode *&  rpBuf)
static

Definition at line 140 of file field2.cxx.

Referenced by ImplDateGetValue().

static bool ImplTimeProcessKeyInput ( const KeyEvent rKEvt,
bool  bStrictFormat,
bool  bDuration,
TimeFieldFormat  eFormat,
const LocaleDataWrapper rLocaleDataWrapper 
)
static