poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1649310 - /poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java
Date Sun, 04 Jan 2015 10:23:24 GMT
Author: centic
Date: Sun Jan  4 10:23:24 2015
New Revision: 1649310

URL: http://svn.apache.org/r1649310
Log:
Remove unnecessary casts

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java?rev=1649310&r1=1649309&r2=1649310&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextRun.java Sun Jan  4 10:23:24
2015
@@ -138,8 +138,8 @@ public final class TextRun
             // Build one for each run with the same style
             while(pos <= runRawText.length() && curP < pStyles.size() &&
curC < cStyles.size()) {
                 // Get the Props to use
-                TextPropCollection pProps = (TextPropCollection)pStyles.get(curP);
-                TextPropCollection cProps = (TextPropCollection)cStyles.get(curC);
+                TextPropCollection pProps = pStyles.get(curP);
+                TextPropCollection cProps = cStyles.get(curC);
 
                 int pLen = pProps.getCharactersCovered();
                 int cLen = cProps.getCharactersCovered();
@@ -291,15 +291,13 @@ public final class TextRun
 		int pOverRun = _styleAtom.getParagraphTextLengthCovered() - oldSize;
 		int cOverRun = _styleAtom.getCharacterTextLengthCovered() - oldSize;
 		if(pOverRun > 0) {
-			TextPropCollection tpc = (TextPropCollection)
-				_styleAtom.getParagraphStyles().getLast();
+			TextPropCollection tpc = _styleAtom.getParagraphStyles().getLast();
 			tpc.updateTextSize(
 					tpc.getCharactersCovered() - pOverRun
 			);
 		}
 		if(cOverRun > 0) {
-			TextPropCollection tpc = (TextPropCollection)
-				_styleAtom.getCharacterStyles().getLast();
+			TextPropCollection tpc = _styleAtom.getCharacterStyles().getLast();
 			tpc.updateTextSize(
 					tpc.getCharactersCovered() - cOverRun
 			);
@@ -540,8 +538,8 @@ public final class TextRun
 		}
 		// These are the only styles for now
 		_rtRuns[0].supplyTextProps(
-				(TextPropCollection)_styleAtom.getParagraphStyles().get(0),
-				(TextPropCollection)_styleAtom.getCharacterStyles().get(0),
+				_styleAtom.getParagraphStyles().get(0),
+				_styleAtom.getCharacterStyles().get(0),
 				false,
 				false
 		);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message