forked from mia/Aegisub
Delete AssDialogue::StripTag
It is not actually used anywhere.
This commit is contained in:
parent
8c2062f0c7
commit
534f574a87
2 changed files with 0 additions and 27 deletions
|
@ -260,31 +260,6 @@ void AssDialogue::StripTags() {
|
||||||
Text = GetStrippedText();
|
Text = GetStrippedText();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssDialogue::StripTag(wxString const& tag_name) {
|
|
||||||
boost::ptr_vector<AssDialogueBlock> blocks(ParseTags());
|
|
||||||
wxString new_text;
|
|
||||||
|
|
||||||
// Look for blocks
|
|
||||||
for (auto& block : blocks) {
|
|
||||||
if (block.GetType() != BLOCK_OVERRIDE) {
|
|
||||||
new_text += block.GetText();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
AssDialogueBlockOverride *over = static_cast<AssDialogueBlockOverride*>(&block);
|
|
||||||
wxString temp;
|
|
||||||
for (auto const& tag : over->Tags) {
|
|
||||||
if (tag.Name != tag_name)
|
|
||||||
temp += tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!temp.empty())
|
|
||||||
new_text += "{" + temp + "}";
|
|
||||||
}
|
|
||||||
|
|
||||||
Text = new_text;
|
|
||||||
}
|
|
||||||
|
|
||||||
static wxString get_text(AssDialogueBlock &d) { return d.GetText(); }
|
static wxString get_text(AssDialogueBlock &d) { return d.GetText(); }
|
||||||
void AssDialogue::UpdateText(boost::ptr_vector<AssDialogueBlock>& blocks) {
|
void AssDialogue::UpdateText(boost::ptr_vector<AssDialogueBlock>& blocks) {
|
||||||
if (blocks.empty()) return;
|
if (blocks.empty()) return;
|
||||||
|
|
|
@ -156,8 +156,6 @@ public:
|
||||||
/// Strip all ASS tags from the text
|
/// Strip all ASS tags from the text
|
||||||
void StripTags();
|
void StripTags();
|
||||||
/// Strip a specific ASS tag from the text
|
/// Strip a specific ASS tag from the text
|
||||||
/// @param tag_name Tag to strip, with leading slash
|
|
||||||
void StripTag(wxString const& tag_name);
|
|
||||||
/// Get text without tags
|
/// Get text without tags
|
||||||
wxString GetStrippedText() const;
|
wxString GetStrippedText() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue