diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 17:54:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 18:26:55 +0200 |
commit | 0d368642173fa93bb4cdab574423904530bc90a7 (patch) | |
tree | 83d95c236a43adf64d72f32332e9061c612ec462 | |
parent | 832614ffcc771acdfe311e223e66caf58a42918e (diff) |
loplugin:salunicodeliteral: svl
Change-Id: Iaa5b97267b6487c37744bd08d21c82015da9d522
-rw-r--r-- | include/svl/lngmisc.hxx | 8 | ||||
-rw-r--r-- | include/svl/zforlist.hxx | 2 | ||||
-rw-r--r-- | svl/qa/unit/test_lngmisc.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/gridprinter.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/include/svl/lngmisc.hxx b/include/svl/lngmisc.hxx index 85b60458ac3f..7e5728d67a9a 100644 --- a/include/svl/lngmisc.hxx +++ b/include/svl/lngmisc.hxx @@ -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 ); diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index 87e0291730cd..f6f338972886 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -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; diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx index 7ba980373849..8e7f8df57470 100644 --- a/svl/qa/unit/test_lngmisc.cxx +++ b/svl/qa/unit/test_lngmisc.cxx @@ -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() diff --git a/svl/source/misc/gridprinter.cxx b/svl/source/misc/gridprinter.cxx index 70e7439db299..fc89fdea4688 100644 --- a/svl/source/misc/gridprinter.cxx +++ b/svl/source/misc/gridprinter.cxx @@ -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; diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index e9c7fabb4405..59eb48e595b7 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -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! diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 961f2d1701e5..b52646efaf77 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -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; |