Commit Graph

26 Commits

Author SHA1 Message Date
cantabile ef65262920 SRTSubtitleFormat: don't mix line endings in non-Windows
Originally committed to SVN as r6941.
2012-07-24 02:39:32 +00:00
Thomas Goyne a76fb7c432 Override CanSave in the SRT format to allow supported override tags
Originally committed to SVN as r6627.
2012-03-28 23:59:01 +00:00
Thomas Goyne e4043e64a3 Add support for omitted parameters in tags to the SRT exporter
Originally committed to SVN as r6622.
2012-03-27 23:15:12 +00:00
Thomas Goyne 87d5b1b943 Fix error when exporting a file with \bord tags to SRT
Originally committed to SVN as r6621.
2012-03-27 23:15:03 +00:00
Thomas Goyne b32515da80 Strip trailing whitespace from all cpp and h files
Originally committed to SVN as r6600.
2012-03-25 04:05:06 +00:00
Thomas Goyne a7d54f3d69 Make AssEntry::group const as it really should never change
Originally committed to SVN as r6408.
2012-02-01 00:47:38 +00:00
Thomas Goyne 15a4eca7ce Fix crash on (auto)save when using CSRI and video is open
Calling AssFile::Save/Load from multiple threads (even on different
objects) was not safe due to that is uses SubtitleFormat internally,
which was inheriently thread-unsafe. To fix this, change
SubtitleFormat's interface to support immutable implementations, and
make all of the current implementations immutable.

This isn't a perfect solution - making a subtitle format implemented in
lua immutable would be rather difficult - so at some point in the future
SubtitleFormat should probably be changed to a factory which returns new
objects from GetReader/GetWriter.

Originally committed to SVN as r6365.
2012-01-26 20:08:38 +00:00
Thomas Goyne cae10121ed Fix a bunch of -pedantic stuff
Originally committed to SVN as r6181.
2011-12-28 21:27:06 +00:00
Thomas Goyne 5cbd35e749 Simplify some AssTime-using code
Originally committed to SVN as r6124.
2011-12-22 21:29:09 +00:00
Thomas Goyne 71345af81a Overload operator int() on AssTime and remove GetMS/SetMS
Originally committed to SVN as r6123.
2011-12-22 21:28:51 +00:00
Thomas Goyne 56e6f7d5b2 Move ASS -> SRT tag conversion to the SRT subtitle format from AssDialogue
Originally committed to SVN as r5911.
2011-11-25 19:28:19 +00:00
Thomas Goyne 0992a839cc Port new SRT parser from 2.1.9. Updates #1301.
Originally committed to SVN as r5910.
2011-11-25 19:27:51 +00:00
Thomas Goyne 4ec507f814 Clean up SubtitleFormat
Document all of the SubtitleFormat methods.

Add default implementations of CanReadFile and CanWriteFile that check
against the appropriate wildcard list.

Clean up and simplify a lot of very odd code.

Throw typed exceptions in all subtitle readers rather than strings.

Originally committed to SVN as r5617.
2011-09-28 19:44:53 +00:00
Thomas Goyne d990bbbb99 Eliminate all unnecessary uses of L and _T
Originally committed to SVN as r5611.
2011-09-28 19:43:11 +00:00
Niels Martin Hansen e5eb91a269 * Fix bug in SRT parsing: In some cases a blank line too much is counted.
* Make SRT no longer coalesce line breaks, Aegisub will now write SRT files with blank lines in subtitles.
Updates #1213.

Originally committed to SVN as r4558.
2010-06-20 19:42:13 +00:00
Niels Martin Hansen 2fc8420ee9 Rewrite SRT parsing to use more flexible algorithm, allow more freeform files. Updates #1213.
Originally committed to SVN as r4557.
2010-06-20 19:07:43 +00:00
Thomas Goyne 392ce99083 Kill AssDialogue::UpdateData, which last had a non-empty body 3.5 years ago
Originally committed to SVN as r4525.
2010-06-16 06:20:19 +00:00
Thomas Goyne c290b6b811 Silence some prefast warnings
Originally committed to SVN as r4472.
2010-06-11 02:24:59 +00:00
Thomas Goyne 008d59d71e As we require RTTI anyway, kill AssEntry::GetAsDialogue/Style/Attachment and just use dynamic_cast
Originally committed to SVN as r4308.
2010-05-19 00:44:52 +00:00
Thomas Goyne 2124a1dbd3 Rework how sorting works and add sorting by style
Rather than going through a ton of work to ensure that every AssEvent
has a sensible start time that happens to leave it in the right place
after sorting, simply sort only consecutive blocks of AssDialogues and
leave everything else untouched. Note that this results in different
behavior when there are multiple [Events] sections in a file -- rather
than moving lines between sections and keeping the number of lines per
section constant, each section keeps the lines it had.

As it's now easy to do, also add sorting by style name and end time.

Closes #614.

Originally committed to SVN as r4307.
2010-05-19 00:44:44 +00:00
Amar Takhar d348b4e33e Fix all the headers in *.cpp, this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
 * Sorting alphabetically.

Originally committed to SVN as r3515.
2009-09-10 13:06:40 +00:00
Amar Takhar 6ee2f98349 Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs.  This isn't the actual document in itself but empty documentation using any old documentation if it was there.

This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.

Some notes:
 * Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
 * Some multiline comments may have been munged into single line comments
 * Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
 * Enum comments can go after the enumeration itself '[value] /// comment'
 * include/aegisub/*.h haven't been converted yet, this will be done in a later commit
 * Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.

See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.

Originally committed to SVN as r3312.
2009-07-29 22:59:22 +00:00
Amar Takhar 12aa34088a Switch all headers to using Doxygen and cleanup contact info
* Swap old email + website address with 'Aegisub Project http://www.aegisub.org/'
 * Set categories for all files (jfs)
 * Add descriptions for each file (jfs)
 * Add $Id$ keyword

Originally committed to SVN as r3310.
2009-07-29 05:43:02 +00:00
Niels Martin Hansen 988df0ab81 Fix #809, properly close all SRT overrides during export and ensure overrides in recombined lines do not affect each other (per the example I gave in the report.)
Originally committed to SVN as r2934.
2009-05-15 01:34:00 +00:00
Niels Martin Hansen 8ca726119f Fix #825 for good, I hope. Get some sense worked into the handling of AssEntry::StartMS and AssDialogue::Start using some private members and virtual getter/setter functions.
Originally committed to SVN as r2931.
2009-05-14 23:45:20 +00:00
Amar Takhar 91d73ec8ea SVN Transition Step 3/7
1. cd aegisub/
  2. svn mv *cpp *h src/
  3. svn mv Makefile.am MatroskaParser.c auto4_perldata.inc bitmaps boost \
     changelog.txt config gl include libosxutil libresrc md5.c msvc mythes.cxx \
     mythes.hxx res.rc src/
  4. cd ..
  5. svn mv FFmpegSource2/ INSTALL Makefile.am README  acinclude.m4 \
     autogen.sh automation/ bin build configure.in desktop dummy.txt lib \
     libass/ m4macros/ packages/ po/ scripts/ universalchardet/ aegisub/
  6. mkdir -p docs/wiki_convert
  7. svn add docs/wiki_convert
  8. cd docs
  9. svn mv aegisub_convert_docs.pl convert.bat output wiki_convert/

* See r2749 for full description.

Originally committed to SVN as r2752.
2009-03-08 08:30:39 +00:00