[Libreoffice-commits] core.git: 2 commits - writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Mar 4 07:40:21 UTC 2016
writerfilter/source/rtftok/rtffly.hxx | 16 ++++----
writerfilter/source/rtftok/rtftokenizer.cxx | 50 ++++++++++++++--------------
writerfilter/source/rtftok/rtftokenizer.hxx | 8 ++--
3 files changed, 37 insertions(+), 37 deletions(-)
New commits:
commit 505473154bd2e717d21b1a7ff1fce322403049df
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 4 08:39:22 2016 +0100
writerfilter: prefix members of RTFTokenizer
Change-Id: Icba6646e183bc283e3c86a223a7f76306123200b
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 1a920c6..1af73de 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::m_aRTFControlWords;
-bool RTFTokenizer::m_bControlWordsSorted;
-std::vector<RTFMathSymbol> RTFTokenizer::m_aRTFMathControlWords;
-bool RTFTokenizer::m_bMathControlWordsSorted;
+std::vector<RTFSymbol> RTFTokenizer::s_m_aRTFControlWords;
+bool RTFTokenizer::s_m_bControlWordsSorted;
+std::vector<RTFMathSymbol> RTFTokenizer::s_m_aRTFMathControlWords;
+bool RTFTokenizer::s_m_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::m_bControlWordsSorted)
+ if (!RTFTokenizer::s_m_bControlWordsSorted)
{
- RTFTokenizer::m_bControlWordsSorted = true;
- m_aRTFControlWords = std::vector<RTFSymbol>(aRTFControlWords, aRTFControlWords + nRTFControlWords);
- std::sort(m_aRTFControlWords.begin(), m_aRTFControlWords.end());
+ RTFTokenizer::s_m_bControlWordsSorted = true;
+ s_m_aRTFControlWords = std::vector<RTFSymbol>(aRTFControlWords, aRTFControlWords + nRTFControlWords);
+ std::sort(s_m_aRTFControlWords.begin(), s_m_aRTFControlWords.end());
}
- if (!RTFTokenizer::m_bMathControlWordsSorted)
+ if (!RTFTokenizer::s_m_bMathControlWordsSorted)
{
- RTFTokenizer::m_bMathControlWordsSorted = true;
- m_aRTFMathControlWords = std::vector<RTFMathSymbol>(aRTFMathControlWords, aRTFMathControlWords + nRTFMathControlWords);
- std::sort(m_aRTFMathControlWords.begin(), m_aRTFMathControlWords.end());
+ RTFTokenizer::s_m_bMathControlWordsSorted = true;
+ s_m_aRTFMathControlWords = std::vector<RTFMathSymbol>(aRTFMathControlWords, aRTFMathControlWords + nRTFMathControlWords);
+ std::sort(s_m_aRTFMathControlWords.begin(), s_m_aRTFMathControlWords.end());
}
}
@@ -271,11 +271,11 @@ RTFError RTFTokenizer::resolveKeyword()
bool RTFTokenizer::lookupMathKeyword(RTFMathSymbol& rSymbol)
{
- std::vector<RTFMathSymbol>::iterator low = std::lower_bound(m_aRTFMathControlWords.begin(), m_aRTFMathControlWords.end(), rSymbol);
- int i = low - m_aRTFMathControlWords.begin();
- if (low == m_aRTFMathControlWords.end() || rSymbol < *low)
+ 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)
return false;
- rSymbol = m_aRTFMathControlWords[i];
+ rSymbol = s_m_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(m_aRTFControlWords.begin(), m_aRTFControlWords.end(), aSymbol);
- int i = low - m_aRTFControlWords.begin();
- if (low == m_aRTFControlWords.end() || aSymbol < *low)
+ 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)
{
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unknown keyword '\\" << rKeyword.getStr() << "'");
RTFSkipDestination aSkip(m_rImport);
@@ -304,28 +304,28 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
}
RTFError ret;
- switch (m_aRTFControlWords[i].nControlType)
+ switch (s_m_aRTFControlWords[i].nControlType)
{
case CONTROL_FLAG:
// flags ignore any parameter by definition
- ret = m_rImport.dispatchFlag(m_aRTFControlWords[i].nIndex);
+ ret = m_rImport.dispatchFlag(s_m_aRTFControlWords[i].nIndex);
if (ret != RTFError::OK)
return ret;
break;
case CONTROL_DESTINATION:
// same for destinations
- ret = m_rImport.dispatchDestination(m_aRTFControlWords[i].nIndex);
+ ret = m_rImport.dispatchDestination(s_m_aRTFControlWords[i].nIndex);
if (ret != RTFError::OK)
return ret;
break;
case CONTROL_SYMBOL:
// and symbols
- ret = m_rImport.dispatchSymbol(m_aRTFControlWords[i].nIndex);
+ ret = m_rImport.dispatchSymbol(s_m_aRTFControlWords[i].nIndex);
if (ret != RTFError::OK)
return ret;
break;
case CONTROL_TOGGLE:
- ret = m_rImport.dispatchToggle(m_aRTFControlWords[i].nIndex, bParam, nParam);
+ ret = m_rImport.dispatchToggle(s_m_aRTFControlWords[i].nIndex, bParam, nParam);
if (ret != RTFError::OK)
return ret;
break;
@@ -333,7 +333,7 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
// values require a parameter by definition
if (bParam)
{
- ret = m_rImport.dispatchValue(m_aRTFControlWords[i].nIndex, nParam);
+ ret = m_rImport.dispatchValue(s_m_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 8e831ec..6f01fc3 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> m_aRTFControlWords;
- static bool m_bControlWordsSorted;
+ static std::vector<RTFSymbol> s_m_aRTFControlWords;
+ static bool s_m_bControlWordsSorted;
// This is the same as aRTFMathControlWords, but sorted
- static std::vector<RTFMathSymbol> m_aRTFMathControlWords;
- static bool m_bMathControlWordsSorted;
+ static std::vector<RTFMathSymbol> s_m_aRTFMathControlWords;
+ static bool s_m_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;
commit 48b0fed24d0fc9e3b6780e298ee629c650530f78
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 4 08:38:05 2016 +0100
writerfilter: prefix members of RTFHori/VertOrient
Change-Id: Icc0a4af0e5995116d65d0dea0881e10ca8d92232
diff --git a/writerfilter/source/rtftok/rtffly.hxx b/writerfilter/source/rtftok/rtffly.hxx
index 505002f..2c78d28 100644
--- a/writerfilter/source/rtftok/rtffly.hxx
+++ b/writerfilter/source/rtftok/rtffly.hxx
@@ -19,18 +19,18 @@ class RTFVertOrient
{
public:
RTFVertOrient(sal_uInt16 nValue)
- : nVal(nValue)
+ : m_nVal(nValue)
{
}
sal_uInt16 GetOrient() const
{
- return OSL_LONIBBLE(OSL_LOBYTE(nVal));
+ return OSL_LONIBBLE(OSL_LOBYTE(m_nVal));
}
sal_uInt16 GetRelation() const
{
- return OSL_HINIBBLE(OSL_LOBYTE(nVal));
+ return OSL_HINIBBLE(OSL_LOBYTE(m_nVal));
}
sal_Int32 GetAlign() const
@@ -72,7 +72,7 @@ public:
}
private:
- sal_uInt16 nVal;
+ sal_uInt16 m_nVal;
};
/// Stores the horizontal orientation properties of an RTF fly frame.
@@ -80,18 +80,18 @@ class RTFHoriOrient
{
public:
RTFHoriOrient(sal_uInt16 nValue)
- : nVal(nValue)
+ : m_nVal(nValue)
{
}
sal_uInt16 GetOrient() const
{
- return OSL_LONIBBLE(OSL_LOBYTE(nVal));
+ return OSL_LONIBBLE(OSL_LOBYTE(m_nVal));
}
sal_uInt16 GetRelation() const
{
- return OSL_LONIBBLE(OSL_HIBYTE(nVal));
+ return OSL_LONIBBLE(OSL_HIBYTE(m_nVal));
}
sal_Int32 GetAlign() const
@@ -139,7 +139,7 @@ public:
}
private:
- sal_uInt16 nVal;
+ sal_uInt16 m_nVal;
};
} // namespace rtftok
} // namespace writerfilter
More information about the Libreoffice-commits
mailing list