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

Miklos Vajna vmiklos at collabora.co.uk
Fri May 6 14:23:09 UTC 2016


 writerfilter/source/rtftok/rtftokenizer.cxx |   52 ++++++++++++++--------------
 writerfilter/source/rtftok/rtftokenizer.hxx |    8 ++--
 2 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit e9514bcc28caa83d39b40137ca09ebe83dc97e0c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri May 6 15:25:25 2016 +0200

    writerfilter: replace 's_m_' prefixes with just 's_'
    
    The intention was to replace m_ with s_ for static members, not to
    prepend s_ to the existing prefix.
    
    Change-Id: If8538061de8b1d22a89c8987201f4cae4ed484df
    Reviewed-on: https://gerrit.libreoffice.org/24700
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 0d4f376..a23c181 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -21,10 +21,10 @@ namespace writerfilter
 namespace rtftok
 {
 
-std::vector<RTFSymbol> RTFTokenizer::s_m_aRTFControlWords;
-bool RTFTokenizer::s_m_bControlWordsSorted;
-std::vector<RTFMathSymbol> RTFTokenizer::s_m_aRTFMathControlWords;
-bool RTFTokenizer::s_m_bMathControlWordsSorted;
+std::vector<RTFSymbol> RTFTokenizer::s_aRTFControlWords;
+bool RTFTokenizer::s_bControlWordsSorted;
+std::vector<RTFMathSymbol> RTFTokenizer::s_aRTFMathControlWords;
+bool RTFTokenizer::s_bMathControlWordsSorted;
 
 RTFTokenizer::RTFTokenizer(RTFListener& rImport, SvStream* pInStream, uno::Reference<task::XStatusIndicator> const& xStatusIndicator)
     : m_rImport(rImport),
@@ -35,17 +35,17 @@ RTFTokenizer::RTFTokenizer(RTFListener& rImport, SvStream* pInStream, uno::Refer
       m_nLineStartPos(0),
       m_nGroupStart(0)
 {
-    if (!RTFTokenizer::s_m_bControlWordsSorted)
+    if (!RTFTokenizer::s_bControlWordsSorted)
     {
-        RTFTokenizer::s_m_bControlWordsSorted = true;
-        s_m_aRTFControlWords = std::vector<RTFSymbol>(aRTFControlWords, aRTFControlWords + nRTFControlWords);
-        std::sort(s_m_aRTFControlWords.begin(), s_m_aRTFControlWords.end());
+        RTFTokenizer::s_bControlWordsSorted = true;
+        s_aRTFControlWords = std::vector<RTFSymbol>(aRTFControlWords, aRTFControlWords + nRTFControlWords);
+        std::sort(s_aRTFControlWords.begin(), s_aRTFControlWords.end());
     }
-    if (!RTFTokenizer::s_m_bMathControlWordsSorted)
+    if (!RTFTokenizer::s_bMathControlWordsSorted)
     {
-        RTFTokenizer::s_m_bMathControlWordsSorted = true;
-        s_m_aRTFMathControlWords = std::vector<RTFMathSymbol>(aRTFMathControlWords, aRTFMathControlWords + nRTFMathControlWords);
-        std::sort(s_m_aRTFMathControlWords.begin(), s_m_aRTFMathControlWords.end());
+        RTFTokenizer::s_bMathControlWordsSorted = true;
+        s_aRTFMathControlWords = std::vector<RTFMathSymbol>(aRTFMathControlWords, aRTFMathControlWords + nRTFMathControlWords);
+        std::sort(s_aRTFMathControlWords.begin(), s_aRTFMathControlWords.end());
     }
 }
 
@@ -271,11 +271,11 @@ RTFError RTFTokenizer::resolveKeyword()
 
 bool RTFTokenizer::lookupMathKeyword(RTFMathSymbol& rSymbol)
 {
-    std::vector<RTFMathSymbol>::iterator low = std::lower_bound(s_m_aRTFMathControlWords.begin(), s_m_aRTFMathControlWords.end(), rSymbol);
-    int i = low - s_m_aRTFMathControlWords.begin();
-    if (low == s_m_aRTFMathControlWords.end() || rSymbol < *low)
+    std::vector<RTFMathSymbol>::iterator low = std::lower_bound(s_aRTFMathControlWords.begin(), s_aRTFMathControlWords.end(), rSymbol);
+    int i = low - s_aRTFMathControlWords.begin();
+    if (low == s_aRTFMathControlWords.end() || rSymbol < *low)
         return false;
-    rSymbol = s_m_aRTFMathControlWords[i];
+    rSymbol = s_aRTFMathControlWords[i];
     return true;
 }
 
@@ -293,9 +293,9 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
              "' with param? " << (bParam ? 1 : 0) <<" param val: '" << (bParam ? nParam : 0) << "'");
     RTFSymbol aSymbol;
     aSymbol.sKeyword = rKeyword.getStr();
-    std::vector<RTFSymbol>::iterator low = std::lower_bound(s_m_aRTFControlWords.begin(), s_m_aRTFControlWords.end(), aSymbol);
-    int i = low - s_m_aRTFControlWords.begin();
-    if (low == s_m_aRTFControlWords.end() || aSymbol < *low)
+    std::vector<RTFSymbol>::iterator low = std::lower_bound(s_aRTFControlWords.begin(), s_aRTFControlWords.end(), aSymbol);
+    int i = low - s_aRTFControlWords.begin();
+    if (low == s_aRTFControlWords.end() || aSymbol < *low)
     {
         SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unknown keyword '\\" << rKeyword.getStr() << "'");
         RTFSkipDestination aSkip(m_rImport);
@@ -304,36 +304,36 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
     }
 
     RTFError ret;
-    switch (s_m_aRTFControlWords[i].nControlType)
+    switch (s_aRTFControlWords[i].nControlType)
     {
     case CONTROL_FLAG:
         // flags ignore any parameter by definition
-        ret = m_rImport.dispatchFlag(s_m_aRTFControlWords[i].nIndex);
+        ret = m_rImport.dispatchFlag(s_aRTFControlWords[i].nIndex);
         if (ret != RTFError::OK)
             return ret;
         break;
     case CONTROL_DESTINATION:
         // same for destinations
-        ret = m_rImport.dispatchDestination(s_m_aRTFControlWords[i].nIndex);
+        ret = m_rImport.dispatchDestination(s_aRTFControlWords[i].nIndex);
         if (ret != RTFError::OK)
             return ret;
         break;
     case CONTROL_SYMBOL:
         // and symbols
-        ret = m_rImport.dispatchSymbol(s_m_aRTFControlWords[i].nIndex);
+        ret = m_rImport.dispatchSymbol(s_aRTFControlWords[i].nIndex);
         if (ret != RTFError::OK)
             return ret;
         break;
     case CONTROL_TOGGLE:
-        ret = m_rImport.dispatchToggle(s_m_aRTFControlWords[i].nIndex, bParam, nParam);
+        ret = m_rImport.dispatchToggle(s_aRTFControlWords[i].nIndex, bParam, nParam);
         if (ret != RTFError::OK)
             return ret;
         break;
     case CONTROL_VALUE:
         // Values require a parameter by definition, but Word doesn't respect this for \dibitmap.
-        if (bParam || s_m_aRTFControlWords[i].nIndex == RTF_DIBITMAP)
+        if (bParam || s_aRTFControlWords[i].nIndex == RTF_DIBITMAP)
         {
-            ret = m_rImport.dispatchValue(s_m_aRTFControlWords[i].nIndex, nParam);
+            ret = m_rImport.dispatchValue(s_aRTFControlWords[i].nIndex, nParam);
             if (ret != RTFError::OK)
                 return ret;
         }
diff --git a/writerfilter/source/rtftok/rtftokenizer.hxx b/writerfilter/source/rtftok/rtftokenizer.hxx
index 6f01fc3..9701f65 100644
--- a/writerfilter/source/rtftok/rtftokenizer.hxx
+++ b/writerfilter/source/rtftok/rtftokenizer.hxx
@@ -60,11 +60,11 @@ private:
     SvStream* m_pInStream;
     css::uno::Reference<css::task::XStatusIndicator> const& m_xStatusIndicator;
     // This is the same as aRTFControlWords, but sorted
-    static std::vector<RTFSymbol> s_m_aRTFControlWords;
-    static bool s_m_bControlWordsSorted;
+    static std::vector<RTFSymbol> s_aRTFControlWords;
+    static bool s_bControlWordsSorted;
     // This is the same as aRTFMathControlWords, but sorted
-    static std::vector<RTFMathSymbol> s_m_aRTFMathControlWords;
-    static bool s_m_bMathControlWordsSorted;
+    static std::vector<RTFMathSymbol> s_aRTFMathControlWords;
+    static bool s_bMathControlWordsSorted;
     /// Same as the size of the importer's states, except that this can be negative for invalid input.
     int m_nGroup;
     sal_Int32 m_nLineNumber;


More information about the Libreoffice-commits mailing list