]> source.dussan.org Git - poi.git/commitdiff
61475 -- append text from pictures only once...bug from my work on 61470.
authorTim Allison <tallison@apache.org>
Thu, 31 Aug 2017 19:14:43 +0000 (19:14 +0000)
committerTim Allison <tallison@apache.org>
Thu, 31 Aug 2017 19:14:43 +0000 (19:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1806839 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java

index 6c16b1618da0ea6286fe0da954b74862848ba46b..ae66ac96613fffca05dc8234e98b6ad3affed0aa 100644 (file)
@@ -1096,6 +1096,10 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
                 handleRuby(o, text, true);
             }
         }
+        // Any picture text?
+        if (pictureText != null && pictureText.length() > 0) {
+            text.append("\n").append(pictureText);
+        }
         c.dispose();
         return text.toString();
     }
@@ -1194,13 +1198,6 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
                     "[footnoteRef:" + ftn.getId().intValue() + "]" : "[endnoteRef:" + ftn.getId().intValue() + "]";
             text.append(footnoteRef);
         }
-
-
-        // Any picture text?
-        if (pictureText != null && pictureText.length() > 0) {
-            text.append("\n").append(pictureText);
-        }
-
     }
 
     /**