Don't omit empty text objects

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-02-21 16:18:43 +00:00
parent e2cd68454a
commit 9ffff44c8b

View File

@@ -705,7 +705,16 @@ bool wxRichTextXMLHandler::ExportXML(wxOutputStream& stream, wxMBConv* convMem,
int last = 0;
const wxString& text = textObj.GetText();
int len = (int) text.Length();
for (i = 0; i < len; i++)
if (len == 0)
{
i = 0;
OutputIndentation(stream, indent);
OutputString(stream, wxT("<") + objectName, convMem, convFile);
OutputString(stream, style + wxT(">"), convMem, convFile);
OutputString(stream, wxT("</text>"), convMem, convFile);
}
else for (i = 0; i < len; i++)
{
int c = (int) text[i];
if (c < 32 && c != 9 && c != 10 && c != 13)