]> source.dussan.org Git - poi.git/commitdiff
Fixed Off-by-one-Error which skipped paragraph styles
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 9 Nov 2015 21:37:10 +0000 (21:37 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 9 Nov 2015 21:37:10 +0000 (21:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713546 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java

index f15cea208543710945a5235a1d4e29219e3b5c6d..4fd78369c0cd89a7fb0efbf885c4f44f45ee5ca5 100644 (file)
@@ -1272,7 +1272,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
         int paraIdx = 0;\r
         for (TextPropCollection p : paraStyles) {\r
             for (int ccPara = 0, ccStyle = p.getCharactersCovered(); ccPara < ccStyle; paraIdx++) {\r
-                if (paraIdx >= paragraphs.size() || ccPara >= ccStyle-1) return;\r
+                if (paraIdx >= paragraphs.size()) return;\r
                 HSLFTextParagraph htp = paragraphs.get(paraIdx);\r
                 TextPropCollection pCopy = new TextPropCollection(0, TextPropType.paragraph);\r
                 pCopy.copy(p);\r