summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-28 17:55:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-28 18:26:56 +0200
commit740cf511036cdf881a521a79218d3dcc29422db3 (patch)
tree9eaa8ec35c47e144dc5dac59ef438bd46a0100e6 /starmath/source
parentc22ecc18674a8f9f41afa9f6b1364989b18147d7 (diff)
loplugin:salunicodeliteral: starmath
Change-Id: Ic02e71ccb2d5fe2e3505853c6e164f17e26361b2
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/mathmlattr.cxx8
-rw-r--r--starmath/source/mathmlexport.cxx2
-rw-r--r--starmath/source/node.cxx4
-rw-r--r--starmath/source/ooxmlimport.cxx4
-rw-r--r--starmath/source/rect.cxx12
5 files changed, 15 insertions, 15 deletions
diff --git a/starmath/source/mathmlattr.cxx b/starmath/source/mathmlattr.cxx
index 0c39c3e2862e..fd7bf378724c 100644
--- a/starmath/source/mathmlattr.cxx
+++ b/starmath/source/mathmlattr.cxx
@@ -34,14 +34,14 @@ sal_Int32 ParseMathMLUnsignedNumber(const OUString &rStr, Fraction *pUN)
for (nIdx = 0; nIdx < nLen; nIdx++)
{
auto cD = rStr[nIdx];
- if (cD == sal_Unicode('.'))
+ if (cD == u'.')
{
if (nDecimalPoint >= 0)
return -1;
nDecimalPoint = nIdx;
continue;
}
- if (cD < sal_Unicode('0') || sal_Unicode('9') < cD)
+ if (cD < u'0' || u'9' < cD)
break;
}
if (nIdx == 0 || (nIdx == 1 && nDecimalPoint == 0))
@@ -72,7 +72,7 @@ sal_Int32 ParseMathMLNumber(const OUString &rStr, Fraction *pN)
assert(pN);
if (rStr.isEmpty())
return -1;
- bool bNegative = (rStr[0] == sal_Unicode('-'));
+ bool bNegative = (rStr[0] == '-');
sal_Int32 nOffset = bNegative ? 1 : 0;
Fraction aF;
auto nIdx = ParseMathMLUnsignedNumber(rStr.copy(nOffset), &aF);
@@ -137,7 +137,7 @@ sal_Int32 ParseMathMLAttributeLengthValue(const OUString &rStr, MathMLAttributeL
pV->eUnit = MathMLLengthUnit::Pc;
return nIdx + 2;
}
- if (sRest[0] == sal_Unicode('%'))
+ if (sRest[0] == u'%')
{
pV->eUnit = MathMLLengthUnit::Percent;
return nIdx + 2;
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 69546741e792..596ad9824129 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -90,7 +90,7 @@ sal_Unicode ConvertMathToMathML( sal_Unicode cChar )
if (IsInPrivateUseArea( cChar ))
{
SAL_WARN("starmath", "Error: private use area characters should no longer be in use!" );
- cRes = sal_Unicode('@'); // just some character that should easily be notice as odd in the context
+ cRes = u'@'; // just some character that should easily be notice as odd in the context
}
return cRes;
}
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 2907ca4bd5b1..3327d8c57b80 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2348,7 +2348,7 @@ SmMathSymbolNode::SmMathSymbolNode(const SmToken &rNodeToken)
: SmSpecialNode(SmNodeType::Math, rNodeToken, FNT_MATH)
{
sal_Unicode cChar = GetToken().cMathChar;
- if (sal_Unicode('\0') != cChar)
+ if (u'\0' != cChar)
SetText(OUString(cChar));
}
@@ -2570,7 +2570,7 @@ static bool lcl_IsFromGreekSymbolSet( const OUString &rTokenText )
bool bRes = false;
// valid symbol name needs to have a '%' at pos 0 and at least an additional char
- if (rTokenText.getLength() > 2 && rTokenText[0] == sal_Unicode('%'))
+ if (rTokenText.getLength() > 2 && rTokenText[0] == u'%')
{
OUString aName( rTokenText.copy(1) );
SmSym *pSymbol = SM_MOD()->GetSymbolManager().GetSymbolByName( aName );
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 8d5c3ed5385a..1b80468320b2 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -457,9 +457,9 @@ OUString SmOoxmlImport::handleGroupChr()
}
OUString e = readOMathArgInElement( M_TOKEN( e ));
m_rStream.ensureClosingTag( M_TOKEN( groupChr ));
- if( pos == top && chr == sal_Unicode( 0x23de ))
+ if( pos == top && chr == u'\x23de')
return "{" + e + "} overbrace { }";
- if( pos == bot && chr == sal_Unicode( 0x23df ))
+ if( pos == bot && chr == u'\x23df')
return "{" + e + "} underbrace { }";
if( pos == top )
return "{" + e + "} csup {" + OUStringLiteral1( chr ) + "}";
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index a693d932d07a..0199290ee215 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -119,13 +119,13 @@ bool SmIsMathAlpha(const OUString &rText)
// and symbols).
static std::unordered_set<sal_Unicode> const aMathAlpha({
MS_ALEPH, MS_IM, MS_RE,
- MS_WP, sal_Unicode(0xE070), MS_EMPTYSET,
- sal_Unicode(0x2113), sal_Unicode(0xE0D6), sal_Unicode(0x2107),
- sal_Unicode(0x2127), sal_Unicode(0x210A), MS_HBAR,
+ MS_WP, u'\xE070', MS_EMPTYSET,
+ u'\x2113', u'\xE0D6', u'\x2107',
+ u'\x2127', u'\x210A', MS_HBAR,
MS_LAMBDABAR, MS_SETN, MS_SETZ,
MS_SETQ, MS_SETR, MS_SETC,
- sal_Unicode(0x2373), sal_Unicode(0xE0A5), sal_Unicode(0x2112),
- sal_Unicode(0x2130), sal_Unicode(0x2131)
+ u'\x2373', u'\xE0A5', u'\x2112',
+ u'\x2130', u'\x2131'
});
if (rText.isEmpty())
@@ -135,7 +135,7 @@ bool SmIsMathAlpha(const OUString &rText)
sal_Unicode cChar = rText[0];
// is it a greek symbol?
- if (sal_Unicode(0xE0AC) <= cChar && cChar <= sal_Unicode(0xE0D4))
+ if (u'\xE0AC' <= cChar && cChar <= u'\xE0D4')
return true;
// or, does it appear in 'aMathAlpha'?
return aMathAlpha.find(cChar) != aMathAlpha.end();