LibreOffice Module vcl (master)  1
Namespaces | 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 <officecfg/Office/Common.hxx>
#include <vcl/svapp.hxx>
#include <vcl/event.hxx>
#include <vcl/toolkit/field.hxx>
#include <vcl/unohelp.hxx>
#include <vcl/settings.hxx>
#include <vcl/weldutils.hxx>
#include <svdata.hxx>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
#include <unotools/localedatawrapper.hxx>
#include <unotools/calendarwrapper.hxx>
#include <unotools/charclass.hxx>
Include dependency graph for field2.cxx:

Go to the source code of this file.

Namespaces

 weld
 

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, char cEditMask)
 
static sal_Unicode ImplPatternChar (sal_Unicode cChar, 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 OUString ImplPatternProcessStrictModify (const OUString &rText, const OString &rEditMask, const OUString &rLiteralMask, bool bSameMask)
 
static void ImplPatternProcessStrictModify (Edit *pEdit, const OString &rEditMask, const OUString &rLiteralMask, bool bSameMask)
 
static void ImplPatternProcessStrictModify (weld::Entry &rEntry, const OString &rEditMask, const OUString &rLiteralMask, bool bSameMask)
 
static sal_Int32 ImplPatternLeftPos (std::string_view 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 (IEditImplementation &rEdit, const KeyEvent &rKEvt, const OString &rEditMask, const OUString &rLiteralMask, bool bStrictFormat, bool bSameMask, bool &rbInKeyInput)
 
 weld::IMPL_LINK (PatternFormatter, KeyInputHdl, const KeyEvent &, rKEvt, bool)
 
static ExtDateFieldFormat ImplGetExtFormat (DateOrder eOld)
 
static sal_uInt16 ImplCutNumberFromString (OUString &rStr)
 
static bool ImplCutMonthName (OUString &rStr, std::u16string_view _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 void ImplDateIncrementDay (Date &rDate, bool bUp)
 
static void ImplDateIncrementMonth (Date &rDate, bool bUp)
 
static void ImplDateIncrementYear (Date &rDate, bool bUp)
 
 weld::IMPL_LINK_NOARG (DateFormatter, FormatOutputHdl, LinkParamNone *, bool)
 
 weld::IMPL_LINK (DateFormatter, ParseInputHdl, sal_Int64 *, result, TriState)
 
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)
 
 weld::IMPL_LINK_NOARG (TimeFormatter, FormatOutputHdl, LinkParamNone *, bool)
 
 weld::IMPL_LINK (TimeFormatter, ParseInputHdl, sal_Int64 *, result, TriState)
 
 weld::IMPL_LINK (TimeFormatter, CursorChangedHdl, weld::Entry &, rEntry, void)
 

Macro Definition Documentation

#define EDITMASK_ALLCHAR   'x'

Definition at line 54 of file field2.cxx.

Referenced by ImplIsPatternChar().

#define EDITMASK_ALPHA   'a'

Definition at line 48 of file field2.cxx.

Referenced by ImplIsPatternChar().

#define EDITMASK_ALPHANUM   'c'

Definition at line 50 of file field2.cxx.

Referenced by ImplIsPatternChar().

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

Definition at line 52 of file field2.cxx.

Referenced by ImplIsPatternChar().

#define EDITMASK_NUMSPACE   'n'

Definition at line 53 of file field2.cxx.

Referenced by ImplIsPatternChar().

#define EDITMASK_UPPERALLCHAR   'X'

Definition at line 55 of file field2.cxx.

Referenced by ImplIsPatternChar(), and ImplPatternChar().

#define EDITMASK_UPPERALPHA   'A'

Definition at line 49 of file field2.cxx.

Referenced by ImplIsPatternChar(), and ImplPatternChar().

#define EDITMASK_UPPERALPHANUM   'C'

Definition at line 51 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 77 of file field2.cxx.

Referenced by ImplAddSNum().

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

Definition at line 112 of file field2.cxx.

References ImplAddNum().

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

Definition at line 70 of file field2.cxx.

static bool ImplCommaPointCharEqual ( sal_Unicode  c1,
sal_Unicode  c2 
)
static

Definition at line 214 of file field2.cxx.

Referenced by ImplPatternProcessKeyInput(), and ImplPatternReformat().

static sal_uInt16 ImplCutMonthFromString ( OUString &  rStr,
const CalendarWrapper rCalendarWrapper 
)
static
static bool ImplCutMonthName ( OUString &  rStr,
std::u16string_view  _rLookupMonthName 
)
static

Definition at line 1196 of file field2.cxx.

References index.

Referenced by ImplCutMonthFromString().

static sal_uInt16 ImplCutNumberFromString ( OUString &  rStr)
static

Definition at line 1181 of file field2.cxx.

References nValue.

Referenced by ImplCutMonthFromString().

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

Definition at line 2277 of file field2.cxx.

References ImplIsValidTimePortion().

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 1171 of file field2.cxx.

References ShortDDMMYY, ShortMMDDYY, and ShortYYMMDD.

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

Definition at line 122 of file field2.cxx.

static bool ImplIsOnlyDigits ( const OUStringBuffer &  _rStr)
static

Definition at line 2256 of file field2.cxx.

Referenced by ImplIsValidTimePortion().

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

Definition at line 2267 of file field2.cxx.

References ImplIsOnlyDigits().

Referenced by ImplCutTimePortion().

static sal_Unicode ImplPatternChar ( sal_Unicode  cChar,
char  cEditMask 
)
static
static sal_Int32 ImplPatternLeftPos ( std::string_view  rEditMask,
sal_Int32  nCursorPos 
)
static

Definition at line 464 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 ( IEditImplementation &  rEdit,
const KeyEvent rKEvt,
const OString &  rEditMask,
const OUString &  rLiteralMask,
bool  bStrictFormat,
bool  bSameMask,
bool &  rbInKeyInput 
)
static
static OUString ImplPatternProcessStrictModify ( const OUString &  rText,
const OString &  rEditMask,
const OUString &  rLiteralMask,
bool  bSameMask 
)
static
static void ImplPatternProcessStrictModify ( Edit pEdit,
const OString &  rEditMask,
const OUString &  rLiteralMask,
bool  bSameMask 
)
static
static void ImplPatternProcessStrictModify ( weld::Entry rEntry,
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 481 of file field2.cxx.

References EDITMASK_LITERAL, and ImplPatternMaxPos().

Referenced by ImplPatternProcessKeyInput().

static void ImplSkipDelimiters ( const sal_Unicode *&  rpBuf)
static

Definition at line 141 of file field2.cxx.

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