corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject incubator-corinthia git commit: Tables: Make row/column removal work at edges
Date Thu, 05 Mar 2015 14:20:56 GMT
Repository: incubator-corinthia
Updated Branches:
  refs/heads/master 7ae2a3357 -> aa2436c2d


Tables: Make row/column removal work at edges


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/aa2436c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/aa2436c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/aa2436c2

Branch: refs/heads/master
Commit: aa2436c2dddc4708c3c00b6536b12de87d8249f4
Parents: 7ae2a33
Author: Peter Kelly <peter@uxproductivity.com>
Authored: Thu Mar 5 21:20:31 2015 +0700
Committer: Peter Kelly <peter@uxproductivity.com>
Committed: Thu Mar 5 21:20:31 2015 +0700

----------------------------------------------------------------------
 Editor/src/Tables.js                            | 66 ++++++++++++++++++--
 Editor/tests/index.js                           |  8 +++
 .../tables/removeAdjacentColumn08-expected.html | 42 +++++++++++++
 .../tables/removeAdjacentColumn08-input.html    | 50 +++++++++++++++
 .../tables/removeAdjacentColumn09-expected.html | 42 +++++++++++++
 .../tables/removeAdjacentColumn09-input.html    | 50 +++++++++++++++
 .../tables/removeAdjacentColumn10-expected.html | 17 +++++
 .../tables/removeAdjacentColumn10-input.html    | 30 +++++++++
 .../tables/removeAdjacentColumn11-expected.html | 17 +++++
 .../tables/removeAdjacentColumn11-input.html    | 30 +++++++++
 .../tables/removeAdjacentRow08-expected.html    | 42 +++++++++++++
 .../tests/tables/removeAdjacentRow08-input.html | 51 +++++++++++++++
 .../tables/removeAdjacentRow09-expected.html    | 42 +++++++++++++
 .../tests/tables/removeAdjacentRow09-input.html | 51 +++++++++++++++
 .../tables/removeAdjacentRow10-expected.html    | 24 +++++++
 .../tests/tables/removeAdjacentRow10-input.html | 28 +++++++++
 .../tables/removeAdjacentRow11-expected.html    | 24 +++++++
 .../tests/tables/removeAdjacentRow11-input.html | 28 +++++++++
 18 files changed, 638 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/src/Tables.js
----------------------------------------------------------------------
diff --git a/Editor/src/Tables.js b/Editor/src/Tables.js
index 4c46bb9..f1f27be 100644
--- a/Editor/src/Tables.js
+++ b/Editor/src/Tables.js
@@ -622,10 +622,39 @@ var TableRegion_splitCells;
         return row;
     }
 
+    function removeRowAdjacentToRange(range)
+    {
+        var table;
+
+        table = tableAtLeftOfRange(range);
+        if ((table != null) && (table.numRows >= 2)) {
+            UndoManager_newGroup("Delete one row");
+            var row = table.numRows-1;
+            Tables_deleteRegion(new TableRegion(table,row,row,0,table.numCols-1));
+            UndoManager_newGroup();
+            return;
+        }
+
+        table = tableAtRightOfRange(range);
+        if ((table != null) && (table.numRows >= 2)) {
+            UndoManager_newGroup("Delete one row");
+            Tables_deleteRegion(new TableRegion(table,0,0,0,table.numCols-1));
+            UndoManager_newGroup();
+            return;
+        }
+    }
+
     Tables_removeAdjacentRow = function()
     {
-        var region = Tables_regionFromRange(Selection_get(),true);
-        if ((region == null) || (region.structure.numRows <= 1))
+        var range = Selection_get();
+        var region = Tables_regionFromRange(range,true);
+
+        if (region == null) {
+            removeRowAdjacentToRange(range);
+            return;
+        }
+
+        if (region.structure.numRows <= 1)
             return;
 
         UndoManager_newGroup("Delete one row");
@@ -678,10 +707,39 @@ var TableRegion_splitCells;
         UndoManager_newGroup();
     }
 
+    function removeColumnAdjacentToRange(range)
+    {
+        var table;
+
+        table = tableAtLeftOfRange(range);
+        if ((table != null) && (table.numCols >= 2)) {
+            UndoManager_newGroup("Delete one column");
+            var col = table.numCols-1;
+            Tables_deleteRegion(new TableRegion(table,0,table.numRows-1,col,col));
+            UndoManager_newGroup();
+            return;
+        }
+
+        table = tableAtRightOfRange(range);
+        if ((table != null) && (table.numCols >= 2)) {
+            UndoManager_newGroup("Delete one column");
+            Tables_deleteRegion(new TableRegion(table,0,table.numRows-1,0,0));
+            UndoManager_newGroup();
+            return;
+        }
+    }
+
     Tables_removeAdjacentColumn = function()
     {
-        var region = Tables_regionFromRange(Selection_get(),true);
-        if ((region == null) || (region.structure.numCols <= 1))
+        var range = Selection_get();
+        var region = Tables_regionFromRange(range,true);
+
+        if (region == null) {
+            removeColumnAdjacentToRange(range);
+            return;
+        }
+
+        if (region.structure.numCols <= 1)
             return;
 
         UndoManager_newGroup("Delete one column");

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/index.js
----------------------------------------------------------------------
diff --git a/Editor/tests/index.js b/Editor/tests/index.js
index 9253a61..485397b 100644
--- a/Editor/tests/index.js
+++ b/Editor/tests/index.js
@@ -2267,6 +2267,10 @@ var tests = [
             "removeAdjacentColumn06inside",
             "removeAdjacentColumn06left",
             "removeAdjacentColumn07",
+            "removeAdjacentColumn08",
+            "removeAdjacentColumn09",
+            "removeAdjacentColumn10",
+            "removeAdjacentColumn11",
             "removeAdjacentRow01below",
             "removeAdjacentRow01inside",
             "removeAdjacentRow02above",
@@ -2282,6 +2286,10 @@ var tests = [
             "removeAdjacentRow06above",
             "removeAdjacentRow06inside",
             "removeAdjacentRow07",
+            "removeAdjacentRow08",
+            "removeAdjacentRow09",
+            "removeAdjacentRow10",
+            "removeAdjacentRow11",
             "setColWidths01",
             "setColWidths02",
             "split00a",

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn08-expected.html b/Editor/tests/tables/removeAdjacentColumn08-expected.html
new file mode 100644
index 0000000..2810099
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn08-expected.html
@@ -0,0 +1,42 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    []
+    <table style="width: 100%">
+      <colgroup>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p>0,1</p></td>
+          <td><p>0,2</p></td>
+          <td><p>0,3</p></td>
+          <td><p>0,4</p></td>
+        </tr>
+        <tr>
+          <td><p>1,1</p></td>
+          <td><p>1,2</p></td>
+          <td><p>1,3</p></td>
+          <td><p>1,4</p></td>
+        </tr>
+        <tr>
+          <td><p>2,1</p></td>
+          <td><p>2,2</p></td>
+          <td><p>2,3</p></td>
+          <td><p>2,4</p></td>
+        </tr>
+        <tr>
+          <td><p>3,1</p></td>
+          <td><p>3,2</p></td>
+          <td><p>3,3</p></td>
+          <td><p>3,4</p></td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn08-input.html b/Editor/tests/tables/removeAdjacentColumn08-input.html
new file mode 100644
index 0000000..df864bf
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn08-input.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Tables_removeAdjacentColumn();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  []<table style="width: 100%">
+    <col width="20%">
+    <col width="20%">
+    <col width="20%">
+    <col width="20%">
+    <col width="20%">
+    <tr>
+      <td><p>0,0</p></td>
+      <td><p>0,1</p></td>
+      <td><p>0,2</p></td>
+      <td><p>0,3</p></td>
+      <td><p>0,4</p></td>
+    </tr>
+    <tr>
+      <td><p>1,0</p></td>
+      <td><p>1,1</p></td>
+      <td><p>1,2</p></td>
+      <td><p>1,3</p></td>
+      <td><p>1,4</p></td>
+    </tr>
+    <tr>
+      <td><p>2,0</p></td>
+      <td><p>2,1</p></td>
+      <td><p>2,2</p></td>
+      <td><p>2,3</p></td>
+      <td><p>2,4</p></td>
+    </tr>
+    <tr>
+      <td><p>3,0</p></td>
+      <td><p>3,1</p></td>
+      <td><p>3,2</p></td>
+      <td><p>3,3</p></td>
+      <td><p>3,4</p></td>
+    </tr>
+  </table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn09-expected.html b/Editor/tests/tables/removeAdjacentColumn09-expected.html
new file mode 100644
index 0000000..087bce4
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn09-expected.html
@@ -0,0 +1,42 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <table style="width: 100%">
+      <colgroup>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p>0,0</p></td>
+          <td><p>0,1</p></td>
+          <td><p>0,2</p></td>
+          <td><p>0,3</p></td>
+        </tr>
+        <tr>
+          <td><p>1,0</p></td>
+          <td><p>1,1</p></td>
+          <td><p>1,2</p></td>
+          <td><p>1,3</p></td>
+        </tr>
+        <tr>
+          <td><p>2,0</p></td>
+          <td><p>2,1</p></td>
+          <td><p>2,2</p></td>
+          <td><p>2,3</p></td>
+        </tr>
+        <tr>
+          <td><p>3,0</p></td>
+          <td><p>3,1</p></td>
+          <td><p>3,2</p></td>
+          <td><p>3,3</p></td>
+        </tr>
+      </tbody>
+    </table>
+    []
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn09-input.html b/Editor/tests/tables/removeAdjacentColumn09-input.html
new file mode 100644
index 0000000..f877401
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn09-input.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Tables_removeAdjacentColumn();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  <table style="width: 100%">
+    <col width="20%">
+    <col width="20%">
+    <col width="20%">
+    <col width="20%">
+    <col width="20%">
+    <tr>
+      <td><p>0,0</p></td>
+      <td><p>0,1</p></td>
+      <td><p>0,2</p></td>
+      <td><p>0,3</p></td>
+      <td><p>0,4</p></td>
+    </tr>
+    <tr>
+      <td><p>1,0</p></td>
+      <td><p>1,1</p></td>
+      <td><p>1,2</p></td>
+      <td><p>1,3</p></td>
+      <td><p>1,4</p></td>
+    </tr>
+    <tr>
+      <td><p>2,0</p></td>
+      <td><p>2,1</p></td>
+      <td><p>2,2</p></td>
+      <td><p>2,3</p></td>
+      <td><p>2,4</p></td>
+    </tr>
+    <tr>
+      <td><p>3,0</p></td>
+      <td><p>3,1</p></td>
+      <td><p>3,2</p></td>
+      <td><p>3,3</p></td>
+      <td><p>3,4</p></td>
+    </tr>
+  </table>[]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn10-expected.html b/Editor/tests/tables/removeAdjacentColumn10-expected.html
new file mode 100644
index 0000000..5d21b0a
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn10-expected.html
@@ -0,0 +1,17 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    []
+    <table style="width: 100%">
+      <colgroup><col width="100%"/></colgroup>
+      <tbody>
+        <tr><td><p>0,0</p></td></tr>
+        <tr><td><p>1,0</p></td></tr>
+        <tr><td><p>2,0</p></td></tr>
+        <tr><td><p>3,0</p></td></tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn10-input.html b/Editor/tests/tables/removeAdjacentColumn10-input.html
new file mode 100644
index 0000000..011384e
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn10-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+//    Tables_removeAdjacentColumn();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  []<table style="width: 100%">
+    <col width="100%">
+    <tr>
+      <td><p>0,0</p></td>
+    </tr>
+    <tr>
+      <td><p>1,0</p></td>
+    </tr>
+    <tr>
+      <td><p>2,0</p></td>
+    </tr>
+    <tr>
+      <td><p>3,0</p></td>
+    </tr>
+  </table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn11-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn11-expected.html b/Editor/tests/tables/removeAdjacentColumn11-expected.html
new file mode 100644
index 0000000..1674a0f
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn11-expected.html
@@ -0,0 +1,17 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <table style="width: 100%">
+      <colgroup><col width="100%"/></colgroup>
+      <tbody>
+        <tr><td><p>0,0</p></td></tr>
+        <tr><td><p>1,0</p></td></tr>
+        <tr><td><p>2,0</p></td></tr>
+        <tr><td><p>3,0</p></td></tr>
+      </tbody>
+    </table>
+    []
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentColumn11-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentColumn11-input.html b/Editor/tests/tables/removeAdjacentColumn11-input.html
new file mode 100644
index 0000000..3061811
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentColumn11-input.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Tables_removeAdjacentColumn();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  <table style="width: 100%">
+    <col width="100%">
+    <tr>
+      <td><p>0,0</p></td>
+    </tr>
+    <tr>
+      <td><p>1,0</p></td>
+    </tr>
+    <tr>
+      <td><p>2,0</p></td>
+    </tr>
+    <tr>
+      <td><p>3,0</p></td>
+    </tr>
+  </table>[]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow08-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow08-expected.html b/Editor/tests/tables/removeAdjacentRow08-expected.html
new file mode 100644
index 0000000..54d8c53
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow08-expected.html
@@ -0,0 +1,42 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    []
+    <table style="width: 100%">
+      <colgroup>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p>1,0</p></td>
+          <td><p>1,1</p></td>
+          <td><p>1,2</p></td>
+          <td><p>1,3</p></td>
+        </tr>
+        <tr>
+          <td><p>2,0</p></td>
+          <td><p>2,1</p></td>
+          <td><p>2,2</p></td>
+          <td><p>2,3</p></td>
+        </tr>
+        <tr>
+          <td><p>3,0</p></td>
+          <td><p>3,1</p></td>
+          <td><p>3,2</p></td>
+          <td><p>3,3</p></td>
+        </tr>
+        <tr>
+          <td><p>4,0</p></td>
+          <td><p>4,1</p></td>
+          <td><p>4,2</p></td>
+          <td><p>4,3</p></td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow08-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow08-input.html b/Editor/tests/tables/removeAdjacentRow08-input.html
new file mode 100644
index 0000000..1d35691
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow08-input.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Tables_removeAdjacentRow();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  []<table style="width: 100%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <tr>
+      <td><p>0,0</p></td>
+      <td><p>0,1</p></td>
+      <td><p>0,2</p></td>
+      <td><p>0,3</p></td>
+    </tr>
+    <tr>
+      <td><p>1,0</p></td>
+      <td><p>1,1</p></td>
+      <td><p>1,2</p></td>
+      <td><p>1,3</p></td>
+    </tr>
+    <tr>
+      <td><p>2,0</p></td>
+      <td><p>2,1</p></td>
+      <td><p>2,2</p></td>
+      <td><p>2,3</p></td>
+    </tr>
+    <tr>
+      <td><p>3,0</p></td>
+      <td><p>3,1</p></td>
+      <td><p>3,2</p></td>
+      <td><p>3,3</p></td>
+    </tr>
+    <tr>
+      <td><p>4,0</p></td>
+      <td><p>4,1</p></td>
+      <td><p>4,2</p></td>
+      <td><p>4,3</p></td>
+    </tr>
+  </table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow09-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow09-expected.html b/Editor/tests/tables/removeAdjacentRow09-expected.html
new file mode 100644
index 0000000..087bce4
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow09-expected.html
@@ -0,0 +1,42 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <table style="width: 100%">
+      <colgroup>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p>0,0</p></td>
+          <td><p>0,1</p></td>
+          <td><p>0,2</p></td>
+          <td><p>0,3</p></td>
+        </tr>
+        <tr>
+          <td><p>1,0</p></td>
+          <td><p>1,1</p></td>
+          <td><p>1,2</p></td>
+          <td><p>1,3</p></td>
+        </tr>
+        <tr>
+          <td><p>2,0</p></td>
+          <td><p>2,1</p></td>
+          <td><p>2,2</p></td>
+          <td><p>2,3</p></td>
+        </tr>
+        <tr>
+          <td><p>3,0</p></td>
+          <td><p>3,1</p></td>
+          <td><p>3,2</p></td>
+          <td><p>3,3</p></td>
+        </tr>
+      </tbody>
+    </table>
+    []
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow09-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow09-input.html b/Editor/tests/tables/removeAdjacentRow09-input.html
new file mode 100644
index 0000000..69f7752
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow09-input.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Tables_removeAdjacentRow();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  <table style="width: 100%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <tr>
+      <td><p>0,0</p></td>
+      <td><p>0,1</p></td>
+      <td><p>0,2</p></td>
+      <td><p>0,3</p></td>
+    </tr>
+    <tr>
+      <td><p>1,0</p></td>
+      <td><p>1,1</p></td>
+      <td><p>1,2</p></td>
+      <td><p>1,3</p></td>
+    </tr>
+    <tr>
+      <td><p>2,0</p></td>
+      <td><p>2,1</p></td>
+      <td><p>2,2</p></td>
+      <td><p>2,3</p></td>
+    </tr>
+    <tr>
+      <td><p>3,0</p></td>
+      <td><p>3,1</p></td>
+      <td><p>3,2</p></td>
+      <td><p>3,3</p></td>
+    </tr>
+    <tr>
+      <td><p>4,0</p></td>
+      <td><p>4,1</p></td>
+      <td><p>4,2</p></td>
+      <td><p>4,3</p></td>
+    </tr>
+  </table>[]
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow10-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow10-expected.html b/Editor/tests/tables/removeAdjacentRow10-expected.html
new file mode 100644
index 0000000..ac57961
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow10-expected.html
@@ -0,0 +1,24 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    []
+    <table style="width: 100%">
+      <colgroup>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p>0,0</p></td>
+          <td><p>0,1</p></td>
+          <td><p>0,2</p></td>
+          <td><p>0,3</p></td>
+        </tr>
+      </tbody>
+    </table>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow10-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow10-input.html b/Editor/tests/tables/removeAdjacentRow10-input.html
new file mode 100644
index 0000000..1a91121
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow10-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Tables_removeAdjacentRow();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  []
+  <table style="width: 100%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <tr>
+      <td><p>0,0</p></td>
+      <td><p>0,1</p></td>
+      <td><p>0,2</p></td>
+      <td><p>0,3</p></td>
+    </tr>
+  </table>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow11-expected.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow11-expected.html b/Editor/tests/tables/removeAdjacentRow11-expected.html
new file mode 100644
index 0000000..cb021f8
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow11-expected.html
@@ -0,0 +1,24 @@
+<html>
+  <head>
+    <link href="../generic.css" rel="stylesheet"/>
+  </head>
+  <body>
+    <table style="width: 100%">
+      <colgroup>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+        <col width="25%"/>
+      </colgroup>
+      <tbody>
+        <tr>
+          <td><p>0,0</p></td>
+          <td><p>0,1</p></td>
+          <td><p>0,2</p></td>
+          <td><p>0,3</p></td>
+        </tr>
+      </tbody>
+    </table>
+    []
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/aa2436c2/Editor/tests/tables/removeAdjacentRow11-input.html
----------------------------------------------------------------------
diff --git a/Editor/tests/tables/removeAdjacentRow11-input.html b/Editor/tests/tables/removeAdjacentRow11-input.html
new file mode 100644
index 0000000..75e4f26
--- /dev/null
+++ b/Editor/tests/tables/removeAdjacentRow11-input.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link href="../generic.css" rel="stylesheet"/>
+<script>
+function performTest()
+{
+    Tables_removeAdjacentRow();
+    showSelection();
+}
+</script>
+</head>
+<body>
+  <table style="width: 100%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <col width="25%">
+    <tr>
+      <td><p>0,0</p></td>
+      <td><p>0,1</p></td>
+      <td><p>0,2</p></td>
+      <td><p>0,3</p></td>
+    </tr>
+  </table>
+  []
+</body>
+</html>


Mime
View raw message