/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
package org.openoffice.xmerge.converter.xml.sxw.pocketword;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import org.openoffice.xmerge.ConvertData;
import org.openoffice.xmerge.ConvertException;
import org.openoffice.xmerge.Document;
import org.openoffice.xmerge.DocumentDeserializer;
import org.openoffice.xmerge.converter.xml.OfficeConstants;
import org.openoffice.xmerge.converter.xml.ParaStyle;
import org.openoffice.xmerge.converter.xml.StyleCatalog;
import org.openoffice.xmerge.converter.xml.TextStyle;
import org.openoffice.xmerge.converter.xml.sxw.SxwDocument;
import org.openoffice.xmerge.util.OfficeUtil;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
*
Pocket Word implementation of DocumentDeserializer
* for the {@link
* org.openoffice.xmerge.converter.xml.sxw.pocketword.PluginFactoryImpl
* PluginFactoryImpl}.
*
*
This converts a Pocket Word file to an OpenOffice Writer XML DOM.
*
* @author Mark Murnane
* @version 1.1
*/
public final class DocumentDeserializerImpl
implements DocumentDeserializer, OfficeConstants {
private PocketWordDocument pswDoc = null;
private SxwDocument sxwDoc = null;
private String docName;
private StyleCatalog styleCat = null;
/**
* Initialises a new DocumentDeserializerImpl using the
* supplied ConvertData.
*
*
The Document objects in the ConvertData
* should be {@link
* org.openoffice.xmerge.converter.xml.sxw.pocketword.PocketWordDocument
* PocketWordDocument} objects.
*
* @param cd ConvertData containing a PocketWordDocument
* for conversion.
*/
public DocumentDeserializerImpl(ConvertData cd) {
Iterator