Kill AssStyle::Get\SetMarginString, as it isn't really used for much of anything
Originally committed to SVN as r6221.
This commit is contained in:
parent
8fdd5d987e
commit
4e06c198d0
2 changed files with 5 additions and 31 deletions
|
@ -290,19 +290,19 @@ AssStyle::AssStyle(wxString rawData,int version) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read left margin
|
// Read left margin
|
||||||
SetMarginString(get_next_string(tkn), 0);
|
Margin[0] = mid(0, get_next_int(tkn), 9999);
|
||||||
|
|
||||||
// Read right margin
|
// Read right margin
|
||||||
SetMarginString(get_next_string(tkn), 1);
|
Margin[1] = mid(0, get_next_int(tkn), 9999);
|
||||||
|
|
||||||
// Read top margin
|
// Read top margin
|
||||||
SetMarginString(get_next_string(tkn), 2);
|
Margin[2] = mid(0, get_next_int(tkn), 9999);
|
||||||
|
|
||||||
// Read bottom margin
|
// Read bottom margin
|
||||||
if (version == 2)
|
if (version == 2)
|
||||||
SetMarginString(get_next_string(tkn),3);
|
Margin[3] = mid(0, get_next_int(tkn), 9999);
|
||||||
else
|
else
|
||||||
SetMarginString(GetMarginString(2), 3);
|
Margin[3] = Margin[2];
|
||||||
|
|
||||||
// Skip alpha level
|
// Skip alpha level
|
||||||
if (version == 0)
|
if (version == 0)
|
||||||
|
@ -343,23 +343,6 @@ void AssStyle::UpdateData() {
|
||||||
SetEntryData(final);
|
SetEntryData(final);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssStyle::SetMarginString(const wxString str,int which) {
|
|
||||||
if (which < 0 || which >= 4) throw Aegisub::InvalidMarginIdError();
|
|
||||||
if (!str.IsNumber()) throw "Invalid margin value";
|
|
||||||
long value;
|
|
||||||
str.ToLong(&value);
|
|
||||||
if (value < 0) value = 0;
|
|
||||||
else if (value > 9999) value = 9999;
|
|
||||||
|
|
||||||
Margin[which] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString AssStyle::GetMarginString(int which) const {
|
|
||||||
if (which < 0 || which >= 4) throw Aegisub::InvalidMarginIdError();
|
|
||||||
wxString result = wxString::Format("%04i",Margin[which]);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString AssStyle::GetSSAText() const {
|
wxString AssStyle::GetSSAText() const {
|
||||||
wxString output;
|
wxString output;
|
||||||
int align = 0;
|
int align = 0;
|
||||||
|
|
|
@ -103,15 +103,6 @@ public:
|
||||||
/// Update the raw line data after one or more of the public members have been changed
|
/// Update the raw line data after one or more of the public members have been changed
|
||||||
void UpdateData();
|
void UpdateData();
|
||||||
|
|
||||||
/// Returns the margin value as a string
|
|
||||||
/// @param which 0: left; 1: right; 2: vertical/top; 3: bottom
|
|
||||||
wxString GetMarginString(int which) const;
|
|
||||||
|
|
||||||
/// Sets margin value from a string
|
|
||||||
/// @param value New value for the margin; must contain a number
|
|
||||||
/// @param which 0: left; 1: right; 2: vertical/top; 3: bottom
|
|
||||||
void SetMarginString(const wxString value, int which);
|
|
||||||
|
|
||||||
/// @brief Get a list of valid ASS font encodings
|
/// @brief Get a list of valid ASS font encodings
|
||||||
static void GetEncodings(wxArrayString &encodingStrings);
|
static void GetEncodings(wxArrayString &encodingStrings);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue