You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/08/05 22:07:11 UTC

[53/57] incubator-corinthia git commit: removed all non-release files

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/latex/tests/tables/create06.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/tests/tables/create06.test b/DocFormats/filters/latex/tests/tables/create06.test
deleted file mode 100644
index 2825e47..0000000
--- a/DocFormats/filters/latex/tests/tables/create06.test
+++ /dev/null
@@ -1,53 +0,0 @@
-latex.create
-#item input.html
-<!DOCTYPE html>
-<html>
-<body>
-
-<table>
-  <tr>
-    <td>1,1</td>
-    <td>1,2</td>
-    <td>1,3</td>
-    <td>1,4</td>
-  </tr>
-  <tr>
-    <td>2,1</td>
-    <td>2,2</td>
-    <td>2,3</td>
-    <td rowspan="2">2,4</td>
-  </tr>
-  <tr>
-    <td>3,1</td>
-    <td>3,2</td>
-    <td>3,3</td>
-  </tr>
-</table>
-
-</body>
-</html>
-#item expected
-\documentclass[a4paper,12pt]{article}
-
-\usepackage{multirow}
-
-\setlength{\parskip}{\medskipamount}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\begin{table}
-\begin{center}
-\begin{tabular}{|l|l|l|l|}
-\hline
-1,1 & 1,2 & 1,3 & 1,4 \\
-\hline
-2,1 & 2,2 & 2,3 & \multirow{2}{*}{2,4} \\
-\cline{1-3}
-3,1 & 3,2 & 3,3 &  \\
-\hline
-\end{tabular}
-\end{center}
-\end{table}
-
-\end{document}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/latex/tests/tables/create07.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/tests/tables/create07.test b/DocFormats/filters/latex/tests/tables/create07.test
deleted file mode 100644
index e52f52b..0000000
--- a/DocFormats/filters/latex/tests/tables/create07.test
+++ /dev/null
@@ -1,51 +0,0 @@
-latex.create
-#item input.html
-<!DOCTYPE html>
-<html>
-<body>
-
-<table>
-  <tr>
-    <td colspan="2">1,1</td>
-    <td>1,3</td>
-    <td>1,4</td>
-  </tr>
-  <tr>
-    <td>2,1</td>
-    <td>2,2</td>
-    <td>2,3</td>
-    <td>2,4</td>
-  </tr>
-  <tr>
-    <td>3,1</td>
-    <td>3,2</td>
-    <td>3,3</td>
-    <td>3,4</td>
-  </tr>
-</table>
-
-</body>
-</html>
-#item expected
-\documentclass[a4paper,12pt]{article}
-
-\setlength{\parskip}{\medskipamount}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\begin{table}
-\begin{center}
-\begin{tabular}{|l|l|l|l|}
-\hline
-\multicolumn{2}{|l|}{1,1} & 1,3 & 1,4 \\
-\hline
-2,1 & 2,2 & 2,3 & 2,4 \\
-\hline
-3,1 & 3,2 & 3,3 & 3,4 \\
-\hline
-\end{tabular}
-\end{center}
-\end{table}
-
-\end{document}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/latex/tests/tables/create08.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/tests/tables/create08.test b/DocFormats/filters/latex/tests/tables/create08.test
deleted file mode 100644
index 5a5d19c..0000000
--- a/DocFormats/filters/latex/tests/tables/create08.test
+++ /dev/null
@@ -1,51 +0,0 @@
-latex.create
-#item input.html
-<!DOCTYPE html>
-<html>
-<body>
-
-<table>
-  <tr>
-    <td>1,1</td>
-    <td colspan="2">1,2</td>
-    <td>1,4</td>
-  </tr>
-  <tr>
-    <td>2,1</td>
-    <td>2,2</td>
-    <td>2,3</td>
-    <td>2,4</td>
-  </tr>
-  <tr>
-    <td>3,1</td>
-    <td>3,2</td>
-    <td>3,3</td>
-    <td>3,4</td>
-  </tr>
-</table>
-
-</body>
-</html>
-#item expected
-\documentclass[a4paper,12pt]{article}
-
-\setlength{\parskip}{\medskipamount}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\begin{table}
-\begin{center}
-\begin{tabular}{|l|l|l|l|}
-\hline
-1,1 & \multicolumn{2}{|l|}{1,2} & 1,4 \\
-\hline
-2,1 & 2,2 & 2,3 & 2,4 \\
-\hline
-3,1 & 3,2 & 3,3 & 3,4 \\
-\hline
-\end{tabular}
-\end{center}
-\end{table}
-
-\end{document}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/latex/tests/tables/create09.test
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/tests/tables/create09.test b/DocFormats/filters/latex/tests/tables/create09.test
deleted file mode 100644
index 13f55e4..0000000
--- a/DocFormats/filters/latex/tests/tables/create09.test
+++ /dev/null
@@ -1,50 +0,0 @@
-latex.create
-#item input.html
-<!DOCTYPE html>
-<html>
-<body>
-
-<table>
-  <tr>
-    <td>1,1</td>
-    <td>1,2</td>
-    <td>1,3</td>
-    <td>1,4</td>
-  </tr>
-  <tr>
-    <td>2,1</td>
-    <td>2,2</td>
-    <td>2,3</td>
-    <td>2,4</td>
-  </tr>
-  <tr>
-    <td>3,1</td>
-    <td colspan="3">3,2</td>
-  </tr>
-</table>
-
-</body>
-</html>
-#item expected
-\documentclass[a4paper,12pt]{article}
-
-\setlength{\parskip}{\medskipamount}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\begin{table}
-\begin{center}
-\begin{tabular}{|l|l|l|l|}
-\hline
-1,1 & 1,2 & 1,3 & 1,4 \\
-\hline
-2,1 & 2,2 & 2,3 & 2,4 \\
-\hline
-3,1 & \multicolumn{3}{|l|}{3,2} \\
-\hline
-\end{tabular}
-\end{center}
-\end{table}
-
-\end{document}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/CMakeLists.txt b/DocFormats/filters/odf/CMakeLists.txt
deleted file mode 100644
index 9658f49..0000000
--- a/DocFormats/filters/odf/CMakeLists.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# Licensed 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
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-###
-## group odf objects
-###
-set(GroupSrc
-    src/ODF.c
-    src/ODF.h
-    src/ODFManifest.c
-    src/ODFManifest.h
-    src/ODFPackage.c
-    src/ODFPackage.h
-    src/ODFSheet.c
-    src/ODFSheet.h)
-
-set(GroupSrcText
-    src/text/ODFText.h
-    src/text/ODFText.c
-    src/text/ODFTextConverter.h
-    src/text/ODFTextConverter.c)
-
-set(GroupTests
-    tests/ODFTests.c)
-
-
-
-###
-# Common include for all platform files
-###
-include_directories()
-include_directories(/usr/include/libxml2)
-include_directories(../../DocFormats/3rdparty/external/w3c-tidy-html5/include)
-include_directories(../../DocFormats/3rdparty/external/w3c-tidy-html5/src)
-
-include_directories(SYSTEM ${INCLUDE_DIRS})
-include_directories(SYSTEM ../../api/headers)
-include_directories(../../headers)
-include_directories(../../core/src/common)
-include_directories(../../core/src/css)
-include_directories(../../core/src/html)
-include_directories(../../core/src/lib)
-include_directories(../../core/src/names)
-include_directories(../../core/src/xml)
-include_directories(../../filters/latex/src)
-include_directories(../../filters/odf/src)
-include_directories(../../filters/ooxml/src/common)
-include_directories(../../filters/ooxml/src/word)
-include_directories(../../filters/ooxml/src/word/formatting)
-include_directories(../../filters/ooxml/src/word/lenses)
-include_directories(../../unittest)
-
-
-
-###
-# Prebuild library (needed to use different compile options)
-###
-add_library(odf OBJECT
-    ${GroupSrc}
-    ${GroupSrcText}
-    ${GroupTests})
-source_group(src         FILES ${GroupSrc})
-source_group(src\\text   FILES ${GroupSrcText})
-source_group(tests       FILES ${GroupTests})
-set_property(TARGET odf PROPERTY FOLDER DocFormats/filters)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODF.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODF.c b/DocFormats/filters/odf/src/ODF.c
deleted file mode 100644
index f2091de..0000000
--- a/DocFormats/filters/odf/src/ODF.c
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "DFPlatform.h"
-#include "ODF.h"
-#include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODF.h
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODF.h b/DocFormats/filters/odf/src/ODF.h
deleted file mode 100644
index d34d3c5..0000000
--- a/DocFormats/filters/odf/src/ODF.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#pragma once
-
-#include "ODFPackage.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODFManifest.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFManifest.c b/DocFormats/filters/odf/src/ODFManifest.c
deleted file mode 100644
index b24c4eb..0000000
--- a/DocFormats/filters/odf/src/ODFManifest.c
+++ /dev/null
@@ -1,84 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "DFPlatform.h"
-#include "ODFManifest.h"
-#include "DFXMLNames.h"
-#include "DFCommon.h"
-#include <stdlib.h>
-#include <string.h>
-
-static void ODFManifestParse(ODFManifest *manifest)
-{
-    for (DFNode *child = manifest->doc->root; child != NULL; child = child->next) {
-        if (child->tag == MF_FILE_ENTRY) {
-            const char *path = DFGetAttribute(child,MF_FULL_PATH);
-            if (path != NULL)
-                DFHashTableAdd(manifest->entriesByPath,path,child);
-        }
-    }
-}
-
-ODFManifest *ODFManifestNew(void)
-{
-    ODFManifest *manifest = (ODFManifest *)xcalloc(1,sizeof(ODFManifest));
-    manifest->retainCount = 1;
-    manifest->doc = DFDocumentNewWithRoot(MF_MANIFEST);
-    manifest->entriesByPath = DFHashTableNew(NULL,NULL);
-    return manifest;
-}
-
-ODFManifest *ODFManifestNewWithDoc(DFDocument *doc)
-{
-    ODFManifest *manifest = (ODFManifest *)xcalloc(1,sizeof(ODFManifest));
-    manifest->doc = DFDocumentRetain(doc);
-    manifest->entriesByPath = DFHashTableNew(NULL,NULL);
-    ODFManifestParse(manifest);
-    return manifest;
-}
-
-ODFManifest *ODFManifestRetain(ODFManifest *manifest)
-{
-    if (manifest != NULL)
-        manifest->retainCount++;
-    return manifest;
-}
-
-void ODFManifestRelease(ODFManifest *manifest)
-{
-    if ((manifest == NULL) || (--manifest->retainCount > 0))
-        return;
-
-    DFDocumentRelease(manifest->doc);
-    DFHashTableRelease(manifest->entriesByPath);
-    free(manifest);
-}
-
-void ODFManifestAddEntry(ODFManifest *manifest, const char *path, const char *mediaType,
-                         const char *version)
-{
-    DFNode *entry = DFHashTableLookup(manifest->entriesByPath,path);
-    if (entry == NULL) {
-        entry = DFCreateChildElement(manifest->doc->root,MF_FILE_ENTRY);
-        DFHashTableAdd(manifest->entriesByPath,path,entry);
-    }
-    DFSetAttribute(entry,MF_FULL_PATH,path);
-    DFSetAttribute(entry,MF_MEDIA_TYPE,mediaType);
-    DFSetAttribute(entry,MF_VERSION,version);
-    if (!strcmp(path,"") && (version != NULL))
-        DFSetAttribute(manifest->doc->root,MF_VERSION,version);
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODFManifest.h
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFManifest.h b/DocFormats/filters/odf/src/ODFManifest.h
deleted file mode 100644
index 9a57e1f..0000000
--- a/DocFormats/filters/odf/src/ODFManifest.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#pragma once
-
-#include "DFDOM.h"
-#include "DFHashTable.h"
-#include "DFTypes.h"
-
-/**
-
- \file
-
- # ODFManifest
-
- All ODF documents are required to contain a file called `META-INF/manifest.xml`. This file acts as
- as an index of all of the individual files within the zipped package, containing information such
- as their mime type. Every file in the zipped package must have an entry in the manifest, with
- the exception of the `META-INF/manifest.xml` file itself, and the `mimetype` file in the root of
- the package; both these files are explicitly forbidden to appear in the manifest.
-
- It is unclear exactly why the manifest is necessary when the only information it contains is the
- mimetype of the files (which could be easily deduced from their file extensions, if it is needed
- at all). Nonetheless, it is required by the spec, and OpenOffice refuses to open documents that
- do not contain a manifest. Cynics might suggest that it serves the purpose of making the file
- format more complicated.
-
- The manifest file has a root element called `manifest`, with child elements named `file-entry`.
- There is one `file-entry` element for each file in the package, including the root directory, which
- defines the mimetype of the docment as a whole. An example manifest file is given below:
-
-     <mf:manifest xmlns:mf="urn:oasis:names:tc:opendocument:xmlns:mf:1.0" mf:version="1.2">
-         <mf:file-entry mf:media-type="text/xml" mf:full-path="content.xml"/>
-         <mf:file-entry mf:media-type="text/xml" mf:full-path="styles.xml"/>
-         <mf:file-entry mf:media-type="text/xml" mf:full-path="settings.xml"/>
-         <mf:file-entry mf:media-type="text/xml" mf:full-path="meta.xml"/>
-     </mf:manifest>
-
- The ODFManifest class provides a C representation of the manifest, and primarily exists to ensure
- that all of the required entries are present when saving a file, thus ensuring the file is valid
- and can be successfully opened by OpenOffice. DocFormats itself does not use the manifest when
- reading the package, because it's entirely redundant - all the information it contains can be
- deduced from the directory hierarchy in the zip file.
-
- There are two ways to create a new manifest object, depending on whether you are creating a new
- ODF document, or opening an existing one. ODFManifestNew() will create a manifest with an empty
- document (save for the `manifest` root element). ODFManifestNewWithDoc() will create an object
- based on an existing document you have read from a file.
-
- The entriesByPath hash table maps from path names (strings) to `file-entry` elements. It is
- populated when you call ODFManifestNewWithDoc(). This hash table enables quick lookup of entries
- based on their path.
-
- */
-
-typedef struct ODFManifest ODFManifest;
-
-struct ODFManifest {
-    size_t retainCount;
-    DFDocument *doc;
-    DFHashTable *entriesByPath;
-};
-
-ODFManifest *ODFManifestNew(void);
-ODFManifest *ODFManifestNewWithDoc(DFDocument *doc);
-ODFManifest *ODFManifestRetain(ODFManifest *manifest);
-void ODFManifestRelease(ODFManifest *manifest);
-
-void ODFManifestAddEntry(ODFManifest *manifest, const char *path, const char *mediaType,
-                         const char *version);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODFPackage.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFPackage.c b/DocFormats/filters/odf/src/ODFPackage.c
deleted file mode 100644
index 3507586..0000000
--- a/DocFormats/filters/odf/src/ODFPackage.c
+++ /dev/null
@@ -1,172 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "DFPlatform.h"
-#include "ODFPackage.h"
-#include "DFDOM.h"
-#include "DFXML.h"
-#include "DFString.h"
-#include "DFFilesystem.h"
-#include "DFCommon.h"
-#include <stdlib.h>
-#include <string.h>
-
-static DFDocument *createDocument(Tag rootTag, Tag childTag)
-{
-    DFDocument *doc = DFDocumentNewWithRoot(rootTag);
-    DFCreateChildElement(doc->root,childTag);
-    return doc;
-}
-
-static DFDocument *readDocument(ODFPackage *package, const char *filename, DFError **error)
-{
-    DFDocument *doc = DFParseXMLStorage(package->storage,filename,error);
-    if (doc == NULL) {
-        DFErrorFormat(error,"%s: %s",filename,DFErrorMessage(error));
-        return NULL;
-    }
-    return doc;
-}
-
-static ODFManifest *readManifest(ODFPackage *package, DFError **error)
-{
-    DFDocument *manifestDoc = DFParseXMLStorage(package->storage,"META-INF/manifest.xml",error);
-    if (manifestDoc == NULL) {
-        DFErrorFormat(error,"META-INF/manifest.xml: %s",DFErrorMessage(error));
-        return NULL;
-    }
-    return ODFManifestNewWithDoc(manifestDoc);
-}
-
-static int writeDocument(ODFPackage *package, DFDocument *doc, NamespaceID defaultNS,
-                         const char *filename, DFError **error)
-{
-    int ok = DFSerializeXMLStorage(doc,defaultNS,0,package->storage,filename,error);
-    if (!ok)
-        DFErrorFormat(error,"%s: %s",filename,DFErrorMessage(error));
-    return ok;
-}
-
-static int writeString(ODFPackage *package, const char *str, const char *filename, DFError **error)
-{
-    DFBuffer *buf = DFBufferNew();
-    DFBufferAppendString(buf,str);
-    int ok = DFBufferWriteToStorage(buf,package->storage,filename,error);
-    DFBufferRelease(buf);
-
-    if (!ok)
-        DFErrorFormat(error,"%s: %s",filename,DFErrorMessage(error));
-    return ok;
-}
-
-ODFPackage *ODFPackageOpenNew(DFStorage *storage, DFError **error)
-{
-    ODFPackage *package = (ODFPackage *)xcalloc(1,sizeof(ODFPackage));
-    package->retainCount = 1;
-    package->storage = DFStorageRetain(storage);
-
-    // Create XML documents
-    package->contentDoc = createDocument(OFFICE_DOCUMENT_CONTENT,OFFICE_BODY);
-    package->metaDoc = createDocument(OFFICE_DOCUMENT_META,OFFICE_META);
-    package->settingsDoc = createDocument(OFFICE_DOCUMENT_SETTINGS,OFFICE_SETTINGS);
-    package->stylesDoc = createDocument(OFFICE_DOCUMENT_STYLES,OFFICE_STYLES);
-
-    // Create manifst
-    package->manifest = ODFManifestNew();
-    ODFManifestAddEntry(package->manifest,"/","application/vnd.oasis.opendocument.text","1.2");
-    ODFManifestAddEntry(package->manifest,"content.xml","text/xml",NULL);
-    ODFManifestAddEntry(package->manifest,"meta.xml","text/xml",NULL);
-    ODFManifestAddEntry(package->manifest,"settings.xml","text/xml",NULL);
-    ODFManifestAddEntry(package->manifest,"styles.xml","text/xml",NULL);
-
-    // Setup ODF objects
-    package->sheet = ODFSheetNew(package->stylesDoc,package->contentDoc);
-
-    return package;
-}
-
-ODFPackage *ODFPackageOpenFrom(DFStorage *storage, DFError **error)
-{
-    ODFPackage *package = (ODFPackage *)xcalloc(1,sizeof(ODFPackage));
-    package->retainCount = 1;
-    package->storage = DFStorageRetain(storage);
-
-    // Read XML documents
-    if ((package->contentDoc = readDocument(package,"content.xml",error)) == NULL)
-        goto end;
-    if ((package->metaDoc = readDocument(package,"meta.xml",error)) == NULL)
-        goto end;
-    if ((package->settingsDoc = readDocument(package,"settings.xml",error)) == NULL)
-        goto end;
-    if ((package->stylesDoc = readDocument(package,"styles.xml",error)) == NULL)
-        goto end;
-
-    // Read manifest
-    if ((package->manifest = readManifest(package,error)) == NULL)
-        goto end;
-
-    // Setup ODF objects
-    package->sheet = ODFSheetNew(package->stylesDoc,package->contentDoc);
-
-    return package;
-
-end:
-    ODFPackageRelease(package);
-    return NULL;
-}
-
-ODFPackage *ODFPackageRetain(ODFPackage *package)
-{
-    if (package != NULL)
-        package->retainCount++;
-    return package;
-}
-
-void ODFPackageRelease(ODFPackage *package)
-{
-    if ((package == NULL) || (--package->retainCount > 0))
-        return;
-
-    DFStorageRelease(package->storage);
-    ODFManifestRelease(package->manifest);
-    ODFSheetRelease(package->sheet);
-    DFDocumentRelease(package->contentDoc);
-    DFDocumentRelease(package->metaDoc);
-    DFDocumentRelease(package->settingsDoc);
-    DFDocumentRelease(package->stylesDoc);
-    free(package);
-}
-
-int ODFPackageSave(ODFPackage *package, DFError **error)
-{
-    if (!writeDocument(package,package->contentDoc,NAMESPACE_NULL,"content.xml",error))
-        return 0;
-    if (!writeDocument(package,package->metaDoc,NAMESPACE_NULL,"meta.xml",error))
-        return 0;
-    if (!writeDocument(package,package->settingsDoc,NAMESPACE_NULL,"settings.xml",error))
-        return 0;
-    if (!writeDocument(package,package->stylesDoc,NAMESPACE_NULL,"styles.xml",error))
-        return 0;
-    if (!writeDocument(package,package->manifest->doc,NAMESPACE_NULL,"META-INF/manifest.xml",error))
-        return 0;
-    if (!writeString(package,"application/vnd.oasis.opendocument.text","mimetype",error))
-        return 0;
-    if (!DFStorageSave(package->storage,error))
-        return 0;
-
-    return 1;
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODFPackage.h
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFPackage.h b/DocFormats/filters/odf/src/ODFPackage.h
deleted file mode 100644
index f30d5ca..0000000
--- a/DocFormats/filters/odf/src/ODFPackage.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#pragma once
-
-#include <DocFormats/DFXMLForward.h>
-#include <DocFormats/DFError.h>
-#include <DocFormats/DFStorage.h>
-#include "ODFManifest.h"
-#include "ODFSheet.h"
-
-typedef struct ODFPackage ODFPackage;
-
-struct ODFPackage {
-    size_t retainCount;
-    DFStorage *storage;
-    DFDocument *contentDoc;
-    DFDocument *metaDoc;
-    DFDocument *settingsDoc;
-    DFDocument *stylesDoc;
-    ODFManifest *manifest;
-    ODFSheet *sheet;
-};
-
-ODFPackage *ODFPackageOpenNew(DFStorage *storage, DFError **error);
-ODFPackage *ODFPackageOpenFrom(DFStorage *storage, DFError **error);
-ODFPackage *ODFPackageRetain(ODFPackage *package);
-void ODFPackageRelease(ODFPackage *package);
-int ODFPackageSave(ODFPackage *package, DFError **error);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODFSheet.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFSheet.c b/DocFormats/filters/odf/src/ODFSheet.c
deleted file mode 100644
index c2ea092..0000000
--- a/DocFormats/filters/odf/src/ODFSheet.c
+++ /dev/null
@@ -1,100 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "ODFSheet.h"
-#include "DFDOM.h"
-#include "DFHashTable.h"
-#include "DFCommon.h"
-#include "DFPlatform.h"
-#include <stdlib.h>
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//                                                                                                //
-//                                            ODFStyle                                            //
-//                                                                                                //
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-ODFStyle *ODFStyleNew()
-{
-    ODFStyle *style = (ODFStyle *)xcalloc(1,sizeof(ODFStyle));
-    style->retainCount = 1;
-    return style;
-}
-
-ODFStyle *ODFStyleRetain(ODFStyle *style)
-{
-    if (style != NULL)
-        style->retainCount++;
-    return style;
-}
-
-void ODFStyleRelease(ODFStyle *style)
-{
-    if ((style == NULL) || (--style->retainCount > 0))
-        return;
-
-    free(style->selector);
-    free(style);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//                                                                                                //
-//                                            ODFSheet                                            //
-//                                                                                                //
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-struct ODFSheet {
-    size_t retainCount;
-    DFDocument *stylesDoc;
-    DFDocument *contentDoc;
-    DFHashTable *stylesBySelector;
-};
-
-ODFSheet *ODFSheetNew(DFDocument *stylesDoc, DFDocument *contentDoc)
-{
-    ODFSheet *sheet = (ODFSheet *)xcalloc(1,sizeof(ODFSheet));
-    sheet->retainCount = 1;
-    sheet->stylesDoc = DFDocumentRetain(stylesDoc);
-    sheet->contentDoc = DFDocumentRetain(contentDoc);
-    sheet->stylesBySelector = DFHashTableNew((DFCopyFunction)ODFStyleRetain,(DFFreeFunction)ODFStyleRelease);
-    return sheet;
-}
-
-ODFSheet *ODFSheetRetain(ODFSheet *sheet)
-{
-    if (sheet != NULL)
-        sheet->retainCount++;
-    return sheet;
-}
-
-void ODFSheetRelease(ODFSheet *sheet)
-{
-    if ((sheet == NULL) || (--sheet->retainCount > 0))
-        return;
-
-    DFDocumentRelease(sheet->stylesDoc);
-    DFDocumentRelease(sheet->contentDoc);
-    DFHashTableRelease(sheet->stylesBySelector);
-    free(sheet);
-}
-
-ODFStyle *ODFSheetStyleForSelector(ODFSheet *sheet, const char *selector)
-{
-    if (selector == NULL)
-        return NULL;
-    return DFHashTableLookup(sheet->stylesBySelector,selector);
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/ODFSheet.h
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFSheet.h b/DocFormats/filters/odf/src/ODFSheet.h
deleted file mode 100644
index 72e95e7..0000000
--- a/DocFormats/filters/odf/src/ODFSheet.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#pragma once
-
-#include <DocFormats/DFXMLForward.h>
-#include "DFTypes.h"
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//                                                                                                //
-//                                            ODFStyle                                            //
-//                                                                                                //
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-typedef struct ODFStyle ODFStyle;
-
-struct ODFStyle {
-    size_t retainCount;
-    DFNode *element;
-    char *selector;
-};
-
-ODFStyle *ODFStyleNew();
-ODFStyle *ODFStyleRetain(ODFStyle *style);
-void ODFStyleRelease(ODFStyle *style);
-
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//                                                                                                //
-//                                            ODFSheet                                            //
-//                                                                                                //
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-typedef struct ODFSheet ODFSheet;
-
-ODFSheet *ODFSheetNew(DFDocument *stylesDoc, DFDocument *contentDoc);
-ODFSheet *ODFSheetRetain(ODFSheet *sheet);
-void ODFSheetRelease(ODFSheet *sheet);
-ODFStyle *ODFSheetStyleForSelector(ODFSheet *sheet, const char *selector);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/text/ODFText.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/text/ODFText.c b/DocFormats/filters/odf/src/text/ODFText.c
deleted file mode 100644
index 495df4e..0000000
--- a/DocFormats/filters/odf/src/text/ODFText.c
+++ /dev/null
@@ -1,92 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "DFPlatform.h"
-#include "ODFText.h"
-#include "ODFPackage.h"
-#include "ODFTextConverter.h"
-#include "DFDOM.h"
-#include <stdio.h>
-
-static void traverseContent(ODFTextConverter *conv, DFNode *odfNode, DFNode *htmlNode)
-{
-    printf("ODF element: %s\n",DFNodeName(odfNode));
-    for (DFNode *odfChild = odfNode->first; odfChild != NULL; odfChild = odfChild->next)
-        traverseContent(conv,odfChild,htmlNode);
-
-    // TODO: Add a switch statement here to check the type of ODF element, and use
-    // DFCreateChildElement to create a new element in the HTML document as a child of htmlNode
-    // based on the type. As this function gets more complicated, it will likely be useful to
-    // split it up into several functions
-}
-
-DFDocument *ODFTextGet(DFStorage *concreteStorage, DFStorage *abstractStorage, const char *idPrefix, DFError **error)
-{
-    int ok = 0;
-    DFDocument *html = NULL;
-    ODFPackage *package = NULL;
-    ODFTextConverter *conv = NULL;
-    DFNode *body = NULL;
-
-    package = ODFPackageOpenFrom(concreteStorage,error);
-    if (package == NULL)
-        goto end;
-
-    html = DFDocumentNewWithRoot(HTML_HTML);
-    body = DFCreateChildElement(html->root,HTML_BODY);
-    conv = ODFTextConverterNew(html,abstractStorage,package,idPrefix);
-
-    // TODO: Traverse the DOM tree of package->contentDoc, adding elements to the HTML document.
-    // contentDoc is loaded from content.xml, and represents the most important information in
-    // the document, i.e. the text, tables, lists, etc.
-    traverseContent(conv,package->contentDoc->root,body);
-
-    // TODO: Once this basic traversal is implemented and is capable of producing paragraphs,
-    // tables, lists, and spans, add ids to the HTML elements as they are created. That is, set
-    // the id attribute of each new HTML element to a string containing the idPrefix followed by
-    // the seqNo field of the node in contentDoc from which the HTML element was generated.
-    //
-    // These id attributes can then later be used in ODFTextPut to figure out which elements in an
-    // updated HTML file correspond to existing elements in the ODF content document, which lets us
-    // retain information in the ODF file that could not be translated to HTML during the get.
-    //
-    // See WordConverterCreateAbstract and WordConverterGetConcrete for how this is done in the
-    // Word filter.
-
-    ok = 1;
-
-end:
-    ODFPackageRelease(package);
-    ODFTextConverterRelease(conv);
-    if (!ok) {
-        DFDocumentRelease(html);
-        return NULL;
-    }
-    return html;
-}
-
-int ODFTextPut(DFStorage *concreteStorage, DFStorage *abstractStorage, DFDocument *htmlDoc, const char *idPrefix, DFError **error)
-{
-    DFErrorFormat(error,"ODFTextPut: Not yet implemented");
-    return 0;
-}
-
-int ODFTextCreate(DFStorage *concreteStorage, DFStorage *abstractStorage, DFDocument *htmlDoc, DFError **error)
-{
-    DFErrorFormat(error,"ODFTextCreate: Not yet implemented");
-    return 0;
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/text/ODFText.h
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/text/ODFText.h b/DocFormats/filters/odf/src/text/ODFText.h
deleted file mode 100644
index 996d930..0000000
--- a/DocFormats/filters/odf/src/text/ODFText.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#pragma once
-
-#include <DocFormats/DFError.h>
-#include <DocFormats/DFStorage.h>
-#include <DocFormats/DFXMLForward.h>
-
-DFDocument *ODFTextGet(DFStorage *concreteStorage, DFStorage *abstractStorage, const char *idPrefix, DFError **error);
-int ODFTextPut(DFStorage *concreteStorage, DFStorage *abstractStorage, DFDocument *htmlDoc, const char *idPrefix, DFError **error);
-int ODFTextCreate(DFStorage *concreteStorage, DFStorage *abstractStorage, DFDocument *htmlDoc, DFError **error);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/text/ODFTextConverter.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/text/ODFTextConverter.c b/DocFormats/filters/odf/src/text/ODFTextConverter.c
deleted file mode 100644
index 760576a..0000000
--- a/DocFormats/filters/odf/src/text/ODFTextConverter.c
+++ /dev/null
@@ -1,53 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "DFPlatform.h"
-#include "ODFTextConverter.h"
-#include "DFString.h"
-#include <stdlib.h>
-
-ODFTextConverter *ODFTextConverterNew(DFDocument *html,
-                                      DFStorage *abstractStorage,
-                                      ODFPackage *package,
-                                      const char *idPrefix)
-{
-    ODFTextConverter *conv = (ODFTextConverter *)calloc(1,sizeof(ODFTextConverter));
-    conv->retainCount = 1;
-    conv->html = DFDocumentRetain(html);
-    conv->abstractStorage = DFStorageRetain(abstractStorage);
-    conv->idPrefix = (idPrefix != NULL) ? xstrdup(idPrefix) : xstrdup("odf");
-    conv->package = ODFPackageRetain(package);
-    return conv;
-}
-
-ODFTextConverter *ODFTextConverterRetain(ODFTextConverter *conv)
-{
-    if (conv != NULL)
-        conv->retainCount++;
-    return conv;
-}
-
-void ODFTextConverterRelease(ODFTextConverter *conv)
-{
-    if ((conv == NULL) || (--conv->retainCount > 0))
-        return;
-    DFDocumentRelease(conv->html);
-    DFStorageRelease(conv->abstractStorage);
-    free(conv->idPrefix);
-    ODFPackageRelease(conv->package);
-    free(conv);
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/src/text/ODFTextConverter.h
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/text/ODFTextConverter.h b/DocFormats/filters/odf/src/text/ODFTextConverter.h
deleted file mode 100644
index 524a4e9..0000000
--- a/DocFormats/filters/odf/src/text/ODFTextConverter.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#pragma once
-
-#include <DocFormats/DFStorage.h>
-#include "DFDOM.h"
-#include "ODFPackage.h"
-
-typedef struct ODFTextConverter ODFTextConverter;
-
-struct ODFTextConverter {
-    size_t retainCount;
-    DFDocument *html;
-    DFStorage *abstractStorage;
-    ODFPackage *package;
-    char *idPrefix;
-};
-
-ODFTextConverter *ODFTextConverterNew(DFDocument *html,
-                                      DFStorage *abstractStorage,
-                                      ODFPackage *package,
-                                      const char *idPrefix);
-ODFTextConverter *ODFTextConverterRetain(ODFTextConverter *conv);
-void ODFTextConverterRelease(ODFTextConverter *conv);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/DocFormats/filters/odf/tests/ODFTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/tests/ODFTests.c b/DocFormats/filters/odf/tests/ODFTests.c
deleted file mode 100644
index a47f611..0000000
--- a/DocFormats/filters/odf/tests/ODFTests.c
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "DFUnitTest.h"
-#include <stddef.h>
-
-static void test_sample(void)
-{
-}
-
-TestGroup ODFTests = {
-    "odf", {
-        { "sample", PlainTest, test_sample },
-        { NULL, PlainTest, NULL }
-    }
-};

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/sample/README.txt
----------------------------------------------------------------------
diff --git a/sample/README.txt b/sample/README.txt
deleted file mode 100644
index 8de6b4c..0000000
--- a/sample/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-The 'code' directory contains binding code examples.  Please read the WARNINGS file.
-
-The 'documents' directory contains sample documents for conversion.

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/4eb117e0/sample/code/objc_bindings/EDJSInterface.h
----------------------------------------------------------------------
diff --git a/sample/code/objc_bindings/EDJSInterface.h b/sample/code/objc_bindings/EDJSInterface.h
deleted file mode 100644
index b4183de..0000000
--- a/sample/code/objc_bindings/EDJSInterface.h
+++ /dev/null
@@ -1,367 +0,0 @@
-// 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
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-// IMPORTANT NOTE: This code does not work in it's current form,
-// and exists for illustrative purposes only. It is an excerpt
-// from the UX Write source code indented to show how the bindings
-// between Objective C and JavaScript are implemented, both in
-// terms of calling *in* to JavaScript, and calling *out* of
-// JavaScript (that is, callback functions).
-//
-// (see further comments in EDJSInterface.m)
-
-#import <Foundation/Foundation.h>
-#import <CoreGraphics/CoreGraphics.h>
-
-@class JSAutoCorrect;
-@class JSChangeTracking;
-@class JSClipboard;
-@class JSCursor;
-@class JSEquations;
-@class JSFigures;
-@class JSFormatting;
-@class JSInput;
-@class JSLists;
-@class JSMain;
-@class JSMetadata;
-@class JSOutline;
-@class JSPreview;
-@class JSScan;
-@class JSSelection;
-@class JSStyles;
-@class JSTables;
-@class JSUndoManager;
-@class JSViewport;
-@class EDScanParagraph;
-
-@interface JSError : NSError
-
-@property (copy, readonly) NSString *type;
-@property (copy, readonly) NSString *message;
-@property (copy, readonly) NSString *operation;
-@property (copy, readonly) NSString *html;
-
-@end
-
-@protocol JSInterfaceDelegate
-
-- (void)jsAddOutlineItem:(NSString *)itemId type:(NSString *)type title:(NSString *)title;
-- (void)jsUpdateOutlineItem:(NSString *)itemId title:(NSString *)title;
-- (void)jsRemoveOutlineItem:(NSString *)itemId;
-- (void)jsOutlineUpdated;
-- (void)jsSetCursorX:(int)x y:(int)y width:(int)width height:(int)height;
-- (void)jsSetSelectionHandlesX1:(int)x1 y1:(int)y1 height1:(int)height1
-                             x2:(int)x2 y2:(int)y2 height2:(int)height2;
-- (void)jsSetTableSelectionX:(int)x y:(int)y width:(int)width height:(int)height;
-- (void)jsSetSelectionBoundsLeft:(int)left top:(int)top right:(int)right bottom:(int)bottom;
-- (void)jsClearSelectionHandlesAndCursor;
-- (void)jsUpdateAutoCorrect;
-
-@end
-
-@protocol JSEvaluator
-
-- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script;
-
-@end
-
-@interface JSInterface : NSObject
-
-@property (weak) NSObject<JSEvaluator> *evaluator;
-@property (weak) NSObject<JSInterfaceDelegate> *delegate;
-@property (assign) BOOL jsInitialised;
-@property (strong) JSAutoCorrect *autoCorrect;
-@property (strong) JSChangeTracking *changeTracking;
-@property (strong) JSClipboard *clipboard;
-@property (strong) JSCursor *cursor;
-@property (strong) JSEquations *equations;
-@property (strong) JSFigures *figures;
-@property (strong) JSFormatting *formatting;
-@property (strong) JSInput *input;
-@property (strong) JSLists *lists;
-@property (strong) JSMain *main;
-@property (strong) JSMetadata *metadata;
-@property (strong) JSOutline *outline;
-@property (strong) JSPreview *preview;
-@property (strong) JSScan *scan;
-@property (strong) JSSelection *selection;
-@property (strong) JSStyles *styles;
-@property (strong) JSTables *tables;
-@property (strong) JSUndoManager *undoManager;
-@property (strong) JSViewport *viewport;
-@property (copy) NSString *currentOperation;
-@property (strong) JSError *error;
-@property (assign) BOOL documentModified;
-
-- (JSInterface *)initWithEvaluator:(NSObject<JSEvaluator> *)evaluator;
-- (BOOL)initJavaScriptWidth:(int)width textScale:(int)textScale cssURL:(NSString *)cssURL
-             clientRectsBug:(BOOL)clientRectsBug;
-- (void)printStatistics;
-
-@end
-
-@interface JSModule : NSObject
-
-@property (assign) JSInterface *js;
-
-- (JSModule *)initWithJS:(JSInterface *)js;
-
-@end
-
-// Functions implemented in AutoCorrect.js
-
-@interface JSAutoCorrect : JSModule
-
-- (void)correctPreceding:(int)numChars word:(NSString *)replacement confirmed:(BOOL)confirmed;
-- (NSDictionary *)getCorrection;
-- (NSDictionary *)getCorrectionCoords;
-- (void)acceptCorrection;
-- (void)replaceCorrection:(NSString *)replacement;
-
-@end
-
-// Functions implemented in ChangeTracking.js
-
-@interface JSChangeTracking : JSModule
-- (BOOL)showChanges;
-- (BOOL)trackChanges;
-- (void)setShowChanges:(BOOL)showChanges;
-- (void)setTrackChanges:(BOOL)trackChanges;
-@end
-
-// Functions implemented in Clipboard.js
-
-@interface JSClipboard : JSModule
-- (NSDictionary *)clipboardCut;
-- (NSDictionary *)clipboardCopy;
-- (void)pasteHTML:(NSString *)html;
-- (void)pasteText:(NSString *)text;
-@end
-
-// Functions implemented in Cursor.js
-
-@interface JSCursor : JSModule
-- (NSString *)positionCursorX:(int)x y:(int)y wordBoundary:(BOOL)wordBoundary;
-- (CGRect)getCursorPosition;
-- (void)moveLeft;
-- (void)moveRight;
-- (void)moveToStartOfDocument;
-- (void)moveToEndOfDocument;
-- (void)insertReference:(NSString *)itemId;
-- (void)insertLinkWithText:(NSString *)text URL:(NSString *)URL;
-- (void)insertCharacter:(unichar)character allowInvalidPos:(BOOL)allowInvalidPos;
-- (void)deleteCharacter;
-- (void)enterPressed;
-- (NSString *)getPrecedingWord;
-- (NSDictionary *)getLinkProperties;
-- (void)setLinkProperties:(NSDictionary *)properties;
-- (void)setReferenceTarget:(NSString *)itemId;
-- (void)insertFootnote:(NSString *)content;
-- (void)insertEndnote:(NSString *)content;
-@end
-
-// Functions implemented in Equations.js
-
-@interface JSEquations : JSModule
-- (void)insertEquation;
-@end
-
-// Functions implemented in Figures.js
-
-@interface JSFigures : JSModule
-- (void)insertFigure:(NSString *)filename width:(NSString *)width
-            numbered:(BOOL)numbered caption:(NSString *)caption;
-- (NSString *)getSelectedFigureId;
-- (NSDictionary *)getProperties:(NSString *)itemId;
-- (void)setProperties:(NSString *)itemId width:(NSString *)width src:(NSString *)src;
-- (NSDictionary *)getGeometry:(NSString *)itemId;
-@end
-
-// Functions implemented in Formatting.js
-
-@interface JSFormatting : JSModule
-- (NSDictionary *)getFormatting;
-- (void)applyFormattingChangesStyle:(NSString *)style properties:(NSDictionary *)properties;
-@end
-
-// Functions implemented in Input.js
-
-@interface JSInput : JSModule
-- (void)removePosition:(int)posId;
-
-// UITextInput methods
-- (NSString *)textInRangeStartId:(int)startId startAdjust:(int)startAdjust
-                           endId:(int)endId endAdjust:(int)endAdjust;
-- (void)replaceRangeStart:(int)startId end:(int)endId withText:(NSString *)text;
-- (NSDictionary *)selectedTextRange;
-- (void)setSelectedTextRangeStart:(int)startId end:(int)endId;
-- (NSDictionary *)markedTextRange;
-- (void)setMarkedText:(NSString *)text startOffset:(int)startOffset endOffset:(int)endOffset;
-- (void)unmarkText;
-- (BOOL)forwardSelectionAffinity;
-- (void)setForwardSelectionAffinity:(BOOL)forwardSelectionAffinity;
-- (int)positionFromPosition:(int)posId offset:(int)offset;
-- (int)positionFromPosition:(int)posId inDirection:(NSString *)direction offset:(int)offset;
-- (int)comparePosition:(int)positionId toPosition:(int)otherId;
-- (int)offsetFromPosition:(int)fromPosition toPosition:(int)toPosition;
-- (int)positionWithinRangeStart:(int)startId end:(int)endId farthestInDirection:(NSString *)direction;
-- (NSDictionary *)characterRangeByExtendingPosition:(int)positionId inDirection:(NSString *)direction;
-- (NSDictionary *)firstRectForRangeStart:(int)startId end:(int)endId;
-- (NSDictionary *)caretRectForPosition:(int)posId;
-- (int)closestPositionToPointX:(int)x y:(int)y;
-- (int)closestPositionToPointX:(int)x y:(int)y withinRangeStart:(int)startId end:(int)endId;
-- (NSDictionary *)characterRangeAtPointX:(int)x y:(int)y;
-- (int)positionWithinRangeStart:(int)startId end:(int)endId atCharacterOffset:(int)offset;
-- (int)characterOffsetOfPosition:(int)positionId withinRangeStart:(int)startId end:(int)endId;
-
-// UITextInputTokenizer methods
-- (BOOL)isPosition:(int)posId atBoundary:(NSString *)granularity inDirection:(NSString *)direction;
-- (BOOL)isPosition:(int)posId withinTextUnit:(NSString *)granularity inDirection:(NSString *)direction;
-- (int)positionFromPosition:(int)posId toBoundary:(NSString *)granularity inDirection:(NSString *)direction;
-- (NSDictionary *)rangeEnclosingPosition:(int)posId withGranularity:(NSString *)granularity inDirection:(NSString *)direction;
-@end
-
-// Functions implemented in Lists.js
-
-@interface JSLists : JSModule
-- (void)increaseIndent;
-- (void)decreaseIndent;
-- (void)clearList;
-- (void)setUnorderedList;
-- (void)setOrderedList;
-@end
-
-// Functions implemented in Main.js
-
-@interface JSMain : JSModule
-- (NSString *)getLanguage;
-- (void)setLanguage:(NSString *)language;
-- (NSString *)setGenerator:(NSString *)generator;
-- (BOOL)prepareForSave;
-- (NSString *)getHTML;
-- (BOOL)isEmptyDocument;
-@end
-
-// Functions implemented in Metadata.js
-
-@interface JSMetadata : JSModule
-- (NSDictionary *)getMetadata;
-- (void)setMetadata:(NSDictionary *)metadata;
-@end
-
-// Functions implemented in Outline.js
-
-@interface JSOutline : JSModule
-- (NSDictionary *)getOutline;
-- (void)moveSection:(NSString *)sectionId parentId:(NSString *)parentId nextId:(NSString *)nextId;
-- (void)deleteItem:(NSString *)itemId;
-- (void)goToItem:(NSString *)itemId;
-- (void)scheduleUpdateStructure;
-- (void)set:(NSString *)itemId numbered:(BOOL)numbered;
-- (void)set:(NSString *)itemId title:(NSString *)title;
-- (void)insertTableOfContents;
-- (void)insertListOfFigures;
-- (void)insertListOfTables;
-- (void)setPrintMode:(BOOL)printMode;
-- (NSDictionary *)examinePrintLayout:(int)pageHeight;
-- (BOOL)detectSectionNumbering;
-- (NSDictionary *)findUsedStyles;
-@end
-
-// Functions implemented in Preview.js
-
-@interface JSPreview : JSModule
-- (void)showForStyle:(NSString *)styleId uiName:(NSString *)uiName title:(NSString *)title;
-@end
-
-// Functions implemented in Scan.js
-
-@interface JSScan : JSModule
-- (void)reset;
-- (EDScanParagraph *)next;
-- (int)addMatchStart:(int)start end:(int)end;
-- (void)showMatch:(int)matchId;
-- (void)replaceMatch:(int)matchId with:(NSString *)text;
-- (void)removeMatch:(int)matchId;
-- (void)goToMatch:(int)matchId;
-@end
-
-// Functions implemented in Selection.js
-
-@interface JSSelection : JSModule
-- (void)update;
-- (void)selectAll;
-- (void)selectParagraph;
-- (void)selectWordAtCursor;
-- (NSString *)dragSelectionBeginX:(int)x y:(int)y selectWord:(BOOL)selectWord;
-- (NSString *)dragSelectionUpdateX:(int)x y:(int)y selectWord:(BOOL)selectWord;
-- (NSString *)moveStartLeft;
-- (NSString *)moveStartRight;
-- (NSString *)moveEndLeft;
-- (NSString *)moveEndRight;
-- (void)setSelectionStartAtCoordsX:(int)x y:(int)y;
-- (void)setSelectionEndAtCoordsX:(int)x y:(int)y;
-- (void)setTableSelectionEdge:(NSString *)edge atCoordsX:(int)x y:(int)y;
-- (void)print;
-@end
-
-// Functions implemented in Styles.js
-
-@interface JSStyles : JSModule
-- (NSString *)getCSSText;
-- (void)setCSSText:(NSString *)cssText rules:(NSDictionary *)rules;
-- (NSString *)paragraphClass;
-- (void)setParagraphClass:(NSString *)paragraphClass;
-@end
-
-// Functions implemented in Tables.js
-
-@interface JSTables : JSModule
-- (void)insertTableRows:(int)rows cols:(int)cols width:(NSString *)width numbered:(BOOL)numbered
-                caption:(NSString *)caption className:(NSString *)className;
-- (void)addAdjacentRow;
-- (void)addAdjacentColumn;
-- (void)removeAdjacentRow;
-- (void)removeAdjacentColumn;
-- (void)clearCells;
-- (void)mergeCells;
-- (void)splitSelection;
-- (NSString *)getSelectedTableId;
-- (NSDictionary *)getProperties:(NSString *)itemId;
-- (void)setProperties:(NSString *)itemId width:(NSString *)width;
-- (void)set:(NSString *)itemId colWidths:(NSArray *)colWidths;
-- (NSDictionary *)getGeometry:(NSString *)itemId;
-@end
-
-// Functions implemented in UndoManager.js
-
-@interface JSUndoManager : JSModule
-- (int)getLength;
-- (int)getIndex;
-- (void)setIndex:(int)index;
-- (void)undo;
-- (void)redo;
-- (void)newGroup:(NSString *)name;
-- (NSString *)groupType;
-@end
-
-// Functions implemented in Viewport.js
-
-@interface JSViewport : JSModule
-- (void)setViewportWidth:(int)width;
-- (void)setTextScale:(int)textScale;
-@end