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

Don't assume sal_Unicode is unsigned short

Change-Id: I3266bb049be3a9b558b68b40d741efdcab2eb759
üst 618463a4
......@@ -2188,7 +2188,8 @@ std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aCha
if( aRet.empty() && aChar != 0 )
{
sal_Char aBuf[8];
sal_Int32 nChars = snprintf( aBuf, sizeof( aBuf ), "uni%.4hX", aChar );
sal_Int32 nChars = snprintf(
aBuf, sizeof(aBuf), "uni%.4hX", sal_uInt16(aChar));
aRet.push_back( OString( aBuf, nChars ) );
}
......
......@@ -483,7 +483,9 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
hb_buffer_set_script(pHbBuffer, maHbScript);
hb_buffer_set_language(pHbBuffer, hb_language_from_string(sLanguage.getStr(), -1));
hb_buffer_set_flags(pHbBuffer, (hb_buffer_flags_t) nHbFlags);
hb_buffer_add_utf16(pHbBuffer, pStr, nLength, nMinRunPos, nRunLen);
hb_buffer_add_utf16(
pHbBuffer, reinterpret_cast<uint16_t const *>(pStr), nLength,
nMinRunPos, nRunLen);
hb_shape(pHbFont, pHbBuffer, nullptr, 0);
int nRunGlyphCount = hb_buffer_get_length(pHbBuffer);
......
......@@ -749,7 +749,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
return false;
// array of unicode source characters
sal_Unicode pUChars[256];
sal_uInt16 pUChars[256];
// encoding vector maps character encoding to the ordinal number
// of the glyph in the output file
......
......@@ -633,7 +633,7 @@ PrinterGfx::getCharMetric (const Font2 &rFont, sal_Unicode n_char, CharacterMetr
}
sal_Int32
PrinterGfx::GetCharWidth (sal_Unicode nFrom, sal_Unicode nTo, long *pWidthArray)
PrinterGfx::GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo, long *pWidthArray)
{
Font2 aFont(*this);
if (aFont.IsSymbolFont() && (nFrom < 256) && (nTo < 256))
......
......@@ -104,7 +104,8 @@ OUString toOUString(const QString& s)
QString toQString(const OUString& s)
{
return QString::fromUtf16(s.getStr(), s.getLength());
return QString::fromUtf16(
reinterpret_cast<ushort const *>(s.getStr()), s.getLength());
}
// KDE4FilePicker
......
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