diff --git a/include/wx/html/winpars.h b/include/wx/html/winpars.h index b7da33c93a..4489ca5b69 100644 --- a/include/wx/html/winpars.h +++ b/include/wx/html/winpars.h @@ -24,6 +24,7 @@ class WXDLLIMPEXP_FWD_HTML wxHtmlWindowInterface; class WXDLLIMPEXP_FWD_HTML wxHtmlWinParser; class WXDLLIMPEXP_FWD_HTML wxHtmlWinTagHandler; class WXDLLIMPEXP_FWD_HTML wxHtmlTagsModule; +class wxHtmlWinParser_TextParsingState; //-------------------------------------------------------------------------------- @@ -221,22 +222,10 @@ private: wxEncodingConverter *m_EncConv; #endif - struct TextParsingState - { - // current whitespace handling mode - WhitespaceMode m_whitespaceMode; - - wxHtmlWordCell *m_lastWordCell; - - // current position on line, in num. of characters; used to properly - // expand TABs; only updated while inside
- int m_posColumn; - }; - // NB: this pointer replaces m_lastWordCell pointer in wx<=2.8.7; this // way, wxHtmlWinParser remains ABI compatible with older versions - // despite addition of two fields in TextParsingState - TextParsingState *m_textParsingState; + // despite addition of two fields in wxHtmlWinParser_TextParsingState + wxHtmlWinParser_TextParsingState *m_textParsingState; DECLARE_NO_COPY_CLASS(wxHtmlWinParser) }; diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index 785e76cf4b..800de39cf6 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -145,13 +145,25 @@ wxString wxHtmlWordWithTabsCell::GetPartAsText(int begin, int end) const // wxHtmlWinParser //----------------------------------------------------------------------------- +struct wxHtmlWinParser_TextParsingState +{ + // current whitespace handling mode + wxHtmlWinParser::WhitespaceMode m_whitespaceMode; + + wxHtmlWordCell *m_lastWordCell; + + // current position on line, in num. of characters; used to properly + // expand TABs; only updated while inside+ int m_posColumn; +}; + IMPLEMENT_ABSTRACT_CLASS(wxHtmlWinParser, wxHtmlParser) wxList wxHtmlWinParser::m_Modules; wxHtmlWinParser::wxHtmlWinParser(wxHtmlWindowInterface *wndIface) { - m_textParsingState = new TextParsingState; + m_textParsingState = new wxHtmlWinParser_TextParsingState; m_textParsingState->m_whitespaceMode = Whitespace_Normal; m_textParsingState->m_lastWordCell = NULL; m_textParsingState->m_posColumn = 0;