[Libreoffice-commits] ooxml-strict/calc
Muthu Subramanian
sumuthu at kemper.freedesktop.org
Tue Dec 14 04:02:58 PST 2010
ooxml-strict/calc/bookviews.py | 39 ++++++++
ooxml-strict/calc/breaks.py | 31 ++++++
ooxml-strict/calc/calcpr.py | 39 ++++++++
ooxml-strict/calc/col.py | 36 +++++++
ooxml-strict/calc/commentpr.py | 35 +++++++
ooxml-strict/calc/comments.py | 28 ++++++
ooxml-strict/calc/datavalidation.py | 35 +++++++
ooxml-strict/calc/definednames.py | 41 ++++++++
ooxml-strict/calc/dumpsample.py | 74 ++++++++++++++++
ooxml-strict/calc/inputcells.py | 31 ++++++
ooxml-strict/calc/pagesetup.py | 37 ++++++++
ooxml-strict/calc/pagesetuppr.py | 27 +++++
ooxml-strict/calc/printoptions.py | 31 ++++++
ooxml-strict/calc/scenario.py | 32 ++++++
ooxml-strict/calc/selection.py | 30 ++++++
ooxml-strict/calc/sheetpr.py | 34 +++++++
ooxml-strict/calc/sheetview.py | 42 +++++++++
ooxml-strict/calc/templates/autofilter.xlsx |binary
ooxml-strict/calc/templates/bookviews.xlsx |binary
ooxml-strict/calc/templates/breaks.xlsx |binary
ooxml-strict/calc/templates/calcpr.xlsx |binary
ooxml-strict/calc/templates/col.xlsx |binary
ooxml-strict/calc/templates/commentpr.xlsx |binary
ooxml-strict/calc/templates/comments.xlsx |binary
ooxml-strict/calc/templates/datavalidation.xlsx |binary
ooxml-strict/calc/templates/definednames.xlsx |binary
ooxml-strict/calc/templates/fileversion.xlsx |binary
ooxml-strict/calc/templates/headerfooter.xlsx |binary
ooxml-strict/calc/templates/headerfooter2.xlsx |binary
ooxml-strict/calc/templates/headerfooter3.xlsx |binary
ooxml-strict/calc/templates/hyperlinks.xlsx |binary
ooxml-strict/calc/templates/inputcells.xlsx |binary
ooxml-strict/calc/templates/page-setup-a4.xlsx |binary
ooxml-strict/calc/templates/page-setup-custom-size.xlsx |binary
ooxml-strict/calc/templates/pagesetuppr.xlsx |binary
ooxml-strict/calc/templates/printoptions.xlsx |binary
ooxml-strict/calc/templates/scenario.xlsx |binary
ooxml-strict/calc/templates/selection.xlsx |binary
ooxml-strict/calc/templates/sheetpr.xlsx |binary
ooxml-strict/calc/templates/sheetview.xlsx |binary
ooxml-strict/calc/templates/workbookpr.xlsx |binary
ooxml-strict/calc/workbookpr.py | 44 +++++++++
42 files changed, 666 insertions(+)
New commits:
commit 745cb721778eb8cda1a5a1576591df13c44ec29a
Author: Muthu Subramanian <sumuthu at novell.com>
Date: Tue Dec 14 17:34:06 2010 +0530
Adding xlsx test templates and scripts.
diff --git a/ooxml-strict/calc/bookviews.py b/ooxml-strict/calc/bookviews.py
new file mode 100644
index 0000000..36f9df6
--- /dev/null
+++ b/ooxml-strict/calc/bookviews.py
@@ -0,0 +1,39 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*activeTab.*')],
+# lambda i: [re.compile('.*CT_BookView'), re.compile('.*autoFilterDateGrouping.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*firstSheet.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*minimized.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*showHorizontalScroll.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*showSheetTabs.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*showVerticalScroll.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*tabRatio.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*visibility.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*windowWidth.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*windowHeight.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*xWindow.*')],
+ lambda i: [re.compile('.*CT_BookView'), re.compile('.*yWindow.*')]
+ ]
diff --git a/ooxml-strict/calc/breaks.py b/ooxml-strict/calc/breaks.py
new file mode 100644
index 0000000..d6415a3
--- /dev/null
+++ b/ooxml-strict/calc/breaks.py
@@ -0,0 +1,31 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+# lambda i: [re.compile('.*CT_Break'), re.compile('.*id.*')],
+# lambda i: [re.compile('.*CT_Break'), re.compile('.*min.*')],
+# lambda i: [re.compile('.*CT_Break'), re.compile('.*max.*')],
+ lambda i: [re.compile('.*CT_Break'), re.compile('.*man.*')],
+ lambda i: [re.compile('.*CT_Break'), re.compile('.*pt.*')],
+ ]
diff --git a/ooxml-strict/calc/calcpr.py b/ooxml-strict/calc/calcpr.py
new file mode 100644
index 0000000..145688f
--- /dev/null
+++ b/ooxml-strict/calc/calcpr.py
@@ -0,0 +1,39 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*calcCompleted.*')],
+# lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*calcId.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*calcMode.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*calcOnSave.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*concurrentCalc.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*concurrentManualCount.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*forceFullCalc.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*fullCalcOnLoad.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*fullPrecision.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*iterate.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*iterateCount.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*iterateDelta.*')],
+ lambda i: [re.compile('.*CT_CalcPr'), re.compile('.*refMode.*')]
+ ]
diff --git a/ooxml-strict/calc/col.py b/ooxml-strict/calc/col.py
new file mode 100644
index 0000000..4b5b042
--- /dev/null
+++ b/ooxml-strict/calc/col.py
@@ -0,0 +1,36 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+# lambda i: [re.compile('.*CT_Cols'), re.compile('.*min.*')],
+# lambda i: [re.compile('.*CT_Col'), re.compile('.*max.*')],
+# lambda i: [re.compile('.*CT_Col'), re.compile('.*width.*')],
+# lambda i: [re.compile('.*CT_Col'), re.compile('.*style.*')],
+ lambda i: [re.compile('.*CT_Col'), re.compile('.*hidden.*')],
+ lambda i: [re.compile('.*CT_Col'), re.compile('.*bestFit.*')],
+ lambda i: [re.compile('.*CT_Col'), re.compile('.*customWidth.*')],
+ lambda i: [re.compile('.*CT_Col'), re.compile('.*phonetic.*')],
+# lambda i: [re.compile('.*CT_Col'), re.compile('.*outlineLevel.*')],
+ lambda i: [re.compile('.*CT_Col'), re.compile('.*collapsed.*')],
+ ]
diff --git a/ooxml-strict/calc/commentpr.py b/ooxml-strict/calc/commentpr.py
new file mode 100644
index 0000000..59ded83
--- /dev/null
+++ b/ooxml-strict/calc/commentpr.py
@@ -0,0 +1,35 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_CommentPr'), re.compile('.*autoFill.*')],
+ lambda i: [re.compile('.*CT_CommentPr'), re.compile('.*autoScale.*')],
+ lambda i: [re.compile('.*CT_CommentPr'), re.compile('.*colHidden.*')],
+ lambda i: [re.compile('.*CT_CommentPr'), re.compile('.*locked.*')],
+ lambda i: [re.compile('.*CT_CommentPr'), re.compile('.*rowHidden.*')],
+ lambda i: [re.compile('.*CT_CommentPr'), re.compile('.*textHAlign.*')],
+ lambda i: [re.compile('.*CT_CommentPr'), re.compile('.*textVAlign.*')],
+# lambda i: [re.compile('.*CT_ObjectAnchor'), re.compile('.*sizeWithCells.*')],
+# lambda i: [re.compile('.*CT_ObjectAnchor'), re.compile('.*moveWithCells.*')],
+ ]
diff --git a/ooxml-strict/calc/comments.py b/ooxml-strict/calc/comments.py
new file mode 100644
index 0000000..ce93e9a
--- /dev/null
+++ b/ooxml-strict/calc/comments.py
@@ -0,0 +1,28 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_Comment'), re.compile('.*ref.*')],
+ lambda i: [re.compile('.*CT_Comment'), re.compile('.*shapeId.*')],
+ ]
diff --git a/ooxml-strict/calc/datavalidation.py b/ooxml-strict/calc/datavalidation.py
new file mode 100644
index 0000000..ff4f246
--- /dev/null
+++ b/ooxml-strict/calc/datavalidation.py
@@ -0,0 +1,35 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+# lambda i: [re.compile('.*CT_DataValidations'), re.compile('.*disablePrompts.*')],
+ lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*allowBlank.*')],
+ lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*operator.*')],
+ lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*published.*')],
+ lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*showDropDown.*')],
+ lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*showErrorMessage.*')],
+ lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*showInputMessage.*')],
+# lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*type.*')],
+# lambda i: [re.compile('.*CT_DataValidation'), re.compile('.*sqref.*')],
+ ]
diff --git a/ooxml-strict/calc/definednames.py b/ooxml-strict/calc/definednames.py
new file mode 100644
index 0000000..f123aa9
--- /dev/null
+++ b/ooxml-strict/calc/definednames.py
@@ -0,0 +1,41 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*comment.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*customMenu.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*description.*')],
+ lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*function.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*functionGroupId.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*help.*')],
+ lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*hidden.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*localSheetId.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*name.*')],
+ lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*publishToServer.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*shortcutKey.*')],
+# lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*statusBar.*')],
+ lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*vbProcedure.*')],
+ lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*workbookParameter.*')],
+ lambda i: [re.compile('.*CT_DefinedName'), re.compile('.*xlm.*')],
+ ]
diff --git a/ooxml-strict/calc/dumpsample.py b/ooxml-strict/calc/dumpsample.py
new file mode 100644
index 0000000..aad67dd
--- /dev/null
+++ b/ooxml-strict/calc/dumpsample.py
@@ -0,0 +1,74 @@
+# Copyright 2010, Thorsten Behrens, Novell Inc.
+# Modified by Muthu Subramanian
+#
+# 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.
+
+import sys, os, StringIO
+
+import pyxb.binding.saxer
+
+import opc
+import dml.dml, pml.pml, props.props, sml.sml, wml.wml
+
+def outputxml (package, xml, outDir, iteration, inFileName, inFileExt):
+ currOutFile = outDir+"/"+inFileName+str(iteration)+inFileExt
+ package.copyWithReplace(currOutFile, xml)
+ print "Written "+currOutFile
+
+
+if len(sys.argv) < 3:
+ print "Usage: dumpsample.py <worklist.py> <input_file> <output_dir>"
+ sys.exit(1)
+else:
+ exec "import "+sys.argv[1]+" as worklist"
+ inFile = sys.argv[2]
+ (inFileName,inFileExt) = os.path.splitext(os.path.basename(inFile))
+ outDir = sys.argv[3]
+
+ package = opc.OPCPackage(inFile)
+ iteration=1
+
+ for index in range (0, len(worklist.worklist)):
+ for (fragment, mimetype, schema, reltype) in package.files(worklist.mimetypes):
+ #if fragment != "xl/workbook.xml":
+ if fragment != "xl/worksheets/sheet1.xml" and \
+ fragment != "xl/workbook.xml" and \
+ fragment != "xl/comments1.xml":
+ print "Ignorning: "+fragment
+ continue
+ saxer = pyxb.binding.saxer.make_parser(location_base=fragment)
+ handler = saxer.getContentHandler()
+ saxer.parse(StringIO.StringIO(package.read(fragment)))
+ sax_instance = handler.rootObject()
+
+ for contentIter in sax_instance.iterateBinding(worklist.worklist[index](mimetype)):
+ # iterate content n times
+ for i in range(worklist.iterations(mimetype)):
+ contentIter()
+ if index == len(worklist.worklist)-1:
+ outputxml(package, {fragment: sax_instance.toxml().encode('utf-8')}, outDir, iteration, inFileName, inFileExt)
+ iteration += 1
+ else:
+ saxer2 = pyxb.binding.saxer.make_parser(location_base=fragment)
+ handler2 = saxer2.getContentHandler()
+ saxer2.parse(StringIO.StringIO(sax_instance.toxml().encode('utf-8')))
+ for j in range(index+1, len(worklist.worklist)):
+ # print package.read(fragment)
+ # print sax_instance.toxml()
+ sax_instance2 = handler2.rootObject()
+ for contentIter2 in sax_instance2.iterateBinding(worklist.worklist[j](mimetype)):
+ for i2 in range(worklist.iterations(mimetype)):
+ contentIter2()
+ outputxml(package, {fragment: sax_instance2.toxml().encode('utf-8')}, outDir, iteration, inFileName, inFileExt)
+ iteration += 1
+ saxer2.parse(StringIO.StringIO(sax_instance2.toxml().encode('utf-8')))
diff --git a/ooxml-strict/calc/inputcells.py b/ooxml-strict/calc/inputcells.py
new file mode 100644
index 0000000..a763d06
--- /dev/null
+++ b/ooxml-strict/calc/inputcells.py
@@ -0,0 +1,31 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+# lambda i: [re.compile('.*CT_InputCells'), re.compile('.*numFmtId.*')],
+ lambda i: [re.compile('.*CT_InputCells'), re.compile('.*deleted.*')],
+ lambda i: [re.compile('.*CT_InputCells'), re.compile('.*undone.*')],
+# lambda i: [re.compile('.*CT_InputCells'), re.compile('.*r.*')],
+# lambda i: [re.compile('.*CT_InputCells'), re.compile('.*val.*')],
+ ]
diff --git a/ooxml-strict/calc/pagesetup.py b/ooxml-strict/calc/pagesetup.py
new file mode 100644
index 0000000..0d2314c
--- /dev/null
+++ b/ooxml-strict/calc/pagesetup.py
@@ -0,0 +1,37 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*paperHeight.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*paperWidth.*')],
+# lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*paperUnits.*')],
+# lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*paperSize.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*orientation.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*firstPageNumber.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*fitToWidth.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*fitToHeight.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*blackAndWhite.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*draft.*')],
+ lambda i: [re.compile('.*CT_PageSetup'), re.compile('.*useFirstPageNumber.*')],
+ ]
diff --git a/ooxml-strict/calc/pagesetuppr.py b/ooxml-strict/calc/pagesetuppr.py
new file mode 100644
index 0000000..50e6189
--- /dev/null
+++ b/ooxml-strict/calc/pagesetuppr.py
@@ -0,0 +1,27 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [ lambda i: [re.compile('.*CT_PageSetUpPr'), re.compile('.*fit.*')],
+ lambda i: [re.compile('.*CT_PageSetUpPr'), re.compile('.*autoPageBreaks.*')]
+ ]
diff --git a/ooxml-strict/calc/printoptions.py b/ooxml-strict/calc/printoptions.py
new file mode 100644
index 0000000..937c5cf
--- /dev/null
+++ b/ooxml-strict/calc/printoptions.py
@@ -0,0 +1,31 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_PrintOptions'), re.compile('.*gridLines.*')],
+ lambda i: [re.compile('.*CT_PrintOptions'), re.compile('.*gridLinesSet.*')],
+ lambda i: [re.compile('.*CT_PrintOptions'), re.compile('.*headings.*')],
+ lambda i: [re.compile('.*CT_PrintOptions'), re.compile('.*horizontalCentered.*')],
+ lambda i: [re.compile('.*CT_PrintOptions'), re.compile('.*verticalCentered.*')],
+ ]
diff --git a/ooxml-strict/calc/scenario.py b/ooxml-strict/calc/scenario.py
new file mode 100644
index 0000000..0fbd8e4
--- /dev/null
+++ b/ooxml-strict/calc/scenario.py
@@ -0,0 +1,32 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+# lambda i: [re.compile('.*CT_Scenario'), re.compile('.*name.*')],
+ lambda i: [re.compile('.*CT_Scenario'), re.compile('.*locked.*')],
+ lambda i: [re.compile('.*CT_Scenario'), re.compile('.*hidden.*')],
+# lambda i: [re.compile('.*CT_Scenario'), re.compile('.*count.*')],
+# lambda i: [re.compile('.*CT_Scenario'), re.compile('.*user.*')],
+# lambda i: [re.compile('.*CT_Scenario'), re.compile('.*comment.*')],
+ ]
diff --git a/ooxml-strict/calc/selection.py b/ooxml-strict/calc/selection.py
new file mode 100644
index 0000000..110789b
--- /dev/null
+++ b/ooxml-strict/calc/selection.py
@@ -0,0 +1,30 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_Selection'), re.compile('.*activeCell.*')],
+ lambda i: [re.compile('.*CT_Selection'), re.compile('.*activeCellId.*')],
+ lambda i: [re.compile('.*CT_Selection'), re.compile('.*pane.*')],
+# lambda i: [re.compile('.*CT_Selection'), re.compile('.*sqref.*')],
+ ]
diff --git a/ooxml-strict/calc/sheetpr.py b/ooxml-strict/calc/sheetpr.py
new file mode 100644
index 0000000..07d35b5
--- /dev/null
+++ b/ooxml-strict/calc/sheetpr.py
@@ -0,0 +1,34 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*filterMode.*')],
+ lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*enableFormatConditionsCalculation.*')],
+ lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*published.*')],
+ lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*transitionEntry.*')],
+ lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*transitionEvaluation.*')],
+ lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*syncVertical.*')],
+ lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*syncHorizontal.*')],
+# lambda i: [re.compile('.*CT_SheetPr'), re.compile('.*syncRef.*')],
+ ]
diff --git a/ooxml-strict/calc/sheetview.py b/ooxml-strict/calc/sheetview.py
new file mode 100644
index 0000000..62a7ddf
--- /dev/null
+++ b/ooxml-strict/calc/sheetview.py
@@ -0,0 +1,42 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*colorId.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*defaultGridColor.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*rightToLeft.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*showFormulas.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*showGridLines.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*showOutlineSymbols.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*showRowColHeaders.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*showZeros.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*tabSelected.*')],
+# lambda i: [re.compile('.*CT_SheetView'), re.compile('.*topLeftCell.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*view.*')],
+ lambda i: [re.compile('.*CT_SheetView'), re.compile('.*windowProtection.*')],
+# lambda i: [re.compile('.*CT_SheetView'), re.compile('.*workbookViewId.*')],
+# lambda i: [re.compile('.*CT_SheetView'), re.compile('.*zoomScale.*')],
+# lambda i: [re.compile('.*CT_SheetView'), re.compile('.*zoomScaleNormal.*')],
+# lambda i: [re.compile('.*CT_SheetView'), re.compile('.*zoomScalePageLayoutView.*')],
+ ]
diff --git a/ooxml-strict/calc/templates/autofilter.xlsx b/ooxml-strict/calc/templates/autofilter.xlsx
new file mode 100644
index 0000000..244b59d
Binary files /dev/null and b/ooxml-strict/calc/templates/autofilter.xlsx differ
diff --git a/ooxml-strict/calc/templates/bookviews.xlsx b/ooxml-strict/calc/templates/bookviews.xlsx
new file mode 100644
index 0000000..415b224
Binary files /dev/null and b/ooxml-strict/calc/templates/bookviews.xlsx differ
diff --git a/ooxml-strict/calc/templates/breaks.xlsx b/ooxml-strict/calc/templates/breaks.xlsx
new file mode 100644
index 0000000..e302ad3
Binary files /dev/null and b/ooxml-strict/calc/templates/breaks.xlsx differ
diff --git a/ooxml-strict/calc/templates/calcpr.xlsx b/ooxml-strict/calc/templates/calcpr.xlsx
new file mode 100644
index 0000000..ba5d577
Binary files /dev/null and b/ooxml-strict/calc/templates/calcpr.xlsx differ
diff --git a/ooxml-strict/calc/templates/col.xlsx b/ooxml-strict/calc/templates/col.xlsx
new file mode 100644
index 0000000..a4ee09b
Binary files /dev/null and b/ooxml-strict/calc/templates/col.xlsx differ
diff --git a/ooxml-strict/calc/templates/commentpr.xlsx b/ooxml-strict/calc/templates/commentpr.xlsx
new file mode 100644
index 0000000..182b078
Binary files /dev/null and b/ooxml-strict/calc/templates/commentpr.xlsx differ
diff --git a/ooxml-strict/calc/templates/comments.xlsx b/ooxml-strict/calc/templates/comments.xlsx
new file mode 100644
index 0000000..7b5d59b
Binary files /dev/null and b/ooxml-strict/calc/templates/comments.xlsx differ
diff --git a/ooxml-strict/calc/templates/datavalidation.xlsx b/ooxml-strict/calc/templates/datavalidation.xlsx
new file mode 100644
index 0000000..02a3ec9
Binary files /dev/null and b/ooxml-strict/calc/templates/datavalidation.xlsx differ
diff --git a/ooxml-strict/calc/templates/definednames.xlsx b/ooxml-strict/calc/templates/definednames.xlsx
new file mode 100644
index 0000000..8c2df14
Binary files /dev/null and b/ooxml-strict/calc/templates/definednames.xlsx differ
diff --git a/ooxml-strict/calc/templates/fileversion.xlsx b/ooxml-strict/calc/templates/fileversion.xlsx
new file mode 100644
index 0000000..ba5d577
Binary files /dev/null and b/ooxml-strict/calc/templates/fileversion.xlsx differ
diff --git a/ooxml-strict/calc/templates/headerfooter.xlsx b/ooxml-strict/calc/templates/headerfooter.xlsx
new file mode 100644
index 0000000..cfbe603
Binary files /dev/null and b/ooxml-strict/calc/templates/headerfooter.xlsx differ
diff --git a/ooxml-strict/calc/templates/headerfooter2.xlsx b/ooxml-strict/calc/templates/headerfooter2.xlsx
new file mode 100644
index 0000000..dceb559
Binary files /dev/null and b/ooxml-strict/calc/templates/headerfooter2.xlsx differ
diff --git a/ooxml-strict/calc/templates/headerfooter3.xlsx b/ooxml-strict/calc/templates/headerfooter3.xlsx
new file mode 100644
index 0000000..9e9349a
Binary files /dev/null and b/ooxml-strict/calc/templates/headerfooter3.xlsx differ
diff --git a/ooxml-strict/calc/templates/hyperlinks.xlsx b/ooxml-strict/calc/templates/hyperlinks.xlsx
new file mode 100644
index 0000000..fe53174
Binary files /dev/null and b/ooxml-strict/calc/templates/hyperlinks.xlsx differ
diff --git a/ooxml-strict/calc/templates/inputcells.xlsx b/ooxml-strict/calc/templates/inputcells.xlsx
new file mode 100644
index 0000000..626bf49
Binary files /dev/null and b/ooxml-strict/calc/templates/inputcells.xlsx differ
diff --git a/ooxml-strict/calc/templates/page-setup-a4.xlsx b/ooxml-strict/calc/templates/page-setup-a4.xlsx
new file mode 100644
index 0000000..f4d98ee
Binary files /dev/null and b/ooxml-strict/calc/templates/page-setup-a4.xlsx differ
diff --git a/ooxml-strict/calc/templates/page-setup-custom-size.xlsx b/ooxml-strict/calc/templates/page-setup-custom-size.xlsx
new file mode 100644
index 0000000..a3b5768
Binary files /dev/null and b/ooxml-strict/calc/templates/page-setup-custom-size.xlsx differ
diff --git a/ooxml-strict/calc/templates/pagesetuppr.xlsx b/ooxml-strict/calc/templates/pagesetuppr.xlsx
new file mode 100644
index 0000000..0d7f88e
Binary files /dev/null and b/ooxml-strict/calc/templates/pagesetuppr.xlsx differ
diff --git a/ooxml-strict/calc/templates/printoptions.xlsx b/ooxml-strict/calc/templates/printoptions.xlsx
new file mode 100644
index 0000000..036de80
Binary files /dev/null and b/ooxml-strict/calc/templates/printoptions.xlsx differ
diff --git a/ooxml-strict/calc/templates/scenario.xlsx b/ooxml-strict/calc/templates/scenario.xlsx
new file mode 100644
index 0000000..4ee0d88
Binary files /dev/null and b/ooxml-strict/calc/templates/scenario.xlsx differ
diff --git a/ooxml-strict/calc/templates/selection.xlsx b/ooxml-strict/calc/templates/selection.xlsx
new file mode 100644
index 0000000..f13cb26
Binary files /dev/null and b/ooxml-strict/calc/templates/selection.xlsx differ
diff --git a/ooxml-strict/calc/templates/sheetpr.xlsx b/ooxml-strict/calc/templates/sheetpr.xlsx
new file mode 100644
index 0000000..f13cb26
Binary files /dev/null and b/ooxml-strict/calc/templates/sheetpr.xlsx differ
diff --git a/ooxml-strict/calc/templates/sheetview.xlsx b/ooxml-strict/calc/templates/sheetview.xlsx
new file mode 100644
index 0000000..b445ba9
Binary files /dev/null and b/ooxml-strict/calc/templates/sheetview.xlsx differ
diff --git a/ooxml-strict/calc/templates/workbookpr.xlsx b/ooxml-strict/calc/templates/workbookpr.xlsx
new file mode 100644
index 0000000..58c3d42
Binary files /dev/null and b/ooxml-strict/calc/templates/workbookpr.xlsx differ
diff --git a/ooxml-strict/calc/workbookpr.py b/ooxml-strict/calc/workbookpr.py
new file mode 100644
index 0000000..fca4537
--- /dev/null
+++ b/ooxml-strict/calc/workbookpr.py
@@ -0,0 +1,44 @@
+# Copyright 2010, Muthu Subramanian, Novell Inc.
+#
+# 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.
+
+import re
+from opc import ALL_OOXML as ALL_OOXML
+
+# use default list of xml mimetypes in opc
+mimetypes = ALL_OOXML
+
+# always iterate once over a matched element
+iterations = lambda i: 1
+
+# always use the same regexp regardless of mimetype
+worklist = [
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*date1904.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*dateCompatibility.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*updateLinks.*')],
+# lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*codeName.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*showObjects.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*showBorderUnselectedTables.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*filterPrivacy.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*promptedSolutions.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*showInkAnnotation.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*backupFile.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*saveExternalLinkValues.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*hidePivotFieldList.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*showPivotChartFilter.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*allowRefreshQuery.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*publishItems.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*refreshAllConnections.*')],
+# lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*defaultThemeVersion.*')],
+ lambda i: [re.compile('.*CT_WorkbookPr'), re.compile('.*checkCompatibility.*')]
+ ]
More information about the Libreoffice-commits
mailing list