[Libreoffice-commits] core.git: starmath/source

Takeshi Abe tabe at fixedpoint.jp
Thu Jul 30 06:17:58 PDT 2015


 starmath/source/parse.cxx |   38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

New commits:
commit d62e6476ce6589ef2c014229a6fb2aa2116ce641
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Jul 30 18:48:12 2015 +0900

    starmath: these constans are local and static
    
    Change-Id: I737a67945766454cc611061178acf15b434dd526
    Reviewed-on: https://gerrit.libreoffice.org/17417
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 4bafb9a..873ac62 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();


More information about the Libreoffice-commits mailing list