diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index 7df3f2273..d18f91057 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -129,3 +129,6 @@ Lexer\.java$ ^wix/ ^cert/ ^versioninfo\.rc$ +\.flv$ +\.yml$ +(?:^|/)build\.xml$ \ No newline at end of file diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 0ec53d5ad..963e93e7b 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -138,6 +138,7 @@ apgeneratedsrcdir APICOM apiprivate apiversioning +apng appdata apperr applytype @@ -161,6 +162,7 @@ asasm ascentdescentleading asciitochar asclass +asclassmain asconfig asdec asdoc @@ -373,6 +375,7 @@ buildlog BUILDNUMBER buildtime BUILTAT +bundleswc buttoncondaction buttonicon BUTTONRECORD @@ -875,6 +878,7 @@ downmix downmixing DOWNRESULT downsampling +downscaling DOYOU dpd DPLAY @@ -2236,6 +2240,8 @@ mohlo MONIKERALREADYREGISTERED montemedia Morphed +morphduration +morphnumframes MORPHFILLSTYLE MORPHFILLSTYLEARRAY MORPHFOCALGRADIENT @@ -2717,6 +2723,7 @@ pcnt pcode PCodec pcodehex +PConfig pcr pctzoom pdata @@ -3462,6 +3469,7 @@ subdata subdiv subframes subkeys +sublength sublimiter subloader submethod @@ -3555,6 +3563,7 @@ TControl TCPDF tcr TCurrent +tdef TDN techno techsmith @@ -3761,6 +3770,7 @@ typevalue ubits ucf udata +UFIXED uin uinteger UIPI diff --git a/CHANGELOG.md b/CHANGELOG.md index c0a2cff03..2688092ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,7 +45,7 @@ All notable changes to this project will be documented in this file. - [#2575] dumpSWF CLI command displayed import assets GUI dialog - [#2573] AS3 - Incorrect uint/int/Number coercion - AS3 local registers type propagation -- [#2566], [#2594] Export bounds of sprites and buttons not containg filter offsets +- [#2566], [#2594] Export bounds of sprites and buttons not containing filter offsets - [#2582] Font normalizer setting small texts when no assigned glyph found - PDF export - not rendering video stream frames - [#2585] AS1/2 direct editation - continue and break in for..in loop diff --git a/lib/jsyntaxpane-0.9.5.jar b/lib/jsyntaxpane-0.9.5.jar index 87e464963..acd2cdd96 100644 Binary files a/lib/jsyntaxpane-0.9.5.jar and b/lib/jsyntaxpane-0.9.5.jar differ diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java index 635619e4f..ad1c099ad 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java @@ -21,9 +21,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.SecondPassData; import com.jpexs.helpers.Reference; import java.util.HashSet; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; -import java.util.Map; import java.util.Set; /** @@ -64,7 +62,7 @@ public abstract class BaseLocalData { public Reference maxTempIndex = new Reference<>(0); /** - * Wheter goto statements were used + * Whether goto statements were used */ public Reference gotosUsed = new Reference<>(false); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/FontNormalizer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/FontNormalizer.java index ca54bab1c..996148282 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/FontNormalizer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/FontNormalizer.java @@ -106,19 +106,19 @@ public class FontNormalizer { for (TextTag text : texts.values()) { if (text instanceof DefineEditTextTag) { - DefineEditTextTag detext = (DefineEditTextTag) text; - fontIds.addAll(getDefineEditTextFonts(detext)); + DefineEditTextTag defineEditText = (DefineEditTextTag) text; + fontIds.addAll(getDefineEditTextFonts(defineEditText)); } if (text instanceof StaticTextTag) { - StaticTextTag stext = (StaticTextTag) text; + StaticTextTag staticText = (StaticTextTag) text; boolean inverted = false; - if (stext.textMatrix != null) { - if (stext.textMatrix.scaleY < 0) { + if (staticText.textMatrix != null) { + if (staticText.textMatrix.scaleY < 0) { inverted = true; } } - for (TEXTRECORD rec : stext.textRecords) { + for (TEXTRECORD rec : staticText.textRecords) { if (rec.styleFlagsHasFont) { if (inverted) { invertedFontIds.add(rec.fontId); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java index a82cee14b..615b7de33 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -342,7 +342,7 @@ public class SWFOutputStream extends OutputStream { } /** - * Writes FIXED (Fixed point 16.16) igned value to the stream. + * Writes FIXED (Fixed point 16.16) signed value to the stream. * * @param value FIXED value * @throws IOException On I/O error diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java index 5b67618a8..5818a6535 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java @@ -259,9 +259,9 @@ public class FrameExporter { int max = subFrameMode ? subframeLength : fframes.size(); int fframe = subFrameMode ? fframes.get(0) : fframes.get(pos++); - RECT diplayRect = tim.getDisplayRectWithFilters(); - int realAaScale = Configuration.calculateRealAaScale(diplayRect.getWidth(), diplayRect.getHeight(), settings.zoom, settings.aaScale); - BufferedImage result = SWF.frameToImageGet(tim, fframe, subFrameMode ? pos++ : 0, null, 0, diplayRect, new Matrix(), null, backgroundColor == null && !usesTransparency ? Color.white : backgroundColor, settings.zoom, true, realAaScale).getBufferedImage(); + RECT displayRect = tim.getDisplayRectWithFilters(); + int realAaScale = Configuration.calculateRealAaScale(displayRect.getWidth(), displayRect.getHeight(), settings.zoom, settings.aaScale); + BufferedImage result = SWF.frameToImageGet(tim, fframe, subFrameMode ? pos++ : 0, null, 0, displayRect, new Matrix(), null, backgroundColor == null && !usesTransparency ? Color.white : backgroundColor, settings.zoom, true, realAaScale).getBufferedImage(); if (CancellableWorker.isInterrupted()) { return null; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java index bb6fd406c..a2f323718 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java @@ -1982,9 +1982,9 @@ public class Timeline { int mtime = time + layer.time; int dframe = 0; - int dnumFrames = drawable.getNumFrames(); - if (dnumFrames > 0) { //sprites with empty timeline have zero frames - dframe = mtime % dnumFrames; + int drawableNumFrames = drawable.getNumFrames(); + if (drawableNumFrames > 0) { //sprites with empty timeline have zero frames + dframe = mtime % drawableNumFrames; } int dtime = mtime - dframe; diff --git a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java index 735effac3..b3465ffd9 100644 --- a/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java +++ b/libsrc/ffdec_lib/test/com/jpexs/decompiler/flash/SWFStreamTest.java @@ -162,15 +162,15 @@ public class SWFStreamTest { sis.close(); } - float[] uffs = new float[]{200.25f, 0.25f, 255.75f, 50.25f}; - for (float ff : uffs) { + float[] unsignedFloats = new float[]{200.25f, 0.25f, 255.75f, 50.25f}; + for (float floatValue : unsignedFloats) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); SWFOutputStream sos = new SWFOutputStream(baos, SWF.DEFAULT_VERSION, Utf8Helper.charsetName); - sos.writeUFIXED8(ff); + sos.writeUFIXED8(floatValue); sos.close(); sis = new SWFInputStream(null, baos.toByteArray()); float ff2 = sis.readUFIXED8("test"); - assertEquals(ff, ff2, "Written and read value not equals. Written: " + ff + " read: " + ff2); + assertEquals(floatValue, ff2, "Written and read value not equals. Written: " + floatValue + " read: " + ff2); sis.close(); } } diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java index 1484a8f63..dcac9dd65 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/DocumentSearchData.java @@ -217,6 +217,9 @@ public class DocumentSearchData { return 0; } Matcher matcher = sDoc.getMatcher(getPattern()); + if (matcher == null) { + return 0; + } int count = 0; while (matcher.find()) { count++; diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle.properties index e14aaf5be..b4cbd6640 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle.properties @@ -1,4 +1,2 @@ QuickFindDialog.jLblOccurrences.text = (0) -QuickFindDialog.jLblOccurrences.toolTipText = -QuickFindDialog.jLblOccurences.text = (0) -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = Occurences +QuickFindDialog.jLblOccurrences.toolTipText = Occurences diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_cs.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_cs.properties index ef68392a6..5fd7a51ac 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_cs.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_cs.properties @@ -1,5 +1,3 @@ QuickFindDialog.jLblOccurrences.text = (0) -QuickFindDialog.jLblOccurrences.toolTipText = -QuickFindDialog.jLblOccurences.text = (0) -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = V\u00fdskyty +QuickFindDialog.jLblOccurrences.toolTipText = V\u00fdskyty diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_de.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_de.properties index 72d1793fa..c24dcc279 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_de.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_de.properties @@ -1,4 +1,2 @@ QuickFindDialog.jLblOccurrences.text = (0) -QuickFindDialog.jLblOccurrences.toolTipText = -QuickFindDialog.jLblOccurences.text = (0) -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = Vorkommen +QuickFindDialog.jLblOccurrences.toolTipText = Vorkommen diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_pt_BR.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_pt_BR.properties index e4508f652..a872be6de 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_pt_BR.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_pt_BR.properties @@ -1,4 +1,2 @@ QuickFindDialog.jLblOccurrences.text = (0) -QuickFindDialog.jLblOccurrences.toolTipText = -QuickFindDialog.jLblOccurences.text = (0) -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = Ocorr\u00eancias +QuickFindDialog.jLblOccurrences.toolTipText = Ocorr\u00eancias \ No newline at end of file diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_ru.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_ru.properties index e42952f61..578be9872 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_ru.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_ru.properties @@ -1,4 +1,2 @@ QuickFindDialog.jLblOccurrences.text = {0} -QuickFindDialog.jLblOccurrences.toolTipText = -QuickFindDialog.jLblOccurences.text = {0} -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = \u0412\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f +QuickFindDialog.jLblOccurrences.toolTipText = \u0412\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sk.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sk.properties index 743921903..c4a6b9e28 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sk.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sk.properties @@ -1,4 +1,2 @@ QuickFindDialog.jLblOccurrences.text = (0) -QuickFindDialog.jLblOccurrences.toolTipText = -QuickFindDialog.jLblOccurences.text = (0) -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = V\u00fdskyty +QuickFindDialog.jLblOccurrences.toolTipText = V\u00fdskyty diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sl.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sl.properties index e6d9cee09..4d9969f3d 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sl.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_sl.properties @@ -1,4 +1,2 @@ QuickFindDialog.jLblOccurrences.text = (0) -QuickFindDialog.jLblOccurrences.toolTipText = -QuickFindDialog.jLblOccurences.text = (0) -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = Pojavitve +QuickFindDialog.jLblOccurrences.toolTipText = Pojavitve diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_zh.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_zh.properties index 54d8ed3b1..48702c079 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_zh.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/jsyntaxpane/actions/gui/Bundle_zh.properties @@ -1,3 +1,2 @@ QuickFindDialog.jLblOccurrences.text = (0) -QuickFindDialog.jLblOccurences.text = (0) -QuickFindDialog.jLblOccurences.AccessibleContext.accessibleName = \u53d1\u751f +QuickFindDialog.jLblOccurrences.toolTipText = \u53d1\u751f diff --git a/resources/com.jpexs.decompiler.flash.metainfo.xml b/resources/com.jpexs.decompiler.flash.metainfo.xml index 5d6efc181..1c57afcd2 100644 --- a/resources/com.jpexs.decompiler.flash.metainfo.xml +++ b/resources/com.jpexs.decompiler.flash.metainfo.xml @@ -86,7 +86,7 @@
  • #2575 dumpSWF CLI command displayed import assets GUI dialog
  • #2573 AS3 - Incorrect uint/int/Number coercion
  • AS3 local registers type propagation
  • -
  • #2566, #2594 Export bounds of sprites and buttons not containg filter offsets
  • +
  • #2566, #2594 Export bounds of sprites and buttons not containing filter offsets
  • #2582 Font normalizer setting small texts when no assigned glyph found
  • PDF export - not rendering video stream frames
  • #2585 AS1/2 direct editation - continue and break in for..in loop
  • diff --git a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index 2fc2c88f8..078a6a1b0 100644 --- a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -1746,7 +1746,7 @@ public class CommandLineArgumentParser { subLen = 1; } return subLen; - } catch (NumberFormatException nre) { + } catch (NumberFormatException nfe) { System.err.println("Invalid sub length"); badArguments("sublength"); } diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index bed6daeb7..198580364 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -4937,16 +4937,16 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se } List tagsToRemove = new ArrayList<>(); - loopt: for (Tag tag : swf.getTags()) { + loopTags: for (Tag tag : swf.getTags()) { if (tag instanceof CharacterTag) { CharacterTag characterTag = (CharacterTag) tag; for (String cls : characterTag.getClassNames()) { if (neededClasses.contains(cls)) { - continue loopt; + continue loopTags; } } if (needed.contains(characterTag.getCharacterId())) { - continue loopt; + continue loopTags; } tagsToRemove.add(tag); }