poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r980102 - in /poi/trunk/src: documentation/content/xdocs/ java/org/apache/poi/hssf/record/ testcases/org/apache/poi/hssf/record/
Date Wed, 28 Jul 2010 15:51:58 GMT
Author: yegor
Date: Wed Jul 28 15:51:57 2010
New Revision: 980102

URL: http://svn.apache.org/viewvc?rev=980102&view=rev
Log:
 Added clone support for UserSView* and Feat* families of records, see bug #49649

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/hssf/record/FeatHdrRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/HeaderFooterRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewBegin.java
    poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewEnd.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFeatRecord.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=980102&r1=980101&r2=980102&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Wed Jul 28 15:51:57 2010
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.7-beta2" date="2010-??-??">
+           <action dev="POI-DEVELOPERS" type="fix">49649 - Added clone support for
UserSView* and Feat* families of records</action>
            <action dev="POI-DEVELOPERS" type="fix">49653 - Support for escaped unicode
characters in Shared String Table</action>
            <action dev="POI-DEVELOPERS" type="fix">49579 - prevent ArrayIndexOutOfBoundException
in UnknowEscherRecord</action>
            <action dev="POI-DEVELOPERS" type="fix">49593 - preserve leading and trailing
white spaces in  XWPFRun</action>

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/FeatHdrRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/FeatHdrRecord.java?rev=980102&r1=980101&r2=980102&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/FeatHdrRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/FeatHdrRecord.java Wed Jul 28 15:51:57 2010
@@ -105,4 +105,11 @@ public final class FeatHdrRecord extends
 	protected int getDataSize() {
 		return 12 + 2+1+4+rgbHdrData.length;
 	}
+    
+    //HACK: do a "cheat" clone, see Record.java for more information
+    public Object clone() {
+        return cloneViaReserialise();
+    }
+
+    
 }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java?rev=980102&r1=980101&r2=980102&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java Wed Jul 28 15:51:57 2010
@@ -167,4 +167,12 @@ public final class FeatRecord extends St
 			cbFeatData = 0;
 		}
 	}
+
+    
+    //HACK: do a "cheat" clone, see Record.java for more information
+    public Object clone() {
+        return cloneViaReserialise();
+    }
+
+    
 }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/HeaderFooterRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/HeaderFooterRecord.java?rev=980102&r1=980101&r2=980102&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/HeaderFooterRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HeaderFooterRecord.java Wed Jul 28 15:51:57
2010
@@ -94,5 +94,11 @@ public final class HeaderFooterRecord ex
         sb.append("[/").append("HEADERFOOTER").append("]\n");
         return sb.toString();
     }
+
+    //HACK: do a "cheat" clone, see Record.java for more information
+    public Object clone() {
+                return cloneViaReserialise();
+    }
     
+ 
 }
\ No newline at end of file

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewBegin.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewBegin.java?rev=980102&r1=980101&r2=980102&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewBegin.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewBegin.java Wed Jul 28 15:51:57
2010
@@ -83,5 +83,10 @@ public final class UserSViewBegin extend
         sb.append("[/").append("USERSVIEWBEGIN").append("]\n");
         return sb.toString();
     }
-    
+
+    //HACK: do a "cheat" clone, see Record.java for more information
+    public Object clone() {
+        return cloneViaReserialise();
+    }
+ 
 }
\ No newline at end of file

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewEnd.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewEnd.java?rev=980102&r1=980101&r2=980102&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewEnd.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UserSViewEnd.java Wed Jul 28 15:51:57 2010
@@ -72,4 +72,10 @@ public final class UserSViewEnd extends 
         return sb.toString();
     }
 
+    //HACK: do a "cheat" clone, see Record.java for more information
+    public Object clone() {
+        return cloneViaReserialise();
+    }
+
+    
 }
\ No newline at end of file

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFeatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFeatRecord.java?rev=980102&r1=980101&r2=980102&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFeatRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFeatRecord.java Wed Jul 28 15:51:57
2010
@@ -170,4 +170,13 @@ public final class TestFeatRecord extend
 		assertFalse(fferr2.getCheckUnprotectedFormulas());
 		assertFalse(fferr2.getPerformDataValidation());
 	}
+
+    /**
+     *  cloning sheets with feat records 
+     */
+    public void testCloneSheetWithFeatRecord() throws Exception {
+        HSSFWorkbook wb =
+            HSSFTestDataSamples.openSampleWorkbook("46136-WithWarnings.xls");
+        wb.cloneSheet(0);
+    }
 }



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


Mime
View raw message