diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-07-30 18:48:12 +0900 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-30 13:17:25 +0000 |
commit | d62e6476ce6589ef2c014229a6fb2aa2116ce641 (patch) | |
tree | 87f818e3df2891a3700b8c4961f589b860cc026e /starmath | |
parent | e646e614e26d647c6b7ce6918b8dddad71568f96 (diff) |
starmath: these constans are local and static
Change-Id: I737a67945766454cc611061178acf15b434dd526
Reviewed-on: https://gerrit.libreoffice.org/17417
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/parse.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 4bafb9acdf52..873ac624a4d2 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -356,34 +356,34 @@ void SmParser::Replace( sal_Int32 nPos, sal_Int32 nLen, const OUString &rText ) m_nTokenIndex = m_nTokenIndex + nChg; } - -// First character may be any alphabetic -const sal_Int32 coStartFlags = +void SmParser::NextToken() +{ + // First character may be any alphabetic + static const sal_Int32 coStartFlags = KParseTokens::ANY_LETTER | KParseTokens::IGNORE_LEADING_WS; -// Continuing characters may be any alphabetic -const sal_Int32 coContFlags = - (coStartFlags & ~KParseTokens::IGNORE_LEADING_WS) - | KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING; + // Continuing characters may be any alphabetic + static const sal_Int32 coContFlags = + (coStartFlags & ~KParseTokens::IGNORE_LEADING_WS) + | KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING; -// user-defined char continuing characters may be any alphanumeric or dot. -const sal_Int32 coUserDefinedCharContFlags = - ((KParseTokens::ANY_LETTER_OR_NUMBER | KParseTokens::IGNORE_LEADING_WS | KParseTokens::ASC_DOT) - & ~KParseTokens::IGNORE_LEADING_WS) - | KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING; + // user-defined char continuing characters may be any alphanumeric or dot. + static const sal_Int32 coUserDefinedCharContFlags = + ((KParseTokens::ANY_LETTER_OR_NUMBER | KParseTokens::IGNORE_LEADING_WS | KParseTokens::ASC_DOT) + & ~KParseTokens::IGNORE_LEADING_WS) + | KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING; -// First character for numbers, may be any numeric or dot -const sal_Int32 coNumStartFlags = + // First character for numbers, may be any numeric or dot + static const sal_Int32 coNumStartFlags = KParseTokens::ASC_DIGIT | KParseTokens::ASC_DOT | KParseTokens::IGNORE_LEADING_WS; -// Continuing characters for numbers, may be any numeric or dot. -const sal_Int32 coNumContFlags = - coNumStartFlags & ~KParseTokens::IGNORE_LEADING_WS; -void SmParser::NextToken() -{ + // Continuing characters for numbers, may be any numeric or dot. + static const sal_Int32 coNumContFlags = + coNumStartFlags & ~KParseTokens::IGNORE_LEADING_WS; + static const OUString aEmptyStr; sal_Int32 nBufLen = m_aBufferString.getLength(); |