simplified code now that utf8_str() always returns a scoped buffer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1597,12 +1597,7 @@ void wxGnomePrinterDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wx
|
|||||||
|
|
||||||
bool underlined = m_font.Ok() && m_font.GetUnderlined();
|
bool underlined = m_font.Ok() && m_font.GetUnderlined();
|
||||||
|
|
||||||
// FIXME-UTF8: wouldn't be needed if utf8_str() always returned a buffer
|
const wxScopedCharBuffer data(text.utf8_str());
|
||||||
#if wxUSE_UNICODE_UTF8
|
|
||||||
const char *data = text.utf8_str();
|
|
||||||
#else
|
|
||||||
const wxCharBuffer data = text.utf8_str();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
size_t datalen = strlen(data);
|
size_t datalen = strlen(data);
|
||||||
pango_layout_set_text( m_layout, data, datalen);
|
pango_layout_set_text( m_layout, data, datalen);
|
||||||
@@ -1913,12 +1908,7 @@ void wxGnomePrinterDCImpl::DoGetTextExtent(const wxString& string, wxCoord *widt
|
|||||||
|
|
||||||
// Set layout's text
|
// Set layout's text
|
||||||
|
|
||||||
// FIXME-UTF8: wouldn't be needed if utf8_str() always returned a buffer
|
const wxScopedCharBuffer dataUTF8(string.utf8_str());
|
||||||
#if wxUSE_UNICODE_UTF8
|
|
||||||
const char *dataUTF8 = string.utf8_str();
|
|
||||||
#else
|
|
||||||
const wxCharBuffer dataUTF8 = string.utf8_str();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gint oldSize = 0;
|
gint oldSize = 0;
|
||||||
if ( theFont )
|
if ( theFont )
|
||||||
|
Reference in New Issue
Block a user