+ return m_wordOrig;
+}
+
+wxString wxHtmlWordWithTabsCell::GetPartAsText(int begin, int end) const
+{
+ // NB: The 'begin' and 'end' positions are in the _displayed_ text
+ // (stored in m_Word) and not in the text with tabs that should
+ // be copied to clipboard (m_wordOrig).
+ //
+ // NB: Because selection is performed on displayed text, it's possible
+ // to select e.g. "half of TAB character" -- IOW, 'begin' and 'end'
+ // may be in the middle of TAB character expansion into ' 's. In this
+ // case, we copy the TAB character to clipboard once.
+
+ wxASSERT( begin < end );
+
+ const unsigned SPACES_PER_TAB = 8;
+
+ wxString sel;
+
+ int pos = 0;
+ wxString::const_iterator i = m_wordOrig.begin();
+
+ // find the beginning of text to copy:
+ for ( ; pos < begin; ++i )