diff --git a/common/font/font.cpp b/common/font/font.cpp index 8ef8ed2fe0..233d506bf6 100644 --- a/common/font/font.cpp +++ b/common/font/font.cpp @@ -214,7 +214,7 @@ VECTOR2I drawMarkup( BOX2I* aBoundingBox, std::vector>* a { BOX2I bbox; - nextPosition = aFont->GetTextAsGlyphs( &bbox, aGlyphs, aNode->wxString(), aSize, + nextPosition = aFont->GetTextAsGlyphs( &bbox, aGlyphs, aNode->asWxString(), aSize, aPosition, aAngle, aMirror, aOrigin, textStyle ); @@ -354,10 +354,10 @@ void wordbreakMarkup( std::vector>* aWords, if( aNode->has_content() ) { - VECTOR2I next = aFont->GetTextAsGlyphs( nullptr, nullptr, aNode->wxString(), + VECTOR2I next = aFont->GetTextAsGlyphs( nullptr, nullptr, aNode->asWxString(), aSize, { 0, 0 }, ANGLE_0, false, { 0, 0 }, textStyle ); - word += aNode->wxString(); + word += aNode->asWxString(); width += next.x; } @@ -379,7 +379,7 @@ void wordbreakMarkup( std::vector>* aWords, else { wxString space( wxS( " " ) ); - wxString textRun = aNode->wxString(); + wxString textRun = aNode->asWxString(); wxArrayString words; wxStringSplit( textRun, words, ' ' ); diff --git a/common/markup_parser.cpp b/common/markup_parser.cpp index d79f4e8d5a..010f3e7677 100644 --- a/common/markup_parser.cpp +++ b/common/markup_parser.cpp @@ -57,7 +57,7 @@ std::string NODE::typeString() const } -wxString NODE::wxString() const +wxString NODE::asWxString() const { return FROM_UTF8( string().c_str() ); } diff --git a/include/markup_parser.h b/include/markup_parser.h index 6d15b03a49..99b3812c68 100644 --- a/include/markup_parser.h +++ b/include/markup_parser.h @@ -42,7 +42,7 @@ struct NODE : parse_tree::basic_node std::string typeString() const; - wxString wxString() const; + wxString asWxString() const; bool isOverbar() const { return is_type(); } bool isSubscript() const { return is_type(); }