incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fh...@apache.org
Subject svn commit: r1507202 - in /incubator/odf/trunk/simple/src: main/java/org/odftoolkit/simple/common/navigation/CellSelection.java test/java/org/odftoolkit/simple/common/navigation/TextNavigationTest.java
Date Fri, 26 Jul 2013 07:21:53 GMT
Author: fhopf
Date: Fri Jul 26 07:21:53 2013
New Revision: 1507202

URL: http://svn.apache.org/r1507202
Log:
ODFTOOLKIT-362: Removed special replacement handling of cells when replacing with string values

Modified:
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/navigation/CellSelection.java
    incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/common/navigation/TextNavigationTest.java

Modified: incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/navigation/CellSelection.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/navigation/CellSelection.java?rev=1507202&r1=1507201&r2=1507202&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/navigation/CellSelection.java
(original)
+++ incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/common/navigation/CellSelection.java
Fri Jul 26 07:21:53 2013
@@ -57,26 +57,6 @@ public class CellSelection extends TextS
 		mCell = cell;
 	}
 
-	/**
-	 * Replace the text content of selection with a new string. The cell value
-	 * type will be updated as "string" after replacement.
-	 * 
-	 * @param newText
-	 *            the replace text String
-	 * @throws InvalidNavigationException
-	 *            if the selection is unavailable.
-	 * 
-	 * @see org.odftoolkit.simple.table.Cell#setValueType(String)
-	 * @see org.odftoolkit.simple.table.Cell#setStringValue(String)
-	 */
-	public void replaceWith(String newText) throws InvalidNavigationException {
-		super.replaceWith(newText);
-		if (mCell != null) {
-			// update mCell value and value type to string.
-			String text = mCell.getDisplayText();
-			mCell.setStringValue(text);
-		}
-	}
 
 	/**
 	 * Replace the text content of selection with a new string. The cell value

Modified: incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/common/navigation/TextNavigationTest.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/common/navigation/TextNavigationTest.java?rev=1507202&r1=1507201&r2=1507202&view=diff
==============================================================================
--- incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/common/navigation/TextNavigationTest.java
(original)
+++ incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/common/navigation/TextNavigationTest.java
Fri Jul 26 07:21:53 2013
@@ -195,8 +195,7 @@ public class TextNavigationTest {
 		
 	}
 	
-	@Ignore("This test currently fails because of a special handling of CellSelection which
resets the display text."
-			+ "It is not clear why this special handling is necessary as display text and string value
are consistent even if removed.")
+
 	@Test
 	public void testCellReplacementWithString() throws Exception {
 		replace(new ReplacementAction() {



Mime
View raw message