From 91fe5229b0b06694c2422a9d72bc31b5cd19504b Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 6 May 2006 01:05:07 +0000 Subject: [PATCH] autoconfify convert Originally committed to SVN as r361. --- core/ass_file.cpp | 14 ++++++++++++++ core/ass_file.h | 1 + 2 files changed, 15 insertions(+) diff --git a/core/ass_file.cpp b/core/ass_file.cpp index 4a7859714..f6d31e9aa 100644 --- a/core/ass_file.cpp +++ b/core/ass_file.cpp @@ -181,6 +181,20 @@ void AssFile::Export(wxString _filename) { } +//////////////////////////////////// +// Returns script as a single string +wxString AssFile::GetString() { + using std::list; + wxString ret; + AssEntry *entry; + for (list::iterator cur=Line.begin();cur!=Line.end();) { + entry = *cur; + ret += entry->GetEntryData(); + ret += L"\n"; + } + return ret; +} + /////////////////////// // Appends line to Ass int AssFile::AddLine (wxString data,wxString group,int lasttime,bool &IsSSA) { diff --git a/core/ass_file.h b/core/ass_file.h index add1848db..9ff61917f 100644 --- a/core/ass_file.h +++ b/core/ass_file.h @@ -87,6 +87,7 @@ public: wxArrayString GetStyles(); // Gets a list of all styles available AssStyle *GetStyle(wxString name); // Gets style by its name + wxString GetString(); void Load(wxString file,wxString charset=_T("")); // Load from a file void Save(wxString file,bool setfilename=false,bool addToRecent=true,const wxString encoding=_T("")); // Save to a file. Pass true to second argument if this isn't a copy void Export(wxString file); // Saves exported copy, with effects applied