Eliminated redundant wxRichTextAnchoredObject class; refactored XML I/O code

so that objects can stream themselves; added a wxXmlDocument-based method
of writing XML, though this turned out to be much slower than writing directly
so the direct approach is retained and is the default (can be changed with wxRICHTEXT_USE_XMLDOCUMENT_OUTPUT).
Loading and saving new attributes implemented. Added custom properties to objects.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2010-10-06 20:22:03 +00:00
parent 2d55af1dfa
commit bec80f4f4a
5 changed files with 2683 additions and 961 deletions

View File

@@ -34,6 +34,7 @@
#include "wx/splitter.h"
#include "wx/sstream.h"
#include "wx/html/htmlwin.h"
#include "wx/stopwatch.h"
#if wxUSE_FILESYSTEM
#include "wx/filesys.h"
@@ -1071,7 +1072,14 @@ void MyFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event))
if (!path.empty())
{
wxBusyCursor busy;
wxStopWatch stopwatch;
m_richTextCtrl->SaveFile(path);
long t = stopwatch.Time();
wxLogDebug(wxT("Saving took %ldms"), t);
wxMessageBox(wxString::Format(wxT("Saving took %ldms"), t));
}
}
}