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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user