You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2014/08/28 02:20:23 UTC
svn commit: r1620999 - in /poi/trunk/src/ooxml:
java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java
testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
Author: kiwiwings
Date: Thu Aug 28 00:20:22 2014
New Revision: 1620999
URL: http://svn.apache.org/r1620999
Log:
Bug 56864 - XWPFLatentStyles.isLatentStyle always returns true if there is at least 1 lsdException
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java
poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java?rev=1620999&r1=1620998&r2=1620999&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java Thu Aug 28 00:20:22 2014
@@ -41,8 +41,9 @@ public class XWPFLatentStyles {
@SuppressWarnings("deprecation")
protected boolean isLatentStyle(String latentStyleID){
for ( CTLsdException lsd: latentStyles.getLsdExceptionArray()) {
- if(lsd.getName().equals(latentStyleID));
+ if(lsd.getName().equals(latentStyleID)) {
return true;
+ }
}
return false;
}
Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java?rev=1620999&r1=1620998&r2=1620999&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java Thu Aug 28 00:20:22 2014
@@ -116,6 +116,6 @@ public class TestXWPFStyles extends Test
ex.setName("ex1");
XWPFLatentStyles ls = new XWPFLatentStyles(latentStyles);
assertEquals(true, ls.isLatentStyle("ex1"));
-
+ assertEquals(false, ls.isLatentStyle("notex1"));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org