Kaydet (Commit) 0d368642 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:salunicodeliteral: svl

Change-Id: Iaa5b97267b6487c37744bd08d21c82015da9d522
üst 832614ff
......@@ -24,11 +24,11 @@
#include <rtl/ustring.hxx>
#define SVT_SOFT_HYPHEN (static_cast<sal_Unicode>(0x00AD))
#define SVT_HARD_HYPHEN (static_cast<sal_Unicode>(0x2011))
#define SVT_SOFT_HYPHEN u'\x00AD'
#define SVT_HARD_HYPHEN u'\x2011'
// the non-breaking space
#define SVT_HARD_SPACE (static_cast<sal_Unicode>(0x00A0))
#define SVT_HARD_SPACE u'\x00A0'
namespace linguistic
{
......@@ -40,7 +40,7 @@ namespace linguistic
inline bool IsControlChar(sal_Unicode cChar)
{
// TODO: why doesn't this include 0x0F DEL?
return cChar < static_cast<sal_Unicode>(' ');
return cChar < u' ';
}
sal_Int32 GetNumControlChars( const OUString &rTxt );
......
......@@ -293,7 +293,7 @@ public:
sal_uInt16 nCurrFormat, bool bBank );
/// General Unicode Euro symbol
static sal_Unicode GetEuroSymbol() { return sal_Unicode(0x20AC); }
static sal_Unicode GetEuroSymbol() { return u'\x20AC'; }
};
typedef std::vector< OUString > NfWSStringsDtor;
......
......@@ -129,7 +129,7 @@ namespace
CPPUNIT_ASSERT(bModified);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(32), str4.getLength());
for(int i = 0; i < 32; i++)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Unicode>(' '), str4[i]);
CPPUNIT_ASSERT_EQUAL(u' ', str4[i]);
}
void LngMiscTest::testGetThesaurusReplaceText()
......
......@@ -98,7 +98,7 @@ void GridPrinter::print( const char* pHeader ) const
{
aBuf.append("-");
for (sal_Int32 i = 0; i < aColWidths[col]; ++i)
aBuf.append(sal_Unicode('-'));
aBuf.append(u'-');
aBuf.append("-+");
}
......@@ -115,7 +115,7 @@ void GridPrinter::print( const char* pHeader ) const
size_t nPadding = aColWidths[col] - aStr.getLength();
aBuf.append(aStr);
for (size_t i = 0; i < nPadding; ++i)
aBuf.append(sal_Unicode(' '));
aBuf.append(u' ');
cout << aBuf.makeStringAndClear() << " | ";
}
cout << endl;
......
......@@ -547,7 +547,7 @@ inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString,
const OUString& rSep = pFormatter->GetNumThousandSep();
// Is it an ordinary space instead of a no-break space?
bool bSpaceBreak = (rSep[0] == cNoBreakSpace || rSep[0] == cNarrowNoBreakSpace) &&
rString[0] == (sal_Unicode)0x20 &&
rString[0] == u' ' &&
rSep.getLength() == 1 && rString.getLength() == 1;
if (!((rString == rSep || bSpaceBreak) && // nothing else
nStringPos < nAnzStrings - 1 && // safety first!
......
......@@ -2052,7 +2052,7 @@ static bool lcl_appendStarFillChar( OUStringBuffer& rBuf, const OUString& rStr )
// last character before the user enters another one.
if (rStr.getLength() > 1)
{
rBuf.append((sal_Unicode) 0x1B);
rBuf.append(u'\x001B');
rBuf.append(rStr[1]);
return true;
}
......@@ -2064,7 +2064,7 @@ static bool lcl_insertStarFillChar( OUStringBuffer& rBuf, sal_Int32 nPos, const
if (rStr.getLength() > 1)
{
rBuf.insert( nPos, rStr[1]);
rBuf.insert( nPos, (sal_Unicode) 0x1B);
rBuf.insert( nPos, u'\x001B');
return true;
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment