Instance metadata get/set/remove from Commandline

This commit is contained in:
Jindra Petřík
2016-07-24 11:27:04 +02:00
parent 9fe25381c8
commit 5bc200c208
12 changed files with 861 additions and 58 deletions

View File

@@ -2507,8 +2507,7 @@ public final class SWF implements SWFContainerItem, Timelined {
for (Tag tag : getTags()) {
if (tag instanceof ImageTag) {
((ImageTag) tag).clearCache();
}
else if (tag instanceof DefineCompactedFont) {
} else if (tag instanceof DefineCompactedFont) {
((DefineCompactedFont) tag).rebuildShapeCache();
}
}
@@ -2891,15 +2890,15 @@ public final class SWF implements SWFContainerItem, Timelined {
timelined.setModified(true);
timelined.resetTimeline();
} else // timeline should be always the swf here
if (removeDependencies) {
removeTagWithDependenciesFromTimeline(tag, timelined.getTimeline());
timelined.setModified(true);
} else {
boolean modified = removeTagFromTimeline(tag, timelined.getTimeline());
if (modified) {
if (removeDependencies) {
removeTagWithDependenciesFromTimeline(tag, timelined.getTimeline());
timelined.setModified(true);
} else {
boolean modified = removeTagFromTimeline(tag, timelined.getTimeline());
if (modified) {
timelined.setModified(true);
}
}
}
}
@Override
@@ -3648,4 +3647,10 @@ public final class SWF implements SWFContainerItem, Timelined {
}
return null;
}
@Override
public void replaceTag(int index, Tag newTag) {
removeTag(index);
addTag(index, newTag);
}
}