Kaydet (Commit) 904aff19 authored tarafından Philipp Weissenbacher's avatar Philipp Weissenbacher Kaydeden (comit) Noel Power

Translate German comments, fix some WS

Change-Id: Ic52fc416aea9d1ca7235613aed7cf494f17ae21a
Reviewed-on: https://gerrit.libreoffice.org/4361Reviewed-by: 's avatarNoel Power <noel.power@suse.com>
Tested-by: 's avatarNoel Power <noel.power@suse.com>
üst 8fd1bd18
...@@ -65,9 +65,6 @@ const sal_uInt8 ImpSvNumberInputScan::nMatchedUsedAsReturn = 0x10; ...@@ -65,9 +65,6 @@ const sal_uInt8 ImpSvNumberInputScan::nMatchedUsedAsReturn = 0x10;
* would work, together with the nTimezonePos handling in GetTimeRef(). */ * would work, together with the nTimezonePos handling in GetTimeRef(). */
#define NF_RECOGNIZE_ISO8601_TIMEZONES 0 #define NF_RECOGNIZE_ISO8601_TIMEZONES 0
//---------------------------------------------------------------------------
// Konstruktor
ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP ) ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP )
: :
pUpperMonthText( NULL ), pUpperMonthText( NULL ),
...@@ -92,9 +89,6 @@ ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP ) ...@@ -92,9 +89,6 @@ ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP )
} }
//---------------------------------------------------------------------------
// Destruktor
ImpSvNumberInputScan::~ImpSvNumberInputScan() ImpSvNumberInputScan::~ImpSvNumberInputScan()
{ {
Reset(); Reset();
...@@ -110,9 +104,6 @@ ImpSvNumberInputScan::~ImpSvNumberInputScan() ...@@ -110,9 +104,6 @@ ImpSvNumberInputScan::~ImpSvNumberInputScan()
} }
//---------------------------------------------------------------------------
// Reset
void ImpSvNumberInputScan::Reset() void ImpSvNumberInputScan::Reset()
{ {
nMonth = 0; nMonth = 0;
...@@ -148,8 +139,6 @@ void ImpSvNumberInputScan::Reset() ...@@ -148,8 +139,6 @@ void ImpSvNumberInputScan::Reset()
} }
//---------------------------------------------------------------------------
//
// static // static
inline bool ImpSvNumberInputScan::MyIsdigit( sal_Unicode c ) inline bool ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
{ {
...@@ -157,8 +146,6 @@ inline bool ImpSvNumberInputScan::MyIsdigit( sal_Unicode c ) ...@@ -157,8 +146,6 @@ inline bool ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
} }
//---------------------------------------------------------------------------
//
void ImpSvNumberInputScan::TransformInput( OUString& rStr ) void ImpSvNumberInputScan::TransformInput( OUString& rStr )
{ {
sal_Int32 nPos, nLen; sal_Int32 nPos, nLen;
...@@ -178,12 +165,10 @@ void ImpSvNumberInputScan::TransformInput( OUString& rStr ) ...@@ -178,12 +165,10 @@ void ImpSvNumberInputScan::TransformInput( OUString& rStr )
} }
//--------------------------------------------------------------------------- /**
// StringToDouble * Only simple unsigned floating point values without any error detection,
// * decimal separator has to be '.'
// Only simple unsigned floating point values without any error detection, */
// decimal separator has to be '.'
double ImpSvNumberInputScan::StringToDouble( const OUString& rStr, bool bForceFraction ) double ImpSvNumberInputScan::StringToDouble( const OUString& rStr, bool bForceFraction )
{ {
double fNum = 0.0; double fNum = 0.0;
...@@ -218,27 +203,25 @@ double ImpSvNumberInputScan::StringToDouble( const OUString& rStr, bool bForceFr ...@@ -218,27 +203,25 @@ double ImpSvNumberInputScan::StringToDouble( const OUString& rStr, bool bForceFr
} }
//--------------------------------------------------------------------------- /**
// NextNumberStringSymbol * Splits up the input into numbers and strings for further processing
// * (by the Turing machine).
// Zerlegt die Eingabe in Zahlen und Strings fuer die weitere *
// Verarbeitung (Turing-Maschine). * Starting state = GetChar
//--------------------------------------------------------------------------- * ---------------+-------------------+-----------------------------+---------------
// Ausgangs Zustand = GetChar * Old State | Character read | Event | New state
//---------------+-------------------+-----------------------+--------------- * ---------------+-------------------+-----------------------------+---------------
// Alter Zustand | gelesenes Zeichen | Aktion | Neuer Zustand * GetChar | Number | Symbol = Character | GetValue
//---------------+-------------------+-----------------------+--------------- * | Else | Symbol = Character | GetString
// GetChar | Ziffer | Symbol=Zeichen | GetValue * ---------------|-------------------+-----------------------------+---------------
// | Sonst | Symbol=Zeichen | GetString * GetValue | Number | Symbol = Symbol + Character | GetValue
//---------------|-------------------+-----------------------+--------------- * | Else | Dec(CharPos) | Stop
// GetValue | Ziffer | Symbol=Symbol+Zeichen | GetValue * ---------------+-------------------+-----------------------------+---------------
// | Sonst | Dec(CharPos) | Stop * GetString | Number | Dec(CharPos) | Stop
//---------------+-------------------+-----------------------+--------------- * | Else | Symbol = Symbol + Character | GetString
// GetString | Ziffer | Dec(CharPos) | Stop * ---------------+-------------------+-----------------------------+---------------
// | Sonst | Symbol=Symbol+Zeichen | GetString */
//---------------+-------------------+-----------------------+--------------- enum ScanState // States of the Turing machine
enum ScanState // States der Turing-Maschine
{ {
SsStop = 0, SsStop = 0,
SsStart = 1, SsStart = 1,
...@@ -314,9 +297,6 @@ bool ImpSvNumberInputScan::NextNumberStringSymbol( const sal_Unicode*& pStr, ...@@ -314,9 +297,6 @@ bool ImpSvNumberInputScan::NextNumberStringSymbol( const sal_Unicode*& pStr,
} }
//---------------------------------------------------------------------------
// SkipThousands
// FIXME: should be grouping; it is only used though in case nAnzStrings is // FIXME: should be grouping; it is only used though in case nAnzStrings is
// near SV_MAX_ANZ_INPUT_STRINGS, in NumberStringDivision(). // near SV_MAX_ANZ_INPUT_STRINGS, in NumberStringDivision().
...@@ -386,9 +366,6 @@ bool ImpSvNumberInputScan::SkipThousands( const sal_Unicode*& pStr, ...@@ -386,9 +366,6 @@ bool ImpSvNumberInputScan::SkipThousands( const sal_Unicode*& pStr,
} }
//---------------------------------------------------------------------------
// NumberStringDivision
void ImpSvNumberInputScan::NumberStringDivision( const OUString& rString ) void ImpSvNumberInputScan::NumberStringDivision( const OUString& rString )
{ {
const sal_Unicode* pStr = rString.getStr(); const sal_Unicode* pStr = rString.getStr();
...@@ -396,12 +373,12 @@ void ImpSvNumberInputScan::NumberStringDivision( const OUString& rString ) ...@@ -396,12 +373,12 @@ void ImpSvNumberInputScan::NumberStringDivision( const OUString& rString )
while ( pStr < pEnd && nAnzStrings < SV_MAX_ANZ_INPUT_STRINGS ) while ( pStr < pEnd && nAnzStrings < SV_MAX_ANZ_INPUT_STRINGS )
{ {
if ( NextNumberStringSymbol( pStr, sStrArray[nAnzStrings] ) ) if ( NextNumberStringSymbol( pStr, sStrArray[nAnzStrings] ) )
{ // Zahl { // Number
IsNum[nAnzStrings] = true; IsNum[nAnzStrings] = true;
nNums[nAnzNums] = nAnzStrings; nNums[nAnzNums] = nAnzStrings;
nAnzNums++; nAnzNums++;
if (nAnzStrings >= SV_MAX_ANZ_INPUT_STRINGS - 7 && if (nAnzStrings >= SV_MAX_ANZ_INPUT_STRINGS - 7 &&
nPosThousandString == 0) // nur einmal nPosThousandString == 0) // Only once
{ {
if ( SkipThousands( pStr, sStrArray[nAnzStrings] ) ) if ( SkipThousands( pStr, sStrArray[nAnzStrings] ) )
{ {
...@@ -418,9 +395,9 @@ void ImpSvNumberInputScan::NumberStringDivision( const OUString& rString ) ...@@ -418,9 +395,9 @@ void ImpSvNumberInputScan::NumberStringDivision( const OUString& rString )
} }
//--------------------------------------------------------------------------- /**
// Whether rString contains rWhat at nPos * Whether rString contains rWhat at nPos
*/
bool ImpSvNumberInputScan::StringContainsImpl( const OUString& rWhat, bool ImpSvNumberInputScan::StringContainsImpl( const OUString& rWhat,
const OUString& rString, sal_Int32 nPos ) const OUString& rString, sal_Int32 nPos )
{ {
...@@ -432,9 +409,9 @@ bool ImpSvNumberInputScan::StringContainsImpl( const OUString& rWhat, ...@@ -432,9 +409,9 @@ bool ImpSvNumberInputScan::StringContainsImpl( const OUString& rWhat,
} }
//--------------------------------------------------------------------------- /**
// Whether pString contains rWhat at nPos * Whether pString contains rWhat at nPos
*/
bool ImpSvNumberInputScan::StringPtrContainsImpl( const OUString& rWhat, bool ImpSvNumberInputScan::StringPtrContainsImpl( const OUString& rWhat,
const sal_Unicode* pString, sal_Int32 nPos ) const sal_Unicode* pString, sal_Int32 nPos )
{ {
...@@ -458,11 +435,9 @@ bool ImpSvNumberInputScan::StringPtrContainsImpl( const OUString& rWhat, ...@@ -458,11 +435,9 @@ bool ImpSvNumberInputScan::StringPtrContainsImpl( const OUString& rWhat,
} }
//--------------------------------------------------------------------------- /**
// SkipChar * Skips the supplied char
// */
// ueberspringt genau das angegebene Zeichen
inline bool ImpSvNumberInputScan::SkipChar( sal_Unicode c, const OUString& rString, inline bool ImpSvNumberInputScan::SkipChar( sal_Unicode c, const OUString& rString,
sal_Int32& nPos ) sal_Int32& nPos )
{ {
...@@ -475,11 +450,9 @@ inline bool ImpSvNumberInputScan::SkipChar( sal_Unicode c, const OUString& rStri ...@@ -475,11 +450,9 @@ inline bool ImpSvNumberInputScan::SkipChar( sal_Unicode c, const OUString& rStri
} }
//--------------------------------------------------------------------------- /**
// SkipBlanks * Skips blanks
// */
// Ueberspringt Leerzeichen
inline void ImpSvNumberInputScan::SkipBlanks( const OUString& rString, inline void ImpSvNumberInputScan::SkipBlanks( const OUString& rString,
sal_Int32& nPos ) sal_Int32& nPos )
{ {
...@@ -495,11 +468,9 @@ inline void ImpSvNumberInputScan::SkipBlanks( const OUString& rString, ...@@ -495,11 +468,9 @@ inline void ImpSvNumberInputScan::SkipBlanks( const OUString& rString,
} }
//--------------------------------------------------------------------------- /**
// SkipString * jump over rWhat in rString at nPos
// */
// jump over rWhat in rString at nPos
inline bool ImpSvNumberInputScan::SkipString( const OUString& rWhat, inline bool ImpSvNumberInputScan::SkipString( const OUString& rWhat,
const OUString& rString, sal_Int32& nPos ) const OUString& rString, sal_Int32& nPos )
{ {
...@@ -512,11 +483,9 @@ inline bool ImpSvNumberInputScan::SkipString( const OUString& rWhat, ...@@ -512,11 +483,9 @@ inline bool ImpSvNumberInputScan::SkipString( const OUString& rWhat,
} }
//--------------------------------------------------------------------------- /**
// GetThousandSep * Recognizes exactly ,111 in {3} and {3,2} or ,11 in {3,2} grouping
// */
// recognizes exactly ,111 in {3} and {3,2} or ,11 in {3,2} grouping
inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString, inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString,
sal_Int32& nPos, sal_Int32& nPos,
sal_uInt16 nStringPos ) sal_uInt16 nStringPos )
...@@ -551,14 +520,12 @@ inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString, ...@@ -551,14 +520,12 @@ inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString,
} }
//--------------------------------------------------------------------------- /**
// GetLogical * Conversion of text to logical value
// * "true" => 1:
// Conversion of text to logial value * "false"=> -1:
// "true" => 1: * else => 0:
// "false"=> -1: */
// else => 0:
short ImpSvNumberInputScan::GetLogical( const OUString& rString ) short ImpSvNumberInputScan::GetLogical( const OUString& rString )
{ {
short res; short res;
...@@ -580,12 +547,10 @@ short ImpSvNumberInputScan::GetLogical( const OUString& rString ) ...@@ -580,12 +547,10 @@ short ImpSvNumberInputScan::GetLogical( const OUString& rString )
} }
//--------------------------------------------------------------------------- /**
// GetMonth * Converts a string containing a month name (JAN, January) at nPos into the
// * month number (negative if abbreviated), returns 0 if nothing found
// Converts a string containing a month name (JAN, January) at nPos into the */
// month number (negative if abbreviated), returns 0 if nothing found
short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos ) short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
{ {
// #102136# The correct English form of month September abbreviated is // #102136# The correct English form of month September abbreviated is
...@@ -654,12 +619,10 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos ) ...@@ -654,12 +619,10 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
} }
//--------------------------------------------------------------------------- /**
// GetDayOfWeek * Converts a string containing a DayOfWeek name (Mon, Monday) at nPos into the
// * DayOfWeek number + 1 (negative if abbreviated), returns 0 if nothing found
// Converts a string containing a DayOfWeek name (Mon, Monday) at nPos into the */
// DayOfWeek number + 1 (negative if abbreviated), returns 0 if nothing found
int ImpSvNumberInputScan::GetDayOfWeek( const OUString& rString, sal_Int32& nPos ) int ImpSvNumberInputScan::GetDayOfWeek( const OUString& rString, sal_Int32& nPos )
{ {
int res = 0; // no day found int res = 0; // no day found
...@@ -692,13 +655,11 @@ int ImpSvNumberInputScan::GetDayOfWeek( const OUString& rString, sal_Int32& nPos ...@@ -692,13 +655,11 @@ int ImpSvNumberInputScan::GetDayOfWeek( const OUString& rString, sal_Int32& nPos
} }
//--------------------------------------------------------------------------- /**
// GetCurrency * Reading a currency symbol
// * '$' => true
// Lesen eines Waehrungssysmbols * else => false
// '$' => true */
// sonst => false
bool ImpSvNumberInputScan::GetCurrency( const OUString& rString, sal_Int32& nPos, bool ImpSvNumberInputScan::GetCurrency( const OUString& rString, sal_Int32& nPos,
const SvNumberformat* pFormat ) const SvNumberformat* pFormat )
{ {
...@@ -737,20 +698,18 @@ bool ImpSvNumberInputScan::GetCurrency( const OUString& rString, sal_Int32& nPos ...@@ -737,20 +698,18 @@ bool ImpSvNumberInputScan::GetCurrency( const OUString& rString, sal_Int32& nPos
} }
//--------------------------------------------------------------------------- /**
// GetTimeAmPm * Reading the time period specifier (AM/PM) for the 12 hour clock
// *
// Lesen des Zeitsymbols (AM od. PM) f. kurze Zeitangabe * Returns:
// * "AM" or "PM" => true
// Rueckgabe: * else => false
// "AM" od. "PM" => true *
// sonst => false * nAmPos:
// * "AM" => 1
// nAmPos: * "PM" => -1
// "AM" => 1 * else => 0
// "PM" => -1 */
// sonst => 0
bool ImpSvNumberInputScan::GetTimeAmPm( const OUString& rString, sal_Int32& nPos ) bool ImpSvNumberInputScan::GetTimeAmPm( const OUString& rString, sal_Int32& nPos )
{ {
...@@ -776,13 +735,11 @@ bool ImpSvNumberInputScan::GetTimeAmPm( const OUString& rString, sal_Int32& nPos ...@@ -776,13 +735,11 @@ bool ImpSvNumberInputScan::GetTimeAmPm( const OUString& rString, sal_Int32& nPos
} }
//--------------------------------------------------------------------------- /**
// GetDecSep * Read a decimal separator (',')
// * ',' => true
// Lesen eines Dezimaltrenners (',') * else => false
// ',' => true */
// sonst => false
inline bool ImpSvNumberInputScan::GetDecSep( const OUString& rString, sal_Int32& nPos ) inline bool ImpSvNumberInputScan::GetDecSep( const OUString& rString, sal_Int32& nPos )
{ {
if ( rString.getLength() > nPos ) if ( rString.getLength() > nPos )
...@@ -798,9 +755,9 @@ inline bool ImpSvNumberInputScan::GetDecSep( const OUString& rString, sal_Int32& ...@@ -798,9 +755,9 @@ inline bool ImpSvNumberInputScan::GetDecSep( const OUString& rString, sal_Int32&
} }
//--------------------------------------------------------------------------- /**
// read a hundredth seconds separator * Reading a hundredth seconds separator
*/
inline bool ImpSvNumberInputScan::GetTime100SecSep( const OUString& rString, sal_Int32& nPos ) inline bool ImpSvNumberInputScan::GetTime100SecSep( const OUString& rString, sal_Int32& nPos )
{ {
if ( rString.getLength() > nPos ) if ( rString.getLength() > nPos )
...@@ -816,15 +773,13 @@ inline bool ImpSvNumberInputScan::GetTime100SecSep( const OUString& rString, sal ...@@ -816,15 +773,13 @@ inline bool ImpSvNumberInputScan::GetTime100SecSep( const OUString& rString, sal
} }
//--------------------------------------------------------------------------- /**
// GetSign * Read a sign including brackets
// * '+' => 1
// Lesen eines Vorzeichens, auch Klammer !?! * '-' => -1
// '+' => 1 * '(' => -1, nNegCheck = 1
// '-' => -1 * else => 0
// '(' => -1, nNegCheck = 1 */
// sonst => 0
int ImpSvNumberInputScan::GetSign( const OUString& rString, sal_Int32& nPos ) int ImpSvNumberInputScan::GetSign( const OUString& rString, sal_Int32& nPos )
{ {
if (rString.getLength() > nPos) if (rString.getLength() > nPos)
...@@ -833,7 +788,7 @@ int ImpSvNumberInputScan::GetSign( const OUString& rString, sal_Int32& nPos ) ...@@ -833,7 +788,7 @@ int ImpSvNumberInputScan::GetSign( const OUString& rString, sal_Int32& nPos )
case '+': case '+':
nPos++; nPos++;
return 1; return 1;
case '(': // '(' aehnlich wie '-' ?!? case '(': // '(' similar to '-' ?!?
nNegCheck = 1; nNegCheck = 1;
//! fallthru //! fallthru
case '-': case '-':
...@@ -847,14 +802,12 @@ int ImpSvNumberInputScan::GetSign( const OUString& rString, sal_Int32& nPos ) ...@@ -847,14 +802,12 @@ int ImpSvNumberInputScan::GetSign( const OUString& rString, sal_Int32& nPos )
} }
//--------------------------------------------------------------------------- /**
// GetESign * Read a sign with an exponent
// * '+' => 1
// Lesen eines Vorzeichens, gedacht fuer Exponent ?!? * '-' => -1
// '+' => 1 * else => 0
// '-' => -1 */
// sonst => 0
short ImpSvNumberInputScan::GetESign( const OUString& rString, sal_Int32& nPos ) short ImpSvNumberInputScan::GetESign( const OUString& rString, sal_Int32& nPos )
{ {
if (rString.getLength() > nPos) if (rString.getLength() > nPos)
...@@ -875,12 +828,10 @@ short ImpSvNumberInputScan::GetESign( const OUString& rString, sal_Int32& nPos ) ...@@ -875,12 +828,10 @@ short ImpSvNumberInputScan::GetESign( const OUString& rString, sal_Int32& nPos )
} }
//--------------------------------------------------------------------------- /**
// GetNextNumber * i counts string portions, j counts numbers thereof.
// * It should had been called SkipNumber instead.
// i counts string portions, j counts numbers thereof. */
// It should had been called SkipNumber instead.
inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j ) inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j )
{ {
if ( i < nAnzStrings && IsNum[i] ) if ( i < nAnzStrings && IsNum[i] )
...@@ -893,9 +844,6 @@ inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j ) ...@@ -893,9 +844,6 @@ inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j )
} }
//---------------------------------------------------------------------------
// GetTimeRef
bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber, bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
sal_uInt16 nIndex, // j-value of the first numeric time part of input, default 0 sal_uInt16 nIndex, // j-value of the first numeric time part of input, default 0
sal_uInt16 nAnz ) // count of numeric time parts sal_uInt16 nAnz ) // count of numeric time parts
...@@ -974,9 +922,6 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber, ...@@ -974,9 +922,6 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
} }
//---------------------------------------------------------------------------
// ImplGetDay
sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex ) sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex )
{ {
sal_uInt16 nRes = 0; sal_uInt16 nRes = 0;
...@@ -994,12 +939,9 @@ sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex ) ...@@ -994,12 +939,9 @@ sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex )
} }
//---------------------------------------------------------------------------
// ImplGetMonth
sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex ) sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex )
{ {
// preset invalid month number // Preset invalid month number
sal_uInt16 nRes = pFormatter->GetCalendar()->getNumberOfMonthsInYear(); sal_uInt16 nRes = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
if (sStrArray[nNums[nIndex]].getLength() <= 2) if (sStrArray[nNums[nIndex]].getLength() <= 2)
...@@ -1015,11 +957,9 @@ sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex ) ...@@ -1015,11 +957,9 @@ sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex )
} }
//--------------------------------------------------------------------------- /**
// ImplGetYear * 30 -> 1930, 29 -> 2029, or 56 -> 1756, 55 -> 1855, ...
// */
// 30 -> 1930, 29 -> 2029, oder 56 -> 1756, 55 -> 1855, ...
sal_uInt16 ImpSvNumberInputScan::ImplGetYear( sal_uInt16 nIndex ) sal_uInt16 ImpSvNumberInputScan::ImplGetYear( sal_uInt16 nIndex )
{ {
sal_uInt16 nYear = 0; sal_uInt16 nYear = 0;
...@@ -1039,7 +979,6 @@ sal_uInt16 ImpSvNumberInputScan::ImplGetYear( sal_uInt16 nIndex ) ...@@ -1039,7 +979,6 @@ sal_uInt16 ImpSvNumberInputScan::ImplGetYear( sal_uInt16 nIndex )
return nYear; return nYear;
} }
//---------------------------------------------------------------------------
bool ImpSvNumberInputScan::MayBeIso8601() bool ImpSvNumberInputScan::MayBeIso8601()
{ {
...@@ -1065,7 +1004,6 @@ bool ImpSvNumberInputScan::MayBeIso8601() ...@@ -1065,7 +1004,6 @@ bool ImpSvNumberInputScan::MayBeIso8601()
return nMayBeIso8601 > 1; return nMayBeIso8601 > 1;
} }
//---------------------------------------------------------------------------
bool ImpSvNumberInputScan::CanForceToIso8601( DateFormat eDateFormat ) bool ImpSvNumberInputScan::CanForceToIso8601( DateFormat eDateFormat )
{ {
...@@ -1108,7 +1046,6 @@ bool ImpSvNumberInputScan::CanForceToIso8601( DateFormat eDateFormat ) ...@@ -1108,7 +1046,6 @@ bool ImpSvNumberInputScan::CanForceToIso8601( DateFormat eDateFormat )
return nCanForceToIso8601 > 1; return nCanForceToIso8601 > 1;
} }
//---------------------------------------------------------------------------
bool ImpSvNumberInputScan::MayBeMonthDate() bool ImpSvNumberInputScan::MayBeMonthDate()
{ {
...@@ -1155,7 +1092,6 @@ bool ImpSvNumberInputScan::MayBeMonthDate() ...@@ -1155,7 +1092,6 @@ bool ImpSvNumberInputScan::MayBeMonthDate()
return nMayBeMonthDate > 1; return nMayBeMonthDate > 1;
} }
//---------------------------------------------------------------------------
bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
{ {
...@@ -1292,7 +1228,6 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) ...@@ -1292,7 +1228,6 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
return false; return false;
} }
//---------------------------------------------------------------------------
bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_Int32 & rPos ) bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_Int32 & rPos )
{ {
...@@ -1345,7 +1280,6 @@ bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_I ...@@ -1345,7 +1280,6 @@ bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_I
return false; return false;
} }
//---------------------------------------------------------------------------
sal_uInt16 ImpSvNumberInputScan::GetDatePatternNumbers() sal_uInt16 ImpSvNumberInputScan::GetDatePatternNumbers()
{ {
...@@ -1357,7 +1291,6 @@ sal_uInt16 ImpSvNumberInputScan::GetDatePatternNumbers() ...@@ -1357,7 +1291,6 @@ sal_uInt16 ImpSvNumberInputScan::GetDatePatternNumbers()
return nDatePatternNumbers; return nDatePatternNumbers;
} }
//---------------------------------------------------------------------------
sal_uInt32 ImpSvNumberInputScan::GetDatePatternOrder() sal_uInt32 ImpSvNumberInputScan::GetDatePatternOrder()
{ {
...@@ -1382,7 +1315,6 @@ sal_uInt32 ImpSvNumberInputScan::GetDatePatternOrder() ...@@ -1382,7 +1315,6 @@ sal_uInt32 ImpSvNumberInputScan::GetDatePatternOrder()
return nOrder; return nOrder;
} }
//---------------------------------------------------------------------------
DateFormat ImpSvNumberInputScan::GetDateOrder() DateFormat ImpSvNumberInputScan::GetDateOrder()
{ {
...@@ -1458,9 +1390,6 @@ DateFormat ImpSvNumberInputScan::GetDateOrder() ...@@ -1458,9 +1390,6 @@ DateFormat ImpSvNumberInputScan::GetDateOrder()
return pFormatter->GetLocaleData()->getDateFormat(); return pFormatter->GetLocaleData()->getDateFormat();
} }
//---------------------------------------------------------------------------
// GetDateRef
bool ImpSvNumberInputScan::GetDateRef( double& fDays, sal_uInt16& nCounter, bool ImpSvNumberInputScan::GetDateRef( double& fDays, sal_uInt16& nCounter,
const SvNumberformat* pFormat ) const SvNumberformat* pFormat )
{ {
...@@ -2015,13 +1944,11 @@ input for the following reasons: ...@@ -2015,13 +1944,11 @@ input for the following reasons:
} }
//--------------------------------------------------------------------------- /**
// ScanStartString * Analyze first string
// * All gone => true
// ersten String analysieren * else => false
// Alles weg => true */
// sonst => false
bool ImpSvNumberInputScan::ScanStartString( const OUString& rString, bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
const SvNumberformat* pFormat ) const SvNumberformat* pFormat )
{ {
...@@ -2152,13 +2079,11 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString, ...@@ -2152,13 +2079,11 @@ bool ImpSvNumberInputScan::ScanStartString( const OUString& rString,
} }
//--------------------------------------------------------------------------- /**
// ScanMidString * Analyze string in the middle
// * All gone => true
// String in der Mitte analysieren * else => false
// Alles weg => true */
// sonst => false
bool ImpSvNumberInputScan::ScanMidString( const OUString& rString, bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
sal_uInt16 nStringPos, const SvNumberformat* pFormat ) sal_uInt16 nStringPos, const SvNumberformat* pFormat )
{ {
...@@ -2465,13 +2390,11 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString, ...@@ -2465,13 +2390,11 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
} }
//--------------------------------------------------------------------------- /**
// ScanEndString * Analyze the end
// * All gone => true
// Schlussteil analysieren * else => false
// Alles weg => true */
// sonst => false
bool ImpSvNumberInputScan::ScanEndString( const OUString& rString, bool ImpSvNumberInputScan::ScanEndString( const OUString& rString,
const SvNumberformat* pFormat ) const SvNumberformat* pFormat )
{ {
...@@ -2886,12 +2809,10 @@ bool ImpSvNumberInputScan::ScanStringNumFor( const OUString& rString, / ...@@ -2886,12 +2809,10 @@ bool ImpSvNumberInputScan::ScanStringNumFor( const OUString& rString, /
} }
//--------------------------------------------------------------------------- /**
// IsNumberFormatMain * Recognizes types of number, exponential, fraction, percent, currency, date, time.
// * Else text => return false
// Recognizes types of number, exponential, fraction, percent, currency, date, time. */
// Else text => return false
bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, // string to be analyzed bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, // string to be analyzed
const SvNumberformat* pFormat ) // maybe number format set to match against const SvNumberformat* pFormat ) // maybe number format set to match against
{ {
...@@ -3194,8 +3115,9 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString, ...@@ -3194,8 +3115,9 @@ bool ImpSvNumberInputScan::IsNumberFormatMain( const OUString& rString,
} }
//--------------------------------------------------------------------------- /**
// return true or false depending on the nMatched... state and remember usage * Return true or false depending on the nMatched... state and remember usage
*/
bool ImpSvNumberInputScan::MatchedReturn() bool ImpSvNumberInputScan::MatchedReturn()
{ {
if ( nMatchedAllStrings & ~nMatchedVirgin ) if ( nMatchedAllStrings & ~nMatchedVirgin )
...@@ -3207,9 +3129,9 @@ bool ImpSvNumberInputScan::MatchedReturn() ...@@ -3207,9 +3129,9 @@ bool ImpSvNumberInputScan::MatchedReturn()
} }
//--------------------------------------------------------------------------- /**
// Initialize uppercase months and weekdays * Initialize uppercase months and weekdays
*/
void ImpSvNumberInputScan::InitText() void ImpSvNumberInputScan::InitText()
{ {
sal_Int32 j, nElems; sal_Int32 j, nElems;
...@@ -3283,14 +3205,9 @@ void ImpSvNumberInputScan::InitText() ...@@ -3283,14 +3205,9 @@ void ImpSvNumberInputScan::InitText()
} }
//=========================================================================== /**
// P U B L I C * MUST be called if International/Locale is changed
*/
//---------------------------------------------------------------------------
// ChangeIntl
//
// MUST be called if International/Locale is changed
void ImpSvNumberInputScan::ChangeIntl() void ImpSvNumberInputScan::ChangeIntl()
{ {
sal_Unicode cDecSep = pFormatter->GetNumDecimalSep()[0]; sal_Unicode cDecSep = pFormatter->GetNumDecimalSep()[0];
...@@ -3311,9 +3228,6 @@ void ImpSvNumberInputScan::InvalidateDateAcceptancePatterns() ...@@ -3311,9 +3228,6 @@ void ImpSvNumberInputScan::InvalidateDateAcceptancePatterns()
} }
//---------------------------------------------------------------------------
// ChangeNullDate
void ImpSvNumberInputScan::ChangeNullDate( const sal_uInt16 Day, void ImpSvNumberInputScan::ChangeNullDate( const sal_uInt16 Day,
const sal_uInt16 Month, const sal_uInt16 Month,
const sal_uInt16 Year ) const sal_uInt16 Year )
...@@ -3329,11 +3243,9 @@ void ImpSvNumberInputScan::ChangeNullDate( const sal_uInt16 Day, ...@@ -3329,11 +3243,9 @@ void ImpSvNumberInputScan::ChangeNullDate( const sal_uInt16 Day,
} }
//--------------------------------------------------------------------------- /**
// IsNumberFormat * Does rString represent a number (also date, time et al)
// */
// => does rString represent a number (also date, time et al)
bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // string to be analyzed bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // string to be analyzed
short& F_Type, // IN: old type, OUT: new type short& F_Type, // IN: old type, OUT: new type
double& fOutNumber, // OUT: number if convertible double& fOutNumber, // OUT: number if convertible
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment