incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robw...@apache.org
Subject svn commit: r1374762 [1/4] - in /incubator/odf/trunk: odfdom/ odfdom/src/main/java/org/odftoolkit/odfdom/pkg/ odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/ odfdom/src/test/java/org/odftoolkit/odfdom/doc/ odfdom/src/test/java/org/odftoolkit/o...
Date Sun, 19 Aug 2012 15:01:10 GMT
Author: robweir
Date: Sun Aug 19 15:01:09 2012
New Revision: 1374762

URL: http://svn.apache.org/viewvc?rev=1374762&view=rev
Log:
Revert of r1359972 due to build breakage on Ubuntu

Removed:
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfDecryptedException.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/OdfManifestDom.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/style/TOCStyle.java
    incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/text/TableOfContentTest.java
    incubator/odf/trunk/simple/src/test/resources/testList2.odt
Modified:
    incubator/odf/trunk/odfdom/pom.xml
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfFileDom.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfManifestSaxHandler.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfPackage.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfPackageDocument.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfValidationException.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfXMLFactory.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/ZipHelper.java
    incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/manifest/OdfFileEntry.java
    incubator/odf/trunk/odfdom/src/test/java/org/odftoolkit/odfdom/doc/DocumentTest.java
    incubator/odf/trunk/odfdom/src/test/java/org/odftoolkit/odfdom/pkg/LoadSaveErrorTest.java
    incubator/odf/trunk/odfdom/src/test/java/org/odftoolkit/odfdom/pkg/OdfXMLHelper.java
    incubator/odf/trunk/odfdom/src/test/java/org/odftoolkit/odfdom/pkg/PackageTest.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/Document.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/TextDocument.java
    incubator/odf/trunk/simple/src/main/java/org/odftoolkit/simple/text/list/AbstractListContainer.java
    incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/DocumentTest.java
    incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/SpreadsheetDocumentTest.java
    incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/text/FooterTest.java
    incubator/odf/trunk/simple/src/test/java/org/odftoolkit/simple/text/list/ListItemTest.java
    incubator/odf/trunk/validator/src/main/java/org/odftoolkit/odfvalidator/ODFFileValidator.java
    incubator/odf/trunk/validator/src/main/java/org/odftoolkit/odfvalidator/ODFPackageValidator.java
    incubator/odf/trunk/validator/src/test/java/org/odftoolkit/odfvalidator/InvalidPackageTest.java

Modified: incubator/odf/trunk/odfdom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/pom.xml?rev=1374762&r1=1374761&r2=1374762&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/pom.xml (original)
+++ incubator/odf/trunk/odfdom/pom.xml Sun Aug 19 15:01:09 2012
@@ -98,8 +98,6 @@
                 <!-- Explizit version required for fix on systemPropertyVariables -->
                 <version>2.6</version>
                 <configuration>
-                    <forkMode>pertest</forkMode>
-                    <argLine>-Xms512m -Xmx512m</argLine>
                     <systemPropertyVariables>
                         <odfdom.version>${project.version}</odfdom.version>
                         <odfdom.timestamp>${build.timestamp}</odfdom.timestamp>

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfFileDom.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfFileDom.java?rev=1374762&r1=1374761&r2=1374762&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfFileDom.java (original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfFileDom.java Sun
Aug 19 15:01:09 2012
@@ -43,7 +43,6 @@ import org.odftoolkit.odfdom.dom.OdfMeta
 import org.odftoolkit.odfdom.dom.OdfSchemaDocument;
 import org.odftoolkit.odfdom.dom.OdfSettingsDom;
 import org.odftoolkit.odfdom.dom.OdfStylesDom;
-import org.odftoolkit.odfdom.pkg.manifest.OdfManifestDom;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -51,7 +50,7 @@ import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
 
 /**
- * The DOM representation of an XML file within the ODF document.
+ * The DOM repesentation of an XML file within the ODF document.
  */
 public class OdfFileDom extends DocumentImpl implements NamespaceContext {
 
@@ -68,15 +67,14 @@ public class OdfFileDom extends Document
 
 	/**
 	 * Creates the DOM representation of an XML file of an Odf document.
-	 * 
-	 * @param packageDocument
-	 *            the document the XML files belongs to
-	 * @param packagePath
-	 *            the internal package path to the XML file
+	 *
+	 * @param packageDocument   the document the XML files belongs to
+	 * @param packagePath   the internal package path to the XML file
 	 */
 	protected OdfFileDom(OdfPackageDocument packageDocument, String packagePath) {
 		super(false);
 		if (packageDocument != null && packagePath != null) {
+
 			mPackageDocument = packageDocument;
 			mPackage = packageDocument.getPackage();
 			mPackagePath = packagePath;
@@ -86,43 +84,14 @@ public class OdfFileDom extends Document
 			initialize();
 			// Register every DOM to OdfPackage,
 			// so a package close might save this DOM (similar as OdfDocumentPackage)
-			this.addDomToCache(mPackage, packagePath);
+			this.addDomToCache(mPackageDocument.mPackage, packagePath);
 		} else {
 			throw new IllegalArgumentException("Arguments are not allowed to be NULL for OdfFileDom
constructor!");
 		}
 	}
-	
-	/**
-	 * Creates the DOM representation of an XML file of an Odf document.
-	 * 
-	 * @param pkg
-	 *            the package the XML files belongs to
-	 * @param packagePath
-	 *            the internal package path to the XML file
-	 */
-	protected OdfFileDom(OdfPackage pkg, String packagePath) {
-		super(false);
-		if (pkg != null && packagePath != null) {
-			mPackageDocument = null;
-			mPackage = pkg;
-			mPackagePath = packagePath;
-			mUriByPrefix = new HashMap<String, String>();
-			mPrefixByUri = new HashMap<String, String>();
-			mDuplicatePrefixesByUri = new HashMap<String, Set<String>>();
-			initialize();
-			// Register every DOM to OdfPackage,
-			// so a package close might save this DOM (similar as
-			// OdfDocumentPackage)
-			addDomToCache(mPackage, packagePath);
-		} else {
-			throw new IllegalArgumentException(
-					"Arguments are not allowed to be NULL for OdfFileDom constructor!");
-		}
-	}
-	
-	/**
-	 * Adds the document to the pool of open documents of the package. A
-	 * document of a certain path is opened only once to avoid data duplication.
+
+	/** Adds the document to the pool of open documents of the package.
+	A document of a certain path is opened only once to avoid data duplication.
 	 */
 	private void addDomToCache(OdfPackage pkg, String internalPath) {
 		pkg.cacheDom(this, internalPath);
@@ -142,8 +111,6 @@ public class OdfFileDom extends Document
 				newFileDom = new OdfMetaDom((OdfSchemaDocument) packageDocument, packagePath);
 			} else if (packagePath.equals("settings.xml") || packagePath.endsWith("/settings.xml"))
{
 				newFileDom = new OdfSettingsDom((OdfSchemaDocument) packageDocument, packagePath);
-			} else if (packagePath.equals("META-INF/manifest.xml") || packagePath.endsWith("/META-INF/manifest.xml"))
{
-				newFileDom = new OdfManifestDom((OdfSchemaDocument) packageDocument, packagePath);
 			} else {
 				newFileDom = new OdfFileDom(packageDocument, packagePath);
 			}
@@ -161,30 +128,6 @@ public class OdfFileDom extends Document
 		return newFileDom;
 	}
 
-	public static OdfFileDom newFileDom(OdfPackage pkg, String packagePath) {
-		OdfFileDom newFileDom = null;
-		// before creating a new dom, make sure that there no DOM opened for this file already
-		Document existingDom = pkg.getCachedDom(packagePath);
-		if (existingDom == null) {
-			if (packagePath.equals("META-INF/manifest.xml") || packagePath.endsWith("/META-INF/manifest.xml"))
{
-				newFileDom = new OdfManifestDom(pkg, packagePath);
-			} else {
-				newFileDom = new OdfFileDom(pkg, packagePath);
-			}
-		} else {
-			if (existingDom instanceof OdfFileDom) {
-				newFileDom = (OdfFileDom) existingDom;
-//ToDO: Issue 264 - Otherwise if NOT an OdfFileDom serialize old DOM AND CREATE A NEW ONE?!
-// Or shall we always reference to the dom, than we can not inherit from Document? Pro/Con?s
-//			}else{
-//				// Create an OdfFileDOM from an existing DOM
-//				newFileDom =
-			}
-
-		}
-		return newFileDom;
-	}
-	
 	protected void initialize() {
 		InputStream fileStream = null;
 		try {
@@ -197,14 +140,14 @@ public class OdfFileDom extends Document
 			}
 
 		} catch (Exception ex) {
-			Logger.getLogger(OdfFileDom.class.getName()).log(Level.SEVERE, null, ex);
+			Logger.getLogger(OdfPackageDocument.class.getName()).log(Level.SEVERE, null, ex);
 		} finally {
 			try {
 				if (fileStream != null) {
 					fileStream.close();
 				}
 			} catch (IOException ex) {
-				Logger.getLogger(OdfFileDom.class.getName()).log(Level.SEVERE, null, ex);
+				Logger.getLogger(OdfPackageDocument.class.getName()).log(Level.SEVERE, null, ex);
 			}
 		}
 	}

Modified: incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfManifestSaxHandler.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfManifestSaxHandler.java?rev=1374762&r1=1374761&r2=1374762&view=diff
==============================================================================
--- incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfManifestSaxHandler.java
(original)
+++ incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfManifestSaxHandler.java
Sun Aug 19 15:01:09 2012
@@ -18,7 +18,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
- ************************************************************************//*
+ ************************************************************************/
 package org.odftoolkit.odfdom.pkg;
 
 import java.util.Map;
@@ -42,40 +42,40 @@ class OdfManifestSaxHandler implements C
 		mPackage = pkg;
 	}
 
-	*//**
+	/**
 	 * Receive an object for locating the origin of SAX document events.
-	 *//*
+	 */
 	public void setDocumentLocator(Locator locator) {
 	}
 
-	*//**
+	/**
 	 * Receive notification of the beginning of a document.
-	 *//*
+	 */
 	public void startDocument() throws SAXException {
 	}
 
-	*//**
+	/**
 	 * Receive notification of the end of a document.
-	 *//*
+	 */
 	public void endDocument() throws SAXException {
 	}
 
-	*//**
+	/**
 	 * Begin the scope of a prefix-URI Namespace mapping.
-	 *//*
+	 */
 	public void startPrefixMapping(String prefix, String uri)
 			throws SAXException {
 	}
 
-	*//**
+	/**
 	 * End the scope of a prefix-URI mapping.
-	 *//*
+	 */
 	public void endPrefixMapping(String prefix) throws SAXException {
 	}
 
-	*//**
+	/**
 	 * Receive notification of the beginning of an element.
-	 *//*
+	 */
 	public void startElement(String namespaceURI, String localName,
 			String qName, Attributes atts) throws SAXException {
 		Map<String, OdfFileEntry> entries = mPackage.getManifestEntries();
@@ -140,9 +140,9 @@ class OdfManifestSaxHandler implements C
 
 	}
 
-	*//**
+	/**
 	 * Receive notification of the end of an element.
-	 *//*
+	 */
 	public void endElement(String namespaceURI, String localName,
 			String qName) throws SAXException {
 		//ToDo Issue 263: Parsing of Manifest.xml specific part to be added to parser
@@ -151,31 +151,30 @@ class OdfManifestSaxHandler implements C
 		}
 	}
 
-	*//**
+	/**
 	 * Receive notification of character data.
-	 *//*
+	 */
 	public void characters(char[] ch, int start, int length)
 			throws SAXException {
 	}
 
-	*//**
+	/**
 	 * Receive notification of ignorable whitespace in element content.
-	 *//*
+	 */
 	public void ignorableWhitespace(char[] ch, int start, int length)
 			throws SAXException {
 	}
 
-	*//**
+	/**
 	 * Receive notification of a processing instruction.
-	 *//*
+	 */
 	public void processingInstruction(String target, String data)
 			throws SAXException {
 	}
 
-	*//**
+	/**
 	 * Receive notification of a skipped entity.
-	 *//*
+	 */
 	public void skippedEntity(String name) throws SAXException {
 	}
 }
-*/



Mime
View raw message