diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 17:53:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 18:26:54 +0200 |
commit | ef2c0e73630d3c74f6fc3eda8416488356ff1b7d (patch) | |
tree | fa2e682ec371c6d985ed8317f9bcd35dd577307b /vcl/source | |
parent | 229b3a3e0a74c8fa3a1629fc1dbf858dcf2a9c50 (diff) |
loplugin:salunicodeliteral: vcl
Change-Id: I4a982da10ad76f8ae05355cec9629b906c95afdb
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 2 | ||||
-rw-r--r-- | vcl/source/font/fontmetric.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index cc8959373cfb..c24ce0339a42 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1124,7 +1124,7 @@ Size ComboBox::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const { - long nCharWidth = GetTextWidth(OUString(static_cast<sal_Unicode>('x'))); + long nCharWidth = GetTextWidth(OUString(u'x')); if ( !IsDropDownBox() ) { Size aOutSz = m_pImpl->m_pImplLB->GetMainWindow()->GetOutputSizePixel(); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 0a778b86148f..393d12740cea 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -441,7 +441,7 @@ OUString Edit::ImplGetText() const if ( mcEchoChar ) cEchoChar = mcEchoChar; else - cEchoChar = sal_Unicode(0x2022); + cEchoChar = u'\x2022'; OUStringBuffer aText; comphelper::string::padToLength(aText, maText.getLength(), cEchoChar); return aText.makeStringAndClear(); diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 14478398fd11..d5ce9c988b3b 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -608,7 +608,7 @@ sal_uInt16 GetCharWidth(OutputDevice& rOut, UCHAR c) } else { - ChrWidth=(sal_uInt16)rOut.GetTextWidth(OUString(static_cast<sal_Unicode>('A'))); + ChrWidth=(sal_uInt16)rOut.GetTextWidth(OUString(u'A')); } } return ChrWidth; diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index b397684136e0..a255d0403847 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -324,7 +324,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev ) bool bCentered = true; if (MsLangId::isCJK(rFont.GetLanguage())) { - const OUString sFullstop( sal_Unicode( 0x3001 ) ); // Fullwidth fullstop + const OUString sFullstop( u'\x3001' ); // Fullwidth fullstop tools::Rectangle aRect; pDev->GetTextBoundRect( aRect, sFullstop ); const sal_uInt16 nH = rFont.GetFontSize().Height(); @@ -335,7 +335,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev ) } SetFullstopCenteredFlag( bCentered ); - mnBulletOffset = ( pDev->GetTextWidth( OUString( sal_Unicode( 0x20 ) ) ) - pDev->GetTextWidth( OUString( sal_Unicode( 0xb7 ) ) ) ) >> 1 ; + mnBulletOffset = ( pDev->GetTextWidth( OUString( u' ' ) ) - pDev->GetTextWidth( OUString( u'\x00b7' ) ) ) >> 1 ; } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index aaa8f9710ef2..d97948b666a6 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -7591,19 +7591,19 @@ static void escapeStringXML( const OUString& rStr, OUString &rValue) { switch( *pUni ) { - case sal_Unicode('&'): + case u'&': rValue += "&"; break; - case sal_Unicode('<'): + case u'<': rValue += "<"; break; - case sal_Unicode('>'): + case u'>': rValue += ">"; break; - case sal_Unicode('\''): + case u'\'': rValue += "'"; break; - case sal_Unicode('"'): + case u'"': rValue += """; break; default: @@ -7630,7 +7630,7 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata() aMetadataStream.append( "<?xpacket begin=\"" ); // these lines write Unicode "zero width non-breaking space character" (U+FEFF) // (aka byte-order mark ) used as a byte-order marker. - aMetadataStream.append( OUStringToOString( OUString( sal_Unicode( 0xFEFF ) ), RTL_TEXTENCODING_UTF8 ) ); + aMetadataStream.append( OUStringToOString( OUString( u'\xFEFF' ), RTL_TEXTENCODING_UTF8 ) ); aMetadataStream.append( "\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n" ); aMetadataStream.append( "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">\n" ); aMetadataStream.append( " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n" ); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index f793b852e4da..c3ef73c60b3c 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -245,7 +245,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi Size aLogicPaperSize( LogicToLogic( i_rOrigSize, MapMode( MapUnit::Map100thMM ), MapMode( eUnit ) ) ); OUString aNumText( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) ); aBuf.append( aNumText ) - .append( sal_Unicode( ' ' ) ); + .append( u' ' ); aBuf.appendAscii( eUnit == MapUnit::MapMM ? "mm" : "in" ); if( !i_rPaperName.isEmpty() ) { @@ -257,7 +257,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi aNumText = rLocWrap.getNum( aLogicPaperSize.Height(), nDigits ); aBuf.append( aNumText ) - .append( sal_Unicode( ' ' ) ); + .append( u' ' ); aBuf.appendAscii( eUnit == MapUnit::MapMM ? "mm" : "in" ); maVertDim->SetText( aBuf.makeStringAndClear() ); |