From 03a39fd9dc16526a6767e623e3e98ea5910156db Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 19 Aug 2022 09:31:14 +0000 Subject: [PATCH] more int narrowing git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903562 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/hslf/record/NotesAtom.java | 6 +++--- .../java/org/apache/poi/hslf/record/SlideAtom.java | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/NotesAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/NotesAtom.java index 82ab6d13de..b4239d4fdd 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/NotesAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/NotesAtom.java @@ -98,9 +98,9 @@ public final class NotesAtom extends RecordAtom { // Flags short flags = 0; - if(followMasterObjects) { flags += 1; } - if(followMasterScheme) { flags += 2; } - if(followMasterBackground) { flags += 4; } + if(followMasterObjects) { flags += (short) 1; } + if(followMasterScheme) { flags += (short) 2; } + if(followMasterBackground) { flags += (short) 4; } writeLittleEndian(flags,out); // Reserved fields diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideAtom.java index 605539b8d2..42fa25e1c9 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideAtom.java @@ -143,15 +143,15 @@ public final class SlideAtom extends RecordAtom { layoutAtom.writeOut(out); // IDs - writeLittleEndian(masterID,out); - writeLittleEndian(notesID,out); + writeLittleEndian(masterID, out); + writeLittleEndian(notesID, out); // Flags short flags = 0; - if(followMasterObjects) { flags += 1; } - if(followMasterScheme) { flags += 2; } - if(followMasterBackground) { flags += 4; } - writeLittleEndian(flags,out); + if(followMasterObjects) { flags += (short) 1; } + if(followMasterScheme) { flags += (short) 2; } + if(followMasterBackground) { flags += (short) 4; } + writeLittleEndian(flags, out); // Reserved data out.write(reserved);